Class BuildQualifierAggregatorMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.tycho.buildversion.AbstractVersionMojo
-
- org.eclipse.tycho.buildversion.BuildQualifierMojo
-
- org.eclipse.tycho.buildversion.BuildQualifierAggregatorMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="build-qualifier-aggregator", defaultPhase=VALIDATE, threadSafe=true) public class BuildQualifierAggregatorMojo extends BuildQualifierMojo
This mojo calculates build timestamp as the latest timestamp of the project itself and timestamps of bundles and features directly included in the project. This is meant to work with custom timestamp providers and generate build qualifier based on build contents, i.e. the source code, and not the time the build was started; rebuilding the same source code will result in the same version qualifier.
Timestamp of included bundles and features is determined by parsing their respective version qualifiers. Qualifiers that cannot be parsed are silently ignored, which can result in old version qualifier used even when aggregator project contents actually changed. In this case aggregator project timestamp will have to be increased manually, using artificial SCM commit for example.
Qualifier aggregation is enabled only for projects with custom timestamp provider, i.e. <timestampProvider> is set in pom.xml to a value other than "default". The default build timestamp provider uses build start time as build timestamp, which should be newer or equal than timestamp of any included bundle/feature project, which makes qualifier aggregation redundant.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.tycho.buildversion.BuildQualifierMojo
BuildQualifierMojo.TychoProjectVersion
-
-
Field Summary
Fields Modifier and Type Field Description private TimestampFinder
timestampFinder
-
Fields inherited from class org.eclipse.tycho.buildversion.BuildQualifierMojo
baseDir, buildPropertiesParser, execution, forceContextQualifier, format, session, timestampProvider, timestampProviders
-
Fields inherited from class org.eclipse.tycho.buildversion.AbstractVersionMojo
packaging, project, projectTypes
-
-
Constructor Summary
Constructors Constructor Description BuildQualifierAggregatorMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Date
getBuildTimestamp()
-
Methods inherited from class org.eclipse.tycho.buildversion.BuildQualifierMojo
execute, getQualifier, setFormat, validateQualifier
-
Methods inherited from class org.eclipse.tycho.buildversion.AbstractVersionMojo
getOSGiId, getOSGiVersion
-
-
-
-
Field Detail
-
timestampFinder
private final TimestampFinder timestampFinder
-
-
Method Detail
-
getBuildTimestamp
protected java.util.Date getBuildTimestamp() throws org.apache.maven.plugin.MojoExecutionException
- Overrides:
getBuildTimestamp
in classBuildQualifierMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-