Maven Compiler Plugin
Compiling With a Different JDK
- http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html
- http://docs.codehaus.org/display/MAVENUSER/Compile+and+Test+with+Different+JDK+Versions
- http://www.nabble.com/Using-alternative-JDK-t3299539s177.html
- Maven Surefire pom.xml has an example of using JDK 1.3 in a profile
Separate configuration for test-compile and compile phases
With Maven 2.0.x it is not possible to configure the compiler plugin separately for the test-compile and compile phases. (Confirmed with 2.0.8)
This is expected to change with Maven 2.1.
Labels

2 Comments
Hide/Show CommentsMar 13, 2007
Henri Yandell
The bootclasspath approach is pretty crappy as it only works on particular JVMs. You lose the ability to build on OS X for one.
Sep 22, 2011
Narendra Gupta
I have following directory jave source code directory structure
--lion
--com
-test1-> contains pom.xml and java source code with package com.test1
-test2 -> contains pom.cml and java source code with pakage com.test2
when compiler plugin compiles it does directory scanning and compiles only java code that are modified from previous build. But In above directory structure case it is recompiles the all source code in subsequent builds. How to overcome this ? I found that it is because of basedirectory do not follow maven standard direcotry layout. Please advise.
Thanks,
Narendra Gupta