I'm developing a simple, stand-alone, command line Java application. The project is managed by Maven. I'd like to build a deliverable, which can be copied and run on the client's machine.
I'm using the maven assembly plugin, the desired output is a single zip file containing:
How to describe this in an assembly-descriptor file? I'm having trouble creating my_product.jar into the assembly.
Did you take a look at the predefined assemby jar-with-dependencies
? It should suit your needs.
See this answer for a detailed discussion of creating executable JAR distributions with maven.
The predefined 'jar-with-dependencies' assembly is a joke. The problem had been solved by external assistance and heavy customization of the pom.xml and assembly descriptor.
It seems if you diverge from the standard Java EE/webapp path towards the standalone applications then you have to prepare for extensive maven customizations.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.