You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2026/09/10 15:32:35 UTC

(maven-artifact-plugin) branch doc created (now 02315c2)

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a change to branch doc
in repository https://gitbox.apache.org/repos/asf/maven-artifact-plugin.git


      at 02315c2  update doc to match current approach

This branch includes the following new commits:

     new 02315c2  update doc to match current approach

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(maven-artifact-plugin) 01/01: update doc to match current approach

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch doc
in repository https://gitbox.apache.org/repos/asf/maven-artifact-plugin.git

commit 02315c2fe962e83b9bd9a85b43dfcceb8a2866dd
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Thu Sep 10 17:32:24 2026 +0200

    update doc to match current approach
---
 README.md                                          | 34 ++++-----------
 .../plugins/artifact/buildinfo/BuildinfoMojo.java  |  2 +
 src/site/markdown/index.md                         |  4 +-
 src/site/markdown/usage.md.vm                      | 50 +++++-----------------
 4 files changed, 23 insertions(+), 67 deletions(-)

diff --git a/README.md b/README.md
index 6228772..d0b84cc 100644
--- a/README.md
+++ b/README.md
@@ -30,45 +30,29 @@ you dig right into the code, there are a few guidelines that we need
 contributors to follow so that we can have a chance of keeping on top of
 things.
 
