Jar with dependencies and sources

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Jar with dependencies and sources

Douglas Corner
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: [hidden email]