Sometimes, you do not have the option to deploy to an applicationserver, and it is necessary to release a single stand-alone jar.
For this, we can use the excellent one-jar code, or, the maven one-jar plugin.
A simple link to the documentation should suffice. It is exactly what you want as it supports it's own classpath, ensuring that multiple files can exist with the same name (of course, it'll warn you about that, but).
It's much better then the normal maven assembly plugin, as it gives all sorts of problems.
You can then use the normal java -jar myOneJar.jar to start your program.
Of course, if you're allowed to use maven, you can let maven set up the classpath for you... But that will be in a different post.
For this, we can use the excellent one-jar code, or, the maven one-jar plugin.
A simple link to the documentation should suffice. It is exactly what you want as it supports it's own classpath, ensuring that multiple files can exist with the same name (of course, it'll warn you about that, but).
It's much better then the normal maven assembly plugin, as it gives all sorts of problems.
You can then use the normal java -jar myOneJar.jar to start your program.
Of course, if you're allowed to use maven, you can let maven set up the classpath for you... But that will be in a different post.
Reacties
Een reactie posten