[
https://issues.apache.org/jira/browse/MSOURCES-56?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17959431#comment-17959431
]
Matthias Bünger commented on MSOURCES-56:
-----------------------------------------
This project has moved from Jira to GitHub Issues. This issue was migrated to
[apache/maven-source-plugin#82|https://github.com/apache/maven-source-plugin/issues/82].
> Parameter to skip the generation of the sources jar
> ---------------------------------------------------
>
> Key: MSOURCES-56
> URL: https://issues.apache.org/jira/browse/MSOURCES-56
> Project: Maven Source Plugin (Moved to GitHub Issues)
> 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
> Reporter: Dieter König
> Assignee: Olivier Lamy
> Priority: Major
> Fix For: 2.2
>
>
> Generation of sources-jar should be automatically skipped when no sources
> were found.
> ###########
> Just in the same way as javadoc-plugin does!
> ###########
> For example if the sources- (default: src/main/java, configured value should
> be taken into account) and testsources-folder are missing then no sources-jar
> should be generated. Also if the folders are there but no files in that
> folders are available the generation should be skipped.
> In other words: don't generate a sources jar which contains only
> META-INF/MANIFEST.MF with following content:
> Manifest-Version: 1.0
> Archiver-Version: Plexus Archiver
> Created-By: 11.0-b15 (Sun Microsystems Inc.)
> Reason:
> - Generated sources-jar for empty sources is useless
> - Generated sources-jar for empty sources spams the maven repository!
> - Generation of sources-jar "costs" expensive build time
> - explicit skipping of plugin (which is one of the features for 2.2-release)
> is annoying/would be an expensive work as you have to go through all the
> pom's...
> If you are aware of old behaviour (someone could need the useless empty jars)
> then provide the possibility to configure/enable the automatic skip behaviour.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)