MarioNote

December 15, 2012

Maven command to attach source and javadoc

Filed under: Java — mariojump @ 8:23 am

The steps to have Maven attach source and Javadoc files are as follows.

First, edit pom.xml as shown in:

http://maven.apache.org/plugin-developers/cookbook/attach-source-javadoc-artifacts.html

Then, run:

mvn package

December 1, 2012

Maven command to generate a jar file that includes dependencies

Filed under: Java — mariojump @ 8:12 pm
Here is a Maven command to generate a jar file that includes dependencies.
mvn assembly:assembly -DdescriptorId=jar-with-dependencies

According to the Maven documentation, assembly:assembly is deprecated, though.

https://maven.apache.org/plugins/maven-assembly-plugin/plugin-info.html

Create a free website or blog at WordPress.com.