I would like to create a ZIP distributable for my java application with Maven with the following structure :
/lib -> my generated jars (several modules core.jar, app.jar … )
/config -> several configuration files (app.properties, …)
/3rdparty -> all jar dependencies (commons-lang.jar, log4j.jar … )
/scripts -> helper scripts (start.sh … )
I would like to deploy this in any client machine and run as :
java -cp ../lib:../3rdparty -Dprop.file=app.properties [main.class]
I have read quite a lot about the maven assembly plugin but have not found a satisfactory answer on how to ahcieve this.
The Maven Assembly plugin is the right thing to use here. There’s plenty of examples on how to use it out there, here are some: