You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Marvin Froeder (JIRA)" <ji...@codehaus.org> on 2010/09/21 15:48:33 UTC
[jira] Commented: (MSOURCES-55) Add a skip configuration to source
plugin
[ http://jira.codehaus.org/browse/MSOURCES-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235932#action_235932 ]
Marvin Froeder commented on MSOURCES-55:
----------------------------------------
Patch for it:
{code:java}
Index: pom.xml
===================================================================
--- pom.xml (revision 999411)
+++ pom.xml (working copy)
@@ -39,6 +39,15 @@
<maven>2.0.6</maven>
</prerequisites>
+ <contributors>
+ <contributor>
+ <name>Marvin Froeder</name>
+ <email>velo.br@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>
Index: src/main/java/org/apache/maven/plugin/source/AbstractSourceJarMojo.java
===================================================================
--- src/main/java/org/apache/maven/plugin/source/AbstractSourceJarMojo.java (revision 999411)
+++ src/main/java/org/apache/maven/plugin/source/AbstractSourceJarMojo.java (working copy)
@@ -190,6 +190,15 @@
*/
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 void execute()
throws MojoExecutionException
{
+ if ( skipSource )
+ {
+ getLog().info( "Skipping source per configuration." );
+ return;
+ }
+
packageSources( project );
}
{code}
> Add a skip configuration to source plugin
> -----------------------------------------
>
> Key: MSOURCES-55
> URL: http://jira.codehaus.org/browse/MSOURCES-55
> Project: Maven 2.x Source Plugin
> Issue Type: New Feature
> Affects Versions: 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1, 2.1.1, 2.1.2, 2.2
> Reporter: Marvin Froeder
>
> Add a configuration that allow me to programmatically skip source plugin execution. This is mainly intended to be used from commandLine as a way to tweak/speed up the build.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira