Monday, July 13, 2015

Creating the jar file from POM

Hello Friends, today we are going to see how to create a jar file with the use of Maven.

Here I am providing you the basic setup of creating the jar file from Maven(POM).

Open your pom.xml file and attach the following code in the field named <build>.

            <mainClass>Name of the main class, with full package details</mainClass>

Now when you have to package the project use this:

  • clean compile assembly:single

This will generate the jar in the target folder if using the Eclipse IDE.


No comments:

Post a Comment