@Mojo(name="build-qualifier-aggregator", defaultPhase=VALIDATE) 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.
baseDir, buildPropertiesParser, execution, forceContextQualifier, format, session, timestampProvider, timestampProviders
packaging, project, projectTypes
Constructor and Description |
---|
BuildQualifierAggregatorMojo() |
Modifier and Type | Method and Description |
---|---|
protected Date |
getBuildTimestamp() |
execute, setFormat
getOSGiId, getOSGiVersion
protected Date getBuildTimestamp() throws org.apache.maven.plugin.MojoExecutionException
getBuildTimestamp
in class BuildQualifierMojo
org.apache.maven.plugin.MojoExecutionException
Copyright © 2008–2016 Eclipse Foundation. All rights reserved.