-This plugin contains `buildinfo` goal for [Reproducible Builds](https://reproducible-builds.org/) tooling,
-to ease reproducing Maven builds that are [expected to be reproducible](https://maven.apache.org/guides/mini/guide-reproducible-builds.html).
+This plugin contains `compare` goal for [Reproducible Builds](https://reproducible-builds.org/) tooling,
+to ease checking Maven builds that are [expected to be reproducible](https://maven.apache.org/guides/mini/guide-reproducible-builds.html)
+get really the same output as reference build.
 
-The purpose of this goal is:
+The purpose of this `compare` goal is:
 
-- to generate a buildinfo file from a build, recording fingerprints of output files, as specified in [Reproducible Builds for the JVM](https://reproducible-builds.org/docs/jvm/)
-  that will eventually be deployed to remote repository
+- to generate a buildinfo file from a build, recording fingerprints of output files
 
-- help rebuilders to check that they local build produces the same Reproducible Build output than the reference build
-  published to a remote repository
+- compare this recording of outputs to the reference files.
 
-To use this plugin, you'll need to build and install from source, or use SHAPSHOT from `https://repository.apache.org/content/repositories/snapshots`
-
-Generating buildinfo after a build
---------------
-
-```
-mvn verify artifact:buildinfo
-```
-
-Deploy to remote repository
---------------
-
-Configure the plugin with its ```buildinfo```
-goal in your ```pom.xml```
-
-Check local build against remote reference
+Comparing local build against remote reference
 --------------
 
 If reference build is available in a remote repository with predefined id, like ```central```:
 
 ```
-mvn verify artifact:buildinfo -Dreference.repo=central
+mvn verify artifact:compare -Dreference.repo=central
 ```
 
 If reference build is available in a remote repository without predefined id, use its url instead:
 
 ```
-mvn verify artifact:buildinfo -Dreference.repo=https://repository.apache.org/content/groups/maven-staging-group/
+mvn verify artifact:compare -Dreference.repo=https://repository.apache.org/content/groups/maven-staging-group/
 ```
 
 Getting Started
diff --git a/src/main/java/org/apache/maven/plugins/artifact/buildinfo/BuildinfoMojo.java b/src/main/java/org/apache/maven/plugins/artifact/buildinfo/BuildinfoMojo.java
index 1c635b5..2821449 100644
--- a/src/main/java/org/apache/maven/plugins/artifact/buildinfo/BuildinfoMojo.java
+++ b/src/main/java/org/apache/maven/plugins/artifact/buildinfo/BuildinfoMojo.java
@@ -37,8 +37,10 @@ import org.eclipse.aether.artifact.Artifact;
  * Creates a buildinfo file recording build environment and output (from {@code package}), as specified in
  * <a href="https://reproducible-builds.org/docs/jvm/">Reproducible Builds for the JVM</a>
  * for mono-module build, and extended for multi-module build.
+ * @deprecated buildinfo is an internal format, prefer the {@code describe-build-output} or {@code compare} goals
  */
 @Mojo(name = "buildinfo", defaultPhase = LifecyclePhase.VERIFY, threadSafe = false)
+@Deprecated
 public class BuildinfoMojo extends AbstractBuildinfoMojo {
     /**
      * Specifies whether to attach the generated buildinfo file to the project.
diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md
index d3db5d4..4e37ee5 100644
--- a/src/site/markdown/index.md
+++ b/src/site/markdown/index.md
@@ -31,10 +31,10 @@ The Artifact Plugin is used to manage artifacts tasks.
 
 The Artifact Plugin has 4 goals currently:
 
-- [artifact:buildinfo](./buildinfo-mojo.html) records current build results (from `package`) in [Reproducible Builds buildinfo](https://reproducible-builds.org/docs/jvm/) file,
+- [artifact:buildinfo](./buildinfo-mojo.html) (deprecated) records current build results (from `package`) in [Reproducible Builds buildinfo](https://reproducible-builds.org/docs/jvm/) file,
 - [artifact:compare](./compare-mojo.html) compares current build output (from `package`) against reference build previously published,
 - [artifact:check-buildplan](./check-buildplan-mojo.html) checks the project's buildplan to find if any used [plugin has a known Reproducible Builds issue](./plugin-issues.html),
-- [artifact:describe-build-output](./describe-build-output-mojo.html) (experimental) describes build structure and output,
+- [artifact:describe-build-output](./describe-build-output-mojo.html) describes build structure and output,
 - [artifact:reproducible-central](./reproducible-central-mojo.html) (experimental) report shows if dependencies are proven Reproducible Builds at Reproducible Central.
 ## Usage
 
diff --git a/src/site/markdown/usage.md.vm b/src/site/markdown/usage.md.vm
index 0914ed7..e8c5ce1 100644
--- a/src/site/markdown/usage.md.vm
+++ b/src/site/markdown/usage.md.vm
@@ -26,30 +26,6 @@ under the License.
 
 # Usage
 
-Recording `.buildinfo` File
----------------------------
-
-Recording build result into a `.buildinfo` file is typically done on command line by calling `artifact:buildinfo` goal after the normal build:
-
-```
-$ mvn clean verify artifact:buildinfo
-[INFO] Scanning for projects...
-[INFO] 
-[INFO] ----------------< org.apache.maven.sample:test-project >----------------
-[INFO] Building Test Project 1.0-SNAPSHOT
-[INFO] --------------------------------[ jar ]---------------------------------
-...
-[INFO] --- maven-artifact-plugin:${project.version}:buildinfo (default-cli) @ test-project ---
-[INFO] Saved info on build to /tmp/test-project/target/test-project-1.0-SNAPSHOT.buildinfo
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESS
-[INFO] ------------------------------------------------------------------------
-```
-
-This records data on the current build results into a `.buildinfo` file using [Reproducible Builds `.buildinfo` for the JVM](https://reproducible-builds.org/docs/jvm/) format.
-
-Notice that if the build is multi-module, only 1 `.buildinfo` file is generated, in the last module of the reactor, that will record aggregated results for all the modules.
-
 Checking Reproducible Build: Comparing Current Build Against Previous One
 -------------------------------------------------------------------------
 
@@ -60,20 +36,14 @@ $ mvn -Papache-release clean verify -Dgpg.skip artifact:compare
 [INFO] Scanning for projects...
 ...
 [INFO] --- maven-artifact-plugin:${project.version}:compare (default-cli) @ doxia-module-markdown ---
-[INFO] Saved aggregate info on build to /tmp/doxia-1.9.1/doxia-modules/doxia-module-markdown/target/doxia-module-markdown-1.9.1.buildinfo
-[INFO] Checking against reference build from central...
-Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-markdown/1.9.1/doxia-module-markdown-1.9.1.buildinfo
-[WARNING] Reference buildinfo file not found: it will be generated from downloaded reference artifacts
-[INFO] Reference build java.version: 1.8 (from MANIFEST.MF Build-Jdk-Spec)
-[ERROR] Current build java.version: 1.7 (from MANIFEST.MF Build-Jdk-Spec)
-[INFO] Reference build os.name: Unix (from pom.properties newline)
-[INFO] Minimal buildinfo generated from downloaded artifacts: /tmp/doxia-1.9.1/target/reference/doxia-module-markdown-1.9.1.buildinfo
-[WARNING] size mismatch doxia-logging-api-1.9.1.jar: investigate with diffoscope target/reference/doxia-logging-api-1.9.1.jar doxia-logging-api/target/doxia-logging-api-1.9.1.jar
-...
-[WARNING] size mismatch doxia-module-markdown-1.9.1.jar: investigate with diffoscope target/reference/doxia-module-markdown-1.9.1.jar doxia-modules/doxia-module-markdown/target/doxia-module-markdown-1.9.1.jar
-[WARNING] Reproducible Build output summary: 39 files ok, 18 different
-[WARNING] see diff target/reference/doxia-module-markdown-1.9.1.buildinfo doxia-modules/doxia-module-markdown/target/doxia-module-markdown-1.9.1.buildinfo
-[WARNING] see also https://maven.apache.org/guides/mini/guide-reproducible-builds.html
-[INFO] Reproducible Build output comparison saved to /tmp/doxia-1.9.1/doxia-modules/doxia-module-markdown/target/doxia-module-markdown-1.9.1.buildcompare
-[INFO] Aggregate buildcompare copied to /tmp/doxia-1.9.1/target/doxia-1.9.1.buildcompare
+[INFO] Saved aggregate info on build to /tmp/doxia-2.1.0/doxia-modules/doxia-module-markdown/target/doxia-module-markdown-2.1.0.buildinfo
+[INFO] Aggregate buildinfo copied to target/doxia-2.1.0.buildinfo
+[INFO] Checking against reference build from local repository or central...
+Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-markdown/2.1.0/doxia-module-markdown-2.1.0.jar (85 kB at 202 kB/s)
+[INFO] Comparing against 49 reference files from central (https://repo.maven.apache.org/maven2, default, releases)
+[INFO]     reference build java.version: 21 (from MANIFEST.MF Build-Jdk-Spec)
+[INFO]     reference build os.name: Unix (from pom.properties newline)
+[INFO] [Reproducible Builds] rebuild comparison result: 49 files match
+[INFO]                                                  saved to doxia-modules/doxia-module-markdown/target/doxia-module-markdown-2.1.0.buildcompare
+[INFO] Aggregate buildcompare copied to /tmp/doxia-2.1.0/target/doxia-2.1.0.buildcompare
 ```