About
A Build is just a run of maven.
Articles Related
Plugin
LICENSE, NOTICE,…
Example: Make sure every sub-project has LICENSE, NOTICE and git.properties in its jar's META-INF directory
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${top.dir}</directory>
<targetPath>META-INF</targetPath>
<includes>
<include>LICENSE</include>
<include>NOTICE</include>
</includes>
</resource>
<resource>
<directory>${top.dir}/target</directory>
<targetPath>META-INF</targetPath>
<includes>
<include>git.properties</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
Build Info
- In War (META-INF/build-info.properties)
Example:
build.group=com.example
build.artifact=demo
build.name=Demo Project
build.version=0.0.1-SNAPSHOT
build.time=2016-03-04T15\:16\:05+0100
Plugin:
A build-info file may also be created with resources filtering in Maven.
Retrieve information from VCS: