{"id":20314598,"url":"https://github.com/release-engineering/buildmetadata-maven-plugin","last_synced_at":"2025-04-11T17:17:37.294Z","repository":{"id":57728267,"uuid":"13441177","full_name":"release-engineering/buildmetadata-maven-plugin","owner":"release-engineering","description":"The buildmetadata-maven-plugin captures and reports information about Maven builds.","archived":false,"fork":false,"pushed_at":"2018-02-19T09:45:14.000Z","size":511,"stargazers_count":10,"open_issues_count":4,"forks_count":9,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-25T13:11:29.776Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/release-engineering.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-09T12:04:22.000Z","updated_at":"2025-03-10T02:33:59.000Z","dependencies_parsed_at":"2022-09-26T22:00:28.258Z","dependency_job_id":null,"html_url":"https://github.com/release-engineering/buildmetadata-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/release-engineering%2Fbuildmetadata-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/release-engineering%2Fbuildmetadata-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/release-engineering%2Fbuildmetadata-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/release-engineering%2Fbuildmetadata-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/release-engineering","download_url":"https://codeload.github.com/release-engineering/buildmetadata-maven-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248447600,"owners_count":21105140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T18:16:00.386Z","updated_at":"2025-04-11T17:17:37.251Z","avatar_url":"https://github.com/release-engineering.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"buildmetadata-maven-plugin\n==========================\n\nThe build metadata maven plugin creates a detailed report of the various build time parameters employed during a build.\nThe information includes useful data that can be used to provide better transparency and accountability of the build\nprocess. Meta data includes build times and dates, user environment information and Java/Maven command line options.\nThe reporting is configurable and extensible as well as being adaptable for projects using multiple artifacts.\n\nMaven Repository\n----------------\nYou can access the binary artifact via Maven Central or the JBoss releases repository.\n\nJBoss Releases:\n\nhttp://repository.jboss.org/nexus/content/repositories/releases/com/redhat/rcm/maven/plugin/buildmetadata-maven-plugin/\n\nMetadata Description\n--------------------\n\nSCM information\n\n1. revision number\n2. revision date\n3. locally modified files\n4. URL of SCM server\n\nSystem information\n\n5. build time\n6. operating system\n7. name\n8. architecture\n9. version\n\nJava runtime\n\n10. vendor\n11. name\n12. version\n13. virtual machine\n14. compiler\n15. JAVA_OPTS\n\nMaven execution information\n\n16. Maven version\n17. active profiles\n18. environment properties\n19. command line and executed goals\n\nMAVEN_OPTS\n\n20. build user\n21. build host name\n22. Artifact and version\n        group ID\n        artifact ID\n        build version\n23. project info\n24. home page URL\n25. categories\n26. tags\n\nSystem Requirements\n-------------------\nThe following specifies the minimum requirements to run this Maven plugin:\n\n1.  Maven 2.0\n2.  JDK 1.5\n\nInstallation Instructions\n-------------------------\nClone the repository to your workspace and build with maven:\n\n1. `git clone https://github.com/release-engineering/buildmetadata-maven-plugin.git`\n2. `mvn install`\n3. Edit your project pom.xml to include the following:\n\nThe options in the plugin's configuration section will produce a report that will include the command line executed\nalong with the Maven and Java Options.  For the full options available and details on how to extend functionality please\nrefer to the upstream documentation linked below.\n```\n    \u003cproject\u003e\n      ...\n      \u003c!-- Set up the repository to fetch the buildmetadata-maven-plugin from --\u003e\n      \u003crepositories\u003e\n        \u003crepository\u003e\n          \u003cid\u003erepository.jboss.org\u003c/id\u003e\n          \u003cname\u003eJBoss Releases\u003c/name\u003e\n          \u003curl\u003ehttp://repository.jboss.org/nexus/content/repositories/releases/\u003c/url\u003e\n        \u003c/repository\u003e\n      \u003c/repositories\u003e\n\n      \u003cpluginRepositories\u003e\n        \u003cpluginRepository\u003e\n          \u003cid\u003erepository.jboss.org\u003c/id\u003e\n          \u003cname\u003eJBoss Releases\u003c/name\u003e\n          \u003curl\u003ehttp://repository.jboss.org/nexus/content/repositories/releases/\u003c/url\u003e\n        \u003c/pluginRepository\u003e\n      \u003c/pluginRepositories\u003e\n\n      \u003c!-- Declare the dependancy on the buildmetadata-maven-plugin --\u003e\n      \u003cdependencies\u003e\n        \u003cdependency\u003e\n          \u003cgroupId\u003ecom.redhat.rcm.maven.plugin\u003c/groupId\u003e\n          \u003cartifactId\u003ebuildmetadata-maven-plugin\u003c/artifactId\u003e\n          \u003cversion\u003e1.3.1\u003c/version\u003e\n        \u003c/dependency\u003e\n      \u003c/dependencies\u003e\n\n      \u003c!-- Configure the buildmetadata-maven-plugin with the required reporting options --\u003e\n      \u003cbuild\u003e\n        \u003cplugins\u003e\n          \u003cplugin\u003e\n            \u003cgroupId\u003ecom.redhat.rcm.maven.plugin\u003c/groupId\u003e\n            \u003cartifactId\u003ebuildmetadata-maven-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e1.3.1\u003c/version\u003e\n            \u003cexecutions\u003e\n              \u003cexecution\u003e\n                \u003cphase\u003einitialize\u003c/phase\u003e\n                \u003cgoals\u003e\n                  \u003cgoal\u003eprovide-buildmetadata\u003c/goal\u003e\n                \u003c/goals\u003e\n                \u003cconfiguration\u003e\n                  \u003ccreatePropertiesReport\u003efalse\u003c/createPropertiesReport\u003e\n                  \u003cxmlOutputFile\u003e${project.build.outputDirectory}/META-INF/buildmetadata.xml\u003c/xmlOutputFile\u003e\n                  \u003chideCommandLineInfo\u003efalse\u003c/hideCommandLineInfo\u003e\n                  \u003chideMavenOptsInfo\u003efalse\u003c/hideMavenOptsInfo\u003e\n                  \u003chideJavaOptsInfo\u003efalse\u003c/hideJavaOptsInfo\u003e\n                \u003c/configuration\u003e\n              \u003c/execution\u003e\n            \u003c/executions\u003e\n          \u003c/plugin\u003e\n        \u003c/plugins\u003e\n      \u003c/build\u003e\n    ...\n    \u003c/project\u003e\n```\n\nRuntime Example\n---------------\n\nIf you want to execute the plugin from the command line with no modifications to your pom file the following example can be used:\n\n```\nmvn clean install -X -C -B dependency:resolve-plugins \\\n-Dmaven.test.skip=true \\\n-Dbuildmetadata:provide-buildmetadata \\\n-Dbuildmetadata:createPropertiesReport=false \\\n-Dbuildmetadata:xmlOutputFile={project.build.outputDirectory}/META-INF/buildmetadata.xml \\\n-Dbuildmetadata:hideCommandLineInfo=false \\\n-Dbuildmetadata:hideMavenOptsInfo=false \\\n-Dbuildmetadata:hideJavaOptsInfo=false \\\n-Dbuildmetadata:addScminfo=true | tee build.log\n```\nAssuming 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\narchive.\n\n`mvn install`\n\nYou can view the generated build.properties file in the archive without extracting it with the following command:\n\n`unzip -p example/MyApp/target/MyApp-1.0-SNAPSHOT.jar META-INF/buildmetadata.xml`\n\nThe report will resemble the example below:\n\n    \u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?\u003e\n    \u003cbuildmetadata xmlns=\"http://github.com/sbadakhc/buildmetadata-maven-plugin\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://github.com/sbadakhc/buildmetadata-maven-plugin http://github.com/sbadakhc/buildmetadata-maven-plugin\"\u003e\n    \u003cname\u003e1.0-20131105-SNAPSHOT\u003c/name\u003e\n    \u003cversion\u003e1.0-SNAPSHOT\u003c/version\u003e\n    \u003cgroupId\u003ecom.redhat.rcm\u003c/groupId\u003e\n    \u003cartifactId\u003eHelloWorld\u003c/artifactId\u003e\n    \u003cdate\u003e2013-11-05T08:57:22\u003c/date\u003e\n    \u003ctimestamp\u003e1383638242882\u003c/timestamp\u003e\n    \u003cbuild-year\u003e2013\u003c/build-year\u003e\n    \u003cproject\u003e\n      \u003ccopyright-year\u003enull-2013\u003c/copyright-year\u003e\n    \u003c/project\u003e\n    \u003cscm\u003e\n      \u003crevision\u003e42c32d5c55a9fe7a0ec08ccf7719273fa268eadf\u003c/revision\u003e\n      \u003crevision-date\u003e2014-02-09T00:00:00\u003c/revision-date\u003e\n      \u003curl\u003escm:git:git@github.com:sbadakhc/HelloWorld.git\u003c/url\u003e\n    \u003c/scm\u003e\n    \u003cruntime\u003e\n      \u003cbuild-server\u003elocalhost.localdomain\u003c/build-server\u003e\n      \u003cbuild-user\u003esbadakhc\u003c/build-user\u003e\n      \u003cos\u003e\n        \u003carch\u003eamd64\u003c/arch\u003e\n        \u003cname\u003eLinux\u003c/name\u003e\n        \u003cversion\u003e3.11.6-200.fc19.x86_64\u003c/version\u003e\n      \u003c/os\u003e\n     \u003cjava\u003e\n        \u003cname\u003eOpenJDK Runtime Environment\u003c/name\u003e\n        \u003cversion\u003e1.7.0_45-mockbuild_2013_10_16_17_47-b00\u003c/version\u003e\n        \u003cvendor\u003eOracle Corporation\u003c/vendor\u003e\n        \u003cvm\u003eOpenJDK 64-Bit Server VM\u003c/vm\u003e\n        \u003ccompiler\u003eHotSpot 64-Bit Tiered Compilers\u003c/compiler\u003e\n     \u003c/java\u003e\n     \u003cmaven\u003e\n       \u003cversion\u003e3.0.5\u003c/version\u003e\n       \u003ccommandline\u003e-X -e install\u003c/commandline\u003e\n       \u003cexecution-project\u003ecom.redhat.rcm:HelloWorld:jar:1.0-SNAPSHOT\u003c/execution-project\u003e\n       \u003cis-excution-root\u003etrue\u003c/is-excution-root\u003e\n       \u003cgoals\u003e\n         \u003cgoal\u003einstall\u003c/goal\u003e\n       \u003c/goals\u003e\n       \u003coptions\u003e-Xmx4096m -XX:MaxPermSize=2048m -Xnoclassgc -XX:+DisableExplicitGC\u003c/options\u003e\n     \u003c/maven\u003e\n    \u003c/runtime\u003e\n    \u003cmisc\u003e\n      \u003cmetadata name=\"build.date.pattern\"\u003edd.MM.yyyy HH:mm:ss\u003c/metadata\u003e\n    \u003c/misc\u003e\n    \u003c/buildmetadata\u003e\n\nGoals\n-----\n\nThe following goals are supported.  For a full explanation please refer to the upstream providers documentation.\n\n1. buildmetadata:build-point\n2. buildmetadata:buildmetadata-report\n3. buildmetadata:provide-buildmetadata\n\n\n\nNotes\n-----\n\nThis project is a fork of http://www.smartics.eu/buildmetadata-maven-plugin\n\nAt the time of forking the project the buildmetadata-maven-plugin had not been deployed to Central. However\nsince 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/ )\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelease-engineering%2Fbuildmetadata-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelease-engineering%2Fbuildmetadata-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelease-engineering%2Fbuildmetadata-maven-plugin/lists"}