https://github.com/release-engineering/buildmetadata-maven-plugin
The buildmetadata-maven-plugin captures and reports information about Maven builds.
https://github.com/release-engineering/buildmetadata-maven-plugin
Last synced: about 1 year ago
JSON representation
The buildmetadata-maven-plugin captures and reports information about Maven builds.
- Host: GitHub
- URL: https://github.com/release-engineering/buildmetadata-maven-plugin
- Owner: release-engineering
- License: apache-2.0
- Created: 2013-10-09T12:04:22.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2018-02-19T09:45:14.000Z (over 8 years ago)
- Last Synced: 2025-03-25T13:11:29.776Z (about 1 year ago)
- Language: Java
- Homepage:
- Size: 499 KB
- Stars: 10
- Watchers: 12
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
buildmetadata-maven-plugin
==========================
The build metadata maven plugin creates a detailed report of the various build time parameters employed during a build.
The information includes useful data that can be used to provide better transparency and accountability of the build
process. Meta data includes build times and dates, user environment information and Java/Maven command line options.
The reporting is configurable and extensible as well as being adaptable for projects using multiple artifacts.
Maven Repository
----------------
You can access the binary artifact via Maven Central or the JBoss releases repository.
JBoss Releases:
http://repository.jboss.org/nexus/content/repositories/releases/com/redhat/rcm/maven/plugin/buildmetadata-maven-plugin/
Metadata Description
--------------------
SCM information
1. revision number
2. revision date
3. locally modified files
4. URL of SCM server
System information
5. build time
6. operating system
7. name
8. architecture
9. version
Java runtime
10. vendor
11. name
12. version
13. virtual machine
14. compiler
15. JAVA_OPTS
Maven execution information
16. Maven version
17. active profiles
18. environment properties
19. command line and executed goals
MAVEN_OPTS
20. build user
21. build host name
22. Artifact and version
group ID
artifact ID
build version
23. project info
24. home page URL
25. categories
26. tags
System Requirements
-------------------
The following specifies the minimum requirements to run this Maven plugin:
1. Maven 2.0
2. JDK 1.5
Installation Instructions
-------------------------
Clone the repository to your workspace and build with maven:
1. `git clone https://github.com/release-engineering/buildmetadata-maven-plugin.git`
2. `mvn install`
3. Edit your project pom.xml to include the following:
The options in the plugin's configuration section will produce a report that will include the command line executed
along with the Maven and Java Options. For the full options available and details on how to extend functionality please
refer to the upstream documentation linked below.
```
...
repository.jboss.org
JBoss Releases
http://repository.jboss.org/nexus/content/repositories/releases/
repository.jboss.org
JBoss Releases
http://repository.jboss.org/nexus/content/repositories/releases/
com.redhat.rcm.maven.plugin
buildmetadata-maven-plugin
1.3.1
com.redhat.rcm.maven.plugin
buildmetadata-maven-plugin
1.3.1
initialize
provide-buildmetadata
false
${project.build.outputDirectory}/META-INF/buildmetadata.xml
false
false
false
...
```
Runtime Example
---------------
If you want to execute the plugin from the command line with no modifications to your pom file the following example can be used:
```
mvn clean install -X -C -B dependency:resolve-plugins \
-Dmaven.test.skip=true \
-Dbuildmetadata:provide-buildmetadata \
-Dbuildmetadata:createPropertiesReport=false \
-Dbuildmetadata:xmlOutputFile={project.build.outputDirectory}/META-INF/buildmetadata.xml \
-Dbuildmetadata:hideCommandLineInfo=false \
-Dbuildmetadata:hideMavenOptsInfo=false \
-Dbuildmetadata:hideJavaOptsInfo=false \
-Dbuildmetadata:addScminfo=true | tee build.log
```
Assuming the plugin configuration in your projects pom.xml matches the example provided then simply executing maven withthe install goal will create a buildmetadata.xml file in the generated jar file under the META-INF direcory of the
archive.
`mvn install`
You can view the generated build.properties file in the archive without extracting it with the following command:
`unzip -p example/MyApp/target/MyApp-1.0-SNAPSHOT.jar META-INF/buildmetadata.xml`
The report will resemble the example below:
1.0-20131105-SNAPSHOT
1.0-SNAPSHOT
com.redhat.rcm
HelloWorld
2013-11-05T08:57:22
1383638242882
2013
null-2013
42c32d5c55a9fe7a0ec08ccf7719273fa268eadf
2014-02-09T00:00:00
scm:git:git@github.com:sbadakhc/HelloWorld.git
localhost.localdomain
sbadakhc
amd64
Linux
3.11.6-200.fc19.x86_64
OpenJDK Runtime Environment
1.7.0_45-mockbuild_2013_10_16_17_47-b00
Oracle Corporation
OpenJDK 64-Bit Server VM
HotSpot 64-Bit Tiered Compilers
3.0.5
-X -e install
com.redhat.rcm:HelloWorld:jar:1.0-SNAPSHOT
true
install
-Xmx4096m -XX:MaxPermSize=2048m -Xnoclassgc -XX:+DisableExplicitGC
dd.MM.yyyy HH:mm:ss
Goals
-----
The following goals are supported. For a full explanation please refer to the upstream providers documentation.
1. buildmetadata:build-point
2. buildmetadata:buildmetadata-report
3. buildmetadata:provide-buildmetadata
Notes
-----
This project is a fork of http://www.smartics.eu/buildmetadata-maven-plugin
At the time of forking the project the buildmetadata-maven-plugin had not been deployed to Central. However
since version 1.6.1 the upstream is now available in Central (See: https://github.com/smartics/buildmetadata-maven-plugin and https://repo1.maven.org/maven2/de/smartics/maven/plugin/buildmetadata-maven-plugin/ )