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/04/02 13:39:31 UTC

[maven-artifact-plugin] branch MARTIFACT-24 updated: [MARTIFACT-24] add check.plugin-issues parameter to override default

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 da67220  [MARTIFACT-24] add check.plugin-issues parameter to override default
da67220 is described below

commit da67220ee3b33dc9211ab958322f49a54778fe7f
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sat Apr 2 15:39:29 2022 +0200

    [MARTIFACT-24] add check.plugin-issues parameter to override default
---
 .../plugins/artifact/buildinfo/CheckBuildPlanMojo.java    | 15 ++++++++++++---
 1 file changed, 12 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 983563e..94e8362 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
@@ -19,6 +19,8 @@ package org.apache.maven.plugins.artifact.buildinfo;
  * under the License.
  */
 
+import java.io.File;
+import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.text.SimpleDateFormat;
@@ -66,7 +68,7 @@ public class CheckBuildPlanMojo
     private LifecycleExecutor lifecycleExecutor;
 
     /** Allow to specify which goals/phases will be used to calculate execution plan. */
-    @Parameter( property = "buildplan.tasks", defaultValue = "deploy" )
+    @Parameter( property = "check.buildplan.tasks", defaultValue = "deploy" )
     private String[] tasks;
 
     /**
@@ -77,6 +79,12 @@ public class CheckBuildPlanMojo
     @Parameter( defaultValue = "${project.build.outputTimestamp}" )
     private String outputTimestamp;
 
+    /**
+     * Provide a plugin issues property file to override plugin's <code>not-reproducible-plugins.properties</code>.
+     */
+    @Parameter( property = "check.plugin-issues" )
+    private File pluginIssues;
+
     protected MavenExecutionPlan calculateExecutionPlan()
         throws MojoExecutionException
     {
@@ -194,8 +202,9 @@ public class CheckBuildPlanMojo
     private Properties loadIssues()
         throws MojoExecutionException
     {
-        // TODO add issues source override, that downloads from GitHub (disabled by default)
-        try ( InputStream in = getClass().getResourceAsStream( "not-reproducible-plugins.properties" ) )
+        try ( InputStream in =
+            ( pluginIssues == null ) ? getClass().getResourceAsStream( "not-reproducible-plugins.properties" )
+                            : new FileInputStream( pluginIssues ) )
         {
             Properties prop = new Properties();
             prop.load( in );