Maven cheatsheet

Just a place for me to store handy bits and pieces. Having not used it for awhile to remind of things, I’ll likely to forget !

How to compile to different versions of Java ( see also https://mkyong.com/maven/maven-error-invalid-target-release-1-11/ )

In the <build> section

How to change the output/target dir

Handy if you want to drop a war straight into tomcat deploy directory for example.

In the <build> section

 

Change the name of war file thats outputedĀ 

In the <build> section

 

An full example that does the 3 things above (in a web app using JavaEE not Spring):

 

 

 

 

 

 

Leave a Comment