From 90281bcb31465797b070651583b46f95554d7d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Boutemy?= Date: Tue, 19 Sep 2023 08:38:39 +0200 Subject: [PATCH] [MARTIFACT-44] improve documentation --- src/it/{flatten => compare-flatten}/invoker.properties | 4 +++- src/it/{flatten => compare-flatten}/modA/pom.xml | 0 src/it/{flatten => compare-flatten}/modB/pom.xml | 0 src/it/{flatten => compare-flatten}/pom.xml | 0 src/it/{flatten => compare-flatten}/verify.groovy | 0 src/it/compare-mono/invoker.properties | 2 ++ .../maven/plugins/artifact/buildinfo/BuildinfoMojo.java | 2 +- .../maven/plugins/artifact/buildinfo/CompareMojo.java | 8 ++++---- src/site/apt/index.apt.vm | 6 +++--- 9 files changed, 13 insertions(+), 9 deletions(-) rename src/it/{flatten => compare-flatten}/invoker.properties (82%) rename src/it/{flatten => compare-flatten}/modA/pom.xml (100%) rename src/it/{flatten => compare-flatten}/modB/pom.xml (100%) rename src/it/{flatten => compare-flatten}/pom.xml (100%) rename src/it/{flatten => compare-flatten}/verify.groovy (100%) diff --git a/src/it/flatten/invoker.properties b/src/it/compare-flatten/invoker.properties similarity index 82% rename from src/it/flatten/invoker.properties rename to src/it/compare-flatten/invoker.properties index 339a145..6350e3b 100644 --- a/src/it/flatten/invoker.properties +++ b/src/it/compare-flatten/invoker.properties @@ -15,5 +15,7 @@ # specific language governing permissions and limitations # under the License. +# initial reference build: install invoker.goals.1=clean install -invoker.goals.2=clean package artifact:compare +# second build: verify (could be package, but not install to avoid overriding reference) +invoker.goals.2=clean verify artifact:compare diff --git a/src/it/flatten/modA/pom.xml b/src/it/compare-flatten/modA/pom.xml similarity index 100% rename from src/it/flatten/modA/pom.xml rename to src/it/compare-flatten/modA/pom.xml diff --git a/src/it/flatten/modB/pom.xml b/src/it/compare-flatten/modB/pom.xml similarity index 100% rename from src/it/flatten/modB/pom.xml rename to src/it/compare-flatten/modB/pom.xml diff --git a/src/it/flatten/pom.xml b/src/it/compare-flatten/pom.xml similarity index 100% rename from src/it/flatten/pom.xml rename to src/it/compare-flatten/pom.xml diff --git a/src/it/flatten/verify.groovy b/src/it/compare-flatten/verify.groovy similarity index 100% rename from src/it/flatten/verify.groovy rename to src/it/compare-flatten/verify.groovy diff --git a/src/it/compare-mono/invoker.properties b/src/it/compare-mono/invoker.properties index fe14eb3..8bd5fc5 100644 --- a/src/it/compare-mono/invoker.properties +++ b/src/it/compare-mono/invoker.properties @@ -15,6 +15,8 @@ # specific language governing permissions and limitations # under the License. +# initial reference build: install invoker.goals.1=clean install +# second build: package (could be verify, but not install to avoid overriding reference) invoker.goals.2=clean package artifact:compare invoker.buildResult.2=failure 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 2d478ae..77c6de0 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 @@ -29,7 +29,7 @@ import org.apache.maven.project.MavenProjectHelper; /** - * Creates a buildinfo file recording build environment and output, as specified in + * Creates a buildinfo file recording build environment and output (from {@code package}), as specified in * Reproducible Builds for the JVM * for mono-module build, and extended for multi-module build. */ diff --git a/src/main/java/org/apache/maven/plugins/artifact/buildinfo/CompareMojo.java b/src/main/java/org/apache/maven/plugins/artifact/buildinfo/CompareMojo.java index df5f00c..aa1880b 100644 --- a/src/main/java/org/apache/maven/plugins/artifact/buildinfo/CompareMojo.java +++ b/src/main/java/org/apache/maven/plugins/artifact/buildinfo/CompareMojo.java @@ -46,8 +46,8 @@ import org.eclipse.aether.repository.RemoteRepository; /** - * Compare current build output with reference either previously installed or downloaded from a remote repository: - * results go to {@code .buildcompare} file. + * Compare current build output (from {@code package}) against reference either previously {@code install}-ed or downloaded from a remote + * repository: comparison results go to {@code .buildcompare} file. * * @since 3.2.0 */ @@ -68,7 +68,7 @@ public class CompareMojo extends AbstractBuildinfoMojo { private String referenceRepo; /** - * Compare aggregate only (ie wait for the last module) or do buildcompare on each module. + * Compare aggregate only (ie wait for the last module) or also compare on each module. * @since 3.2.0 */ @Parameter(property = "compare.aggregate.only", defaultValue = "false") @@ -124,7 +124,7 @@ protected void skip(MavenProject last) throws MojoExecutionException { /** * Check current build result with reference. * - * @artifacts a Map of artifacts added to the build info with their associated property key prefix + * @param artifacts a Map of artifacts added to the build info with their associated property key prefix * (outputs.[#module.].#artifact) * @throws MojoExecutionException */ diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm index f1ff625..f7b73a6 100644 --- a/src/site/apt/index.apt.vm +++ b/src/site/apt/index.apt.vm @@ -32,11 +32,11 @@ ${project.name} * Goals Overview - The Artifact Plugin only has 3 goals currently: + The Artifact Plugin has 3 goals currently: - * {{{./buildinfo-mojo.html}artifact:buildinfo}} records current build results in {{{https://reproducible-builds.org/docs/jvm/}Reproducible Builds buildinfo}} file, + * {{{./buildinfo-mojo.html}artifact:buildinfo}} records current build results (from <<>>) in {{{https://reproducible-builds.org/docs/jvm/}Reproducible Builds buildinfo}} file, - * {{{./compare-mojo.html}artifact:compare}} compares current build output against reference build previously published, + * {{{./compare-mojo.html}artifact:compare}} compares current build output (from <<>>) against reference build previously published, * {{{./check-buildplan-mojo.html}artifact:check-buildplan}} checks the project's buildplan to find if any used {{{./plugin-issues.html}plugin has a known Reproducible Builds issue}}.