Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1, 2.1.1, 2.1.2, 2.2
-
Fix Version/s: 2.2
-
Labels:None
-
Patch Submitted:Yes
-
Number of attachments :
Description
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.
Issue Links
- is duplicated by
-
MSOURCES-56
Parameter to skip the generation of the sources jar
-
-
MSOURCES-51
Disable source plugin in derived pom
-
Patch for it:
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 ); }