Hi, If I understand it right, the jar produce by the maven-source-plugin can be customized via https://maven.apache.org/plugins/maven-source-plugin/jar-no-fork-mojo.html#archive
Predefined assembly descriptors files may be worth looking at, src and project in particular. http://maven.apache.org/components/plugins/maven-assembly-plugin/descriptor-refs.html#src Also http://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html#excludes could be interesting. On Fri, Apr 10, 2015 at 4:33 AM, Dan Tran <dant...@gmail.com> wrote: > truezip-maven-plugin can insert files into existing jar on the fly > > -d > > On Thu, Apr 9, 2015 at 4:42 PM, Gribnau, Phillip <pgrib...@informatica.com > > > wrote: > > > Hi Everyone, > > > > Say I have a maven project that produces 2 jars called project.jar and > > project-sources.jar. I have a requirement where a file needs to be > included > > in project-sources.jar and NOT included in project.jar. Is there a way to > > accomplish this with current maven functionality or plugins? > > > > I have a custom maven plugin available to me that reads a > build.properties > > to add files into the jar using MavenProject.addCompileSourceRoot(String > > path), however this adds the file to both project.jar and > > project-sources.jar. After looking through some maven API's and source > code > > I could not find a way to accomplish this. If there are some methods > > available as part of the public maven API that would also work. > > > > Is there an existing plugin or public API that can help accomplish adding > > a file into project-sources.jar but NOT project.jar? > > > > I am using Maven 3.2.5. > > > > Thanks, > > Phillip > > > -- Adrien Rivard