Laurent Hinoul

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - John F. Woods

How to create a vertx fat-jar with maven

If you use Vertx, It could be helpful to create a jar or war where Vertx is included. If you use maven. You can add the following code in your pom.xml:

If you integrated Spring, you need to add extra transformers. You can use the following code in your pom.xml for that:

Don’t forget to change ‘com.laurenthinoul….ApplicationMainClass’ to your own Main class!

Now if you perform a maven install, maven will create a jar named: applicationname-version-far.jar. So for example something like testapp-1.0.0-fat.jar.

Leave a Reply

%d bloggers like this: