Build Points run the build point mojo at specified phases of the build process. With build points you can
For each build point add an execution block to the plugin's section in the POM and bind it to the phase to run in. Providers that run with a build point require the property runAtBuildPoint set to true.
The following example shows how to set two sample build points.
<plugin> <groupId>de.smartics.maven.plugin</groupId> <artifactId>maven-buildmetadata-plugin</artifactId> <version>1.1.5</version> <inherited>true</inherited> <configuration> <providers> <provider> <type>de.smartics.sandbox.provider.InitProvider</type> </provider> <provider> <type>de.smartics.sandbox.provider.EchoProvider</type> <properties> <echo>Beautiful!</echo> <times>3</times> <runAtBuildPoint>true</runAtBuildPoint> </properties> </provider> </providers> </configuration> <executions> <execution> <id>build-point-1</id> <goals> <goal>build-point</goal> </goals> <phase>test</phase> <configuration> <name>test</name> </configuration> </execution> <execution> <id>build-point-2</id> <goals> <goal>build-point</goal> </goals> <phase>verify</phase> <configuration> <name>promote</name> <providers> <provider> <type>de.smartics.sandbox.provider.PromotionProvider</type> <properties> <runAtBuildPoint>true</runAtBuildPoint> </properties> </provider> </providers> </configuration> </execution> </executions> </plugin>
The InitProvider will not be run at any build point since its configuration lacks the runAtBuildPoint property. The EchoProvider is run at both build points. The PromotionProvider is only run at build-point-2 which is named promote in the verify phase.
For each build point the time within the build is logged as is the difference to the last build point (tagged with the diff suffix). The build properties file may contain the following information due to the build point configuration above.
build.duration.promote=20918 build.duration.promote.diff=41 build.duration.test=20877 build.duration.test.diff=20877
All times are given in milliseconds.
Please note that the properties are ordered by their name, not by the time in milliseconds.