Author: bdemers Date: Wed Sep 22 14:56:52 2010 New Revision: 1000015 URL: http://svn.apache.org/viewvc?rev=1000015&view=rev Log: MSOURCES-55, applying patch, this makes the sources plugin act similar to other plugins such as javadoc.
Modified: maven/plugins/trunk/maven-source-plugin/pom.xml maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractSourceJarMojo.java Modified: maven/plugins/trunk/maven-source-plugin/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/pom.xml?rev=1000015&r1=1000014&r2=1000015&view=diff ============================================================================== --- maven/plugins/trunk/maven-source-plugin/pom.xml (original) +++ maven/plugins/trunk/maven-source-plugin/pom.xml Wed Sep 22 14:56:52 2010 @@ -39,6 +39,15 @@ under the License. <maven>2.0.6</maven> </prerequisites> + <contributors> + <contributor> + <name>Marvin Froeder</name> + <email>velo...@gmail.com</email> + <roles> + <role>MSOURCES-55</role> + </roles> + </contributor> + </contributors> <scm> <connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-source-plugin/</connection> <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-source-plugin/</developerConnection> Modified: maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractSourceJarMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractSourceJarMojo.java?rev=1000015&r1=1000014&r2=1000015&view=diff ============================================================================== --- maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractSourceJarMojo.java (original) +++ maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractSourceJarMojo.java Wed Sep 22 14:56:52 2010 @@ -190,6 +190,15 @@ public abstract class AbstractSourceJarM */ private boolean forceCreation; + /** + * A flag used to disable the source procedure. This is primarily intended for usage from the command line to + * occasionally adjust the build. + * + * @parameter expression="${source.skip}" default-value="false" + * @since 1.4 + */ + private boolean skipSource; + // ---------------------------------------------------------------------- // Public methods // ---------------------------------------------------------------------- @@ -198,6 +207,12 @@ public abstract class AbstractSourceJarM public void execute() throws MojoExecutionException { + if ( skipSource ) + { + getLog().info( "Skipping source per configuration." ); + return; + } + packageSources( project ); }