On Fri, Apr 24, 2009 at 11:41 AM, Davis Ford <[email protected]> wrote: > Hi, I just enabled all snapshots for plugins, and a side effect of > this was to pull down > org.apache.maven.plugins:maven-eclipse-plugin:2.7-SNAPSHOT version of > eclipse plugin. > > Now, my project breaks in eclipse b/c it sets the JDK to be (I think) > the system default (which is JDK 1.5), but my maven-compiler-plugin > settings in the pom specify 1.6. So maven compiles the sources, and > when I launch the project in eclipse, it throws an error saying the > class version is wrong. > > Nothing very interesting in the config below. This problem did not > exist for me until I just opened up plugin snapshots -- which I think > I'll turn off. This is on: > $ mvn -version > Maven version: 2.0.9 > Java version: 1.6.0_07
It should be setting it to 1.6. Can you check the .classpath file that gets created and look at what kind="con" is defined? (It should be the last entry) It should either be <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> which takes the default JRE defined in eclipse. Check what version that is in the eclipse preferences Java > Installed JREs. or <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> Which will use the Execution Environment bound to JavaSE-1.6 in your eclipse preferences Java > Installed JREs > Execution Environment. I can't find any integration tests for 1.6 specifically but we have ones for J2SE-1.4. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
