pgier/jboss-parent-pom — pull request #1 by aslakknutsen (2011-10-31 14:56:31+00:00)
Title: Add Eclipse/IDE source/target workaround

The difference between 1.5 and 1.6 is minimal on the source level, basically only @Override support on interfaces. @Override on interfaces is a very nice feature to have during development even if the target platform is 1.5 based.

@Override is a compile time annotation and does not effect the compiled bytecode. A Java 1.6 compiler can without problems compile 1.6 source with a target as 1.5

m2Eclipse use the Maven Compiler Plugin settings to set the source/target values in Eclipse. Eclipse on the other hand does not allow source/target to be different, even on a 1.6 vm.

Setting this as two different options works around this problem.

maven.compiler.argument.source = maven.compiler.source
maven.compiler.argument.taret = maven.compiler.target

By default the compiler arguments and the defined source/taret compiler level will be the same, but projects that suffer from this problem, e.g. ShrinkWrap and Arquillian, can configure them to be:

maven.compiler.source = 1.6
maven.compiler.target = 1.6

maven.compiler.argument.source = 1.5
mavne.compiler.argument.taret = 1.5

Now we have one option for setting up Eclipse/IDE and one for the Maven compiler.