Executable .jar, with onejar-maven-plugin

Hugo Josefson

Onejar-maven-plugin collects your application including dependencies, into one executable jar. It’s both easy and works well!

(UPDATED for version 1.3.0. See below.)

It lets all your dependency jars stay jars, and your code is in its own jar. All of those jars are put in a bigger jar, which is made executable.

Configuration

It may sound weird, but it’s quite elegant! Just put this in your pom.xml’s <plugins> tag to make it work:[...]

Tags: , , , , , , ,

Executable .war with winstone-maven-plugin

Hugo Josefson

You don’t need to install Tomcat, JBoss or any other web server in order to run a Java web application (.war file)!
If your project is configured with a Maven pom.xml and the module has <packaging>war</packaging>, you can just add this little piece of XML inside the pom’s <plugins> tag:
<plugin>
<groupId>net.sf.alchim</groupId>
[...]

Tags: , , , ,