Oct 10, 2010

Assemble executable JAR with dependencies using Maven

Problem description: As a result of the build process I need following artifacts to be generated and packed into single ZIP archive:
  • JAR with all compiled classes and resources
  • Manifest file with properly configured main class and generated class path
  • all dependencies
This archive could be unpacked and executed with double click on the application jar file or with simple java -jar command.
This problem could be easily solved with Apache Maven build manager.