You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Douglas Corner <dc...@gmu.edu> on 2017/10/30 12:40:16 UTC
Jar with dependencies and sources
This question has been asked before but not quite answered. I would like to create a jar-with-depencencies and also include the sources in the same jar. I seem to be able to either but not both.
This works fine to create the jar with dependencies:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>${project.groupId}.maventest.${project.artifactId}_Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>${project.artifactId}_ALL</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
Adding
<descriptorRef>src</descriptorRef>
Creates a separate set of files, tar.bz2 tar.gz, and .zip with the source
Please respond by email as I don’t subscribe to the list.
Thanks,
=========================================
Douglas Corner
George Mason Universiy
4400 University Drive - MSN: 4B5
Fairfax, VA 22030
Email: dcorner@gmu.edu