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 2022/03/30 06:46:17 UTC
[maven-artifact-plugin] branch MARTIFACT-24 updated: display pom.xml location in case of failure to ease fixing
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch MARTIFACT-24
in repository https://gitbox.apache.org/repos/asf/maven-artifact-plugin.git
The following commit(s) were added to refs/heads/MARTIFACT-24 by this push:
new 46aa60d display pom.xml location in case of failure to ease fixing
46aa60d is described below
commit 46aa60db5777b0b7621225049da0f7f9c8400202
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Wed Mar 30 08:46:15 2022 +0200
display pom.xml location in case of failure to ease fixing
---
.../maven/plugins/artifact/buildinfo/CheckBuildPlanMojo.java | 12 +++++++++---
.../artifact/buildinfo/not-reproducible-plugins.properties | 1 +
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/artifact/buildinfo/CheckBuildPlanMojo.java b/src/main/java/org/apache/maven/plugins/artifact/buildinfo/CheckBuildPlanMojo.java
index 92d22e0..5c65ed2 100644
--- a/src/main/java/org/apache/maven/plugins/artifact/buildinfo/CheckBuildPlanMojo.java
+++ b/src/main/java/org/apache/maven/plugins/artifact/buildinfo/CheckBuildPlanMojo.java
@@ -29,7 +29,6 @@ import java.util.Set;
import org.apache.maven.artifact.versioning.ArtifactVersion;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import org.apache.maven.execution.MavenSession;
-import org.apache.maven.lifecycle.DefaultLifecycles;
import org.apache.maven.lifecycle.LifecycleExecutor;
import org.apache.maven.lifecycle.MavenExecutionPlan;
import org.apache.maven.model.Plugin;
@@ -39,6 +38,7 @@ import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProject;
/**
* Check from buildplan that plugins used don't have know reproducible builds issues.
@@ -47,8 +47,8 @@ import org.apache.maven.plugins.annotations.Parameter;
public class CheckBuildPlanMojo
extends AbstractMojo
{
- @Component( role = DefaultLifecycles.class )
- DefaultLifecycles defaultLifecycles;
+ @Parameter( defaultValue = "${project}", readonly = true )
+ private MavenProject project;
@Parameter( defaultValue = "${session}", readonly = true )
private MavenSession session;
@@ -119,6 +119,12 @@ public class CheckBuildPlanMojo
if ( fail )
{
+ getLog().info( "current module pom.xml is " + project.getBasedir() + "/pom.xml" );
+ MavenProject parent = project;
+ while ( ( parent = parent.getParent() ) != null )
+ {
+ getLog().info( " parent pom.xml is " + parent.getBasedir() + "/pom.xml" );
+ }
throw new MojoExecutionException( "plugin with non-reproducible output found with fix available" );
}
}
diff --git a/src/main/resources/org/apache/maven/plugins/artifact/buildinfo/not-reproducible-plugins.properties b/src/main/resources/org/apache/maven/plugins/artifact/buildinfo/not-reproducible-plugins.properties
index 7cd7316..2a57218 100644
--- a/src/main/resources/org/apache/maven/plugins/artifact/buildinfo/not-reproducible-plugins.properties
+++ b/src/main/resources/org/apache/maven/plugins/artifact/buildinfo/not-reproducible-plugins.properties
@@ -36,5 +36,6 @@ org.codehaus.mojo+flatten-maven-plugin=fail:https://github.com/mojohaus/flatten-
org.eclipse.sisu+sisu-maven-plugin=0.3.4
org.springframework.boot+springboot-maven-plugin=2.3.0-M4
+org.vafer+jdeb=1.9
org.jboss.jandex+jandex-maven-plugin=fail:https://github.com/wildfly/jandex-maven-plugin/pull/35