Hi Karl-Heinz,

properties for arrays? How would that work?
IMHO not every parameter needs a property. Being able to change some values by commandline could make the result unpredictable. Some values are meant to be set in the pom.xml and never be changed again.

regards,
Robert

Op Tue, 03 Nov 2015 21:43:11 +0100 schreef <[email protected]>:

Author: khmarbaise
Date: Tue Nov  3 20:43:11 2015
New Revision: 1712402

URL: http://svn.apache.org/viewvc?rev=1712402&view=rev
Log:
[MSOURCES-91] Added several properties for parameters

Modified:
    
maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java

Modified: maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java?rev=1712402&r1=1712401&r2=1712402&view=diff
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java (original) +++ maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugins/source/AbstractSourceJarMojo.java Tue Nov 3 20:43:11 2015
@@ -61,7 +61,7 @@ public abstract class AbstractSourceJarM
      *
      * @since 2.1
      */
-    @Parameter
+    @Parameter( property = "maven.source.includes" )
     private String[] includes;
    /**
@@ -70,7 +70,7 @@ public abstract class AbstractSourceJarM
      *
      * @since 2.1
      */
-    @Parameter
+    @Parameter( property = "maven.source.excludes" )
     private String[] excludes;
    /**
@@ -79,7 +79,7 @@ public abstract class AbstractSourceJarM
      *
      * @since 2.1
      */
-    @Parameter( defaultValue = "true" )
+ @Parameter( property = "maven.source.useDefaultExcludes", defaultValue = "true" )
     private boolean useDefaultExcludes;
    /**
@@ -119,7 +119,7 @@ public abstract class AbstractSourceJarM
      *
      * @since 2.1
      */
-    @Parameter( defaultValue = "false" )
+ @Parameter( property = "maven.source.useDefaultManifestFile", defaultValue = "false" )
     private boolean useDefaultManifestFile;
    /**
@@ -154,14 +154,14 @@ public abstract class AbstractSourceJarM
     /**
      * The directory where the generated archive file will be put.
      */
-    @Parameter( defaultValue = "${project.build.directory}" )
+ @Parameter( property = "maven.source.outputDirectory", defaultValue = "${project.build.directory}" )
     protected File outputDirectory;
    /**
* The filename to be used for the generated archive file. For the source:jar goal, "-sources" is appended to this * filename. For the source:test-jar goal, "-test-sources" is appended.
      */
-    @Parameter( defaultValue = "${project.build.finalName}" )
+ @Parameter( property = "maven.source.finalName", defaultValue = "${project.build.finalName}" )
     protected String finalName;
    /**
@@ -411,7 +411,7 @@ public abstract class AbstractSourceJarM
     {
         try
         {
-//            archiver.addFileSet( fileSet );
+            // archiver.addFileSet( fileSet );
archiver.addDirectory( sourceDirectory, includes, excludes );
         }
         catch ( ArchiverException e )


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to