Class CompareWithBaselineMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.tycho.plugins.p2.extras.CompareWithBaselineMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(defaultPhase=VERIFY, requiresProject=false, name="compare-version-with-baselines") public class CompareWithBaselineMojo extends org.apache.maven.plugin.AbstractMojoThis mojo compares versions the output artifacts of your module build with the version of the same artifacts available in configured baselines, in order to detect version inconsistencies (version moved back, or not correctly bumped since last release). Rules for "illegal" versions are:- version decreased compared to baseline
- same fully-qualified version as baseline, but with different binary content
- same major.minor.micro as baseline, with different qualifier (at least micro should be increased)
This mojo doesn't allow to use qualifier as a versioning segment and will most likely drive to false-positive errors if your qualifier has means to show versioniterations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCompareWithBaselineMojo.ReportBehavior
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,ArtifactComparator>artifactComparatorsprivate java.util.List<java.lang.String>baselinesA list of p2 repositories to be used as baseline.private java.lang.StringcomparatorThe hint of an availableArtifactComparatorcomponent to use for comparison of artifacts with same version.private EquinoxServiceFactoryequinoxprotected org.apache.maven.plugin.MojoExecutionexecutionprivate CompareWithBaselineMojo.ReportBehavioronIllegalVersionprivate org.codehaus.plexus.logging.LoggerplexusLoggerprivate org.apache.maven.project.MavenProjectprojectprivate booleanskip
-
Constructor Summary
Constructors Constructor Description CompareWithBaselineMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()private java.net.URItoRepoURI(java.lang.String s)
-
-
-
Field Detail
-
project
@Parameter(property="project", readonly=true) private org.apache.maven.project.MavenProject project
-
execution
@Parameter(property="mojoExecution", readonly=true) protected org.apache.maven.plugin.MojoExecution execution
-
baselines
@Parameter(property="baselines", name="baselines") private java.util.List<java.lang.String> baselinesA list of p2 repositories to be used as baseline. Those are typically the most recent released versions of your project.
-
skip
@Parameter(property="skip") private boolean skip
-
onIllegalVersion
@Parameter(property="onIllegalVersion", defaultValue="fail") private CompareWithBaselineMojo.ReportBehavior onIllegalVersion
-
equinox
@Requirement @Component private EquinoxServiceFactory equinox
-
plexusLogger
@Component private org.codehaus.plexus.logging.Logger plexusLogger
-
comparator
@Parameter(defaultValue="bytes", readonly=true) private java.lang.String comparatorThe hint of an availableArtifactComparatorcomponent to use for comparison of artifacts with same version.
-
artifactComparators
@Component(role=ArtifactComparator.class) protected java.util.Map<java.lang.String,ArtifactComparator> artifactComparators
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
toRepoURI
private java.net.URI toRepoURI(java.lang.String s) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-