Collect and display build information
This commit updates the Maven plugin to generate a `META-INF/boot/build.properties` file with various build-specific settings (group, artifact, name, version and build time). Additionally, the plugin can be configured to write an arbitrary number of additional properties. A new `BuildProperties` bean is automatically exposed when such a file is present. If that bean is present, an `InfoContributor` is automatically created to expose that information under the `build` key. As for the git contributor, it is possible to only display the core settings or everything using the `management.info.build.mode` property. See gh-2559
This commit is contained in:
@@ -71,6 +71,22 @@
|
||||
<configuration>
|
||||
<executable>true</executable>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate build info</id>
|
||||
<goals>
|
||||
<goal>generate-build-info</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<additionalProperties>
|
||||
<encoding.source>${project.build.sourceEncoding}</encoding.source>
|
||||
<encoding.reporting>${project.reporting.outputEncoding}</encoding.reporting>
|
||||
<java.source>${maven.compiler.source}</java.source>
|
||||
<java.target>${maven.compiler.target}</java.target>
|
||||
</additionalProperties>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
Reference in New Issue
Block a user