No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download

Maven Java 9

Different ways to build projects on Java 9 with Maven. The goal is to be able to simply run mvn clean install and then launch the resulting JAR with java -jar target/demo-java-9.jar.

Some approaches are more intrusive, others more brittle - have a look at the individual solutions for a small discussion of its pros and cons.

💥 Compiler Arguments 💥

In case you're trying to use some of the new command line options like --add-modules, be aware that the following doesn't work:

			<arg>--add-modules java.xml.bind</arg>

With this configuration I got errors like the following:

[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] javac: invalid flag: --add-modules java.xml.bind
Usage: javac <options> <source files>
use --help for a list of possible options

Apparently it's common knowledge that <arg> will put arguments that contain a space into quotes before passing them, so I had to do the following instead:


Obvious, right? 🤔