Mark Mark - 1 year ago 136
Java Question

maven-assembly-plugin and JVM version

is it possibile to create a JAR using the

, setting a specific compiler version?



I meant to say:

Answer Source

You can not really set the compiler version (as maven uses what's installed), but you can configure source and target level on the maven-compiler-plugin:


Edit: As khmarbaise points out in the comments, you can specify a different compiler, if you must, but you will have to set fork to true and specify the path to the executable, which, in the usual case, is not the kind of complication that you'd want. But he's right nonetheless, it's actually possible, and apparently has been since version 2.0 of the maven compiler plugin.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download