Nicholas Williams created MASSEMBLY-649: -------------------------------------------
Summary: Assembly descriptor needs <sourceBinaries> (or similar) to go with <binaries> and <sources> Key: MASSEMBLY-649 URL: https://jira.codehaus.org/browse/MASSEMBLY-649 Project: Maven 2.x Assembly Plugin Issue Type: Improvement Reporter: Nicholas Williams Consider the following project structure: {noformat} - parent - pom.xml - assembly - pom.xml - module1 - pom.xml - module2 - pom.xml - module3 - pom.xml {noformat} As recommended [here|http://maven.apache.org/plugins/maven-assembly-plugin/faq.html#module-binaries], the "assembly" sub-project exists to run the assembly plugin during package phase and depends on module1, module2, and module3 to achieve this. Using {{<moduleSet>/<binaries>}} I can include all of the compiled binaries from module1, module2, and module3 in the assembly. Using {{<moduleSet>/<sources>}} I can likewise include all of the sources, but the problem is that {{<sources>}} actually includes the entire source directories including POM and project files for each module, which is not always desired. Modules 1-3 in this case use the maven-source-plugin to create source binaries ([artifactId]-[version]-sources.jar). I want to include those source JARs in the assembly. However, I cannot do this with {{<moduleSet>}} or with {{<dependencySet>}}. I have to add a {{<fileSet>}} for each module's lone source JAR, like so: {code:xml} <fileSet> <directory>../module1/target</directory> <includes><include>*-sources.jar</include></includes> <outputDirectory>/sources</outputDirectory> </fileSet> <fileSet> <directory>../module2/target</directory> <includes><include>*-sources.jar</include></includes> <outputDirectory>/sources</outputDirectory> </fileSet> <fileSet> <directory>../module3/target</directory> <includes><include>*-sources.jar</include></includes> <outputDirectory>/sources</outputDirectory> </fileSet> {code} This gets tedious with many modules (and really shouldn't be necessary). We either need a {{<sourceBinaries>}} option that works similarly to {{<binaries>}} except on source JARs, or {{<binaries>}} needs to be changed to optionally support source JARs. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira