How to create executable jar using maven

Sometimes we need to create executable jar file from a standalone application using maven because you want to put the executable jar file anywhere and just want to run the file to do some operations from command line.



Apache Maven

We need maven compiler plugin to compile the java files

We need maven jar plugin to create a jar file from the application

Putting all together, the entire pom.xml file is given below

That’s all. Thanks for reading.


Software Professional, I am passionate to work on web/enterprise application. For more information please go to about me. You can follow on Twitter. You can be a friend on Facebook or Google Plus or Linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.