Class AbstractBaselinePlugin
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.felix.bundleplugin.baseline.AbstractBaselinePlugin
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
BaselinePlugin
abstract class AbstractBaselinePlugin
extends org.apache.maven.plugin.AbstractMojo
Abstract BND Baseline check between two bundles.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.sonatype.plexus.build.incremental.BuildContextprivate Fileprotected StringArtifact to compare the current code against.protected StringClassifier for the artifact to compare the current code against.protected StringGroup id to compare the current code against.protected StringArtifact to compare the current code against.protected StringVersion to compare the current code against.protected org.apache.maven.artifact.factory.ArtifactFactoryprotected booleanWhether to fail on errors.protected booleanWhether to fail on warnings.private String[]A list of packages filter, if empty the whole bundle will be traversed.private Stringprivate org.apache.maven.artifact.metadata.ArtifactMetadataSourceprotected org.apache.maven.project.MavenProjectprotected org.apache.maven.artifact.resolver.ArtifactResolverprotected org.apache.maven.execution.MavenSessionprotected booleanFlag to easily skip execution.Project types which this plugin supports.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidprivate static voidcloseJars(aQute.bnd.osgi.Jar... jars) private voidprivate voiddoPackageDiff(Object context, aQute.bnd.service.diff.Diff diff) protected abstract voidendBaseline(Object context) protected abstract voidprotected abstract voidendPackage(Object context) final voidexecute()protected voidprivate voidfilterSnapshots(List<org.apache.maven.artifact.versioning.ArtifactVersion> versions) private Stringprivate aQute.bnd.osgi.Jarprivate org.apache.maven.artifact.Artifactprivate static StringgetShortDelta(aQute.bnd.service.diff.Delta delta) protected abstract Objectprivate static aQute.bnd.osgi.Jarprotected abstract voidstartBaseline(Object context, String generationDate, String bundleName, String currentVersion, String previousVersion) protected abstract voidprotected abstract voidstartPackage(Object context, boolean mismatch, String name, String shortDelta, String delta, aQute.bnd.version.Version newerVersion, aQute.bnd.version.Version olderVersion, aQute.bnd.version.Version suggestedVersion, DiffMessage diffMessage, Map<String, String> attributes) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
skip
@Parameter(property="baseline.skip", defaultValue="false") protected boolean skipFlag to easily skip execution. -
failOnError
@Parameter(property="baseline.failOnError", defaultValue="true") protected boolean failOnErrorWhether to fail on errors. -
failOnWarning
@Parameter(property="baseline.failOnWarning", defaultValue="false") protected boolean failOnWarningWhether to fail on warnings. -
project
@Parameter(defaultValue="${project}", readonly=true, required=true) protected org.apache.maven.project.MavenProject project -
session
@Parameter(defaultValue="${session}", readonly=true, required=true) protected org.apache.maven.execution.MavenSession session -
buildDirectory
@Parameter(defaultValue="${project.build.directory}", readonly=true, required=true) private File buildDirectory -
finalName
@Parameter(defaultValue="${project.build.finalName}", readonly=true, required=true) private String finalName -
resolver
@Component protected org.apache.maven.artifact.resolver.ArtifactResolver resolver -
factory
@Component protected org.apache.maven.artifact.factory.ArtifactFactory factory -
metadataSource
@Component private org.apache.maven.artifact.metadata.ArtifactMetadataSource metadataSource -
comparisonGroupId
@Parameter(defaultValue="${project.groupId}", property="comparisonGroupId") protected String comparisonGroupIdGroup id to compare the current code against. -
comparisonArtifactId
@Parameter(defaultValue="${project.artifactId}", property="comparisonArtifactId") protected String comparisonArtifactIdArtifact to compare the current code against. -
comparisonVersion
@Parameter(defaultValue="(,${project.version})", property="comparisonVersion") protected String comparisonVersionVersion to compare the current code against. -
comparisonPackaging
@Parameter(defaultValue="${project.packaging}", property="comparisonPackaging") protected String comparisonPackagingArtifact to compare the current code against. -
comparisonClassifier
Classifier for the artifact to compare the current code against. -
filters
A list of packages filter, if empty the whole bundle will be traversed. Values are specified in OSGi package instructions notation, e.g.!org.apache.felix.bundleplugin. -
supportedProjectTypes
Project types which this plugin supports. -
buildContext
@Component protected org.sonatype.plexus.build.incremental.BuildContext buildContext
-
-
Constructor Details
-
AbstractBaselinePlugin
AbstractBaselinePlugin()
-
-
Method Details
-
execute
public final void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
execute
protected void execute(Object context) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException - Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
doPackageDiff
-
doDiff
-
init
-
close
-
startBaseline
-
startPackage
-
startDiff
-
endDiff
-
endPackage
-
endBaseline
-
getCurrentBundle
private aQute.bnd.osgi.Jar getCurrentBundle() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getPreviousArtifact
private org.apache.maven.artifact.Artifact getPreviousArtifact() throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionException
-
filterSnapshots
-
openJar
private static aQute.bnd.osgi.Jar openJar(File file) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
closeJars
private static void closeJars(aQute.bnd.osgi.Jar... jars) -
getBundleName
-
getShortDelta
-