You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Wallet (JIRA)" <ji...@codehaus.org> on 2010/06/09 22:57:13 UTC

[jira] Created: (MECLIPSE-658) eclipse:eclipse should specify Execution Environment instead of JRE_CONTAINER

eclipse:eclipse should specify Execution Environment instead of JRE_CONTAINER
-----------------------------------------------------------------------------

                 Key: MECLIPSE-658
                 URL: http://jira.codehaus.org/browse/MECLIPSE-658
             Project: Maven 2.x Eclipse Plugin
          Issue Type: Improvement
          Components: Core : Dependencies resolution and build path (.classpath)
    Affects Versions: 2.8
         Environment: JDK 1.6 and 1.4.2, Maven 2.2.1
            Reporter: Guillaume Wallet


I was migrating a software source code from handcoded Ant to Maven.
The project is a Java 1.4 WebApp.

In order to compile the application, I use the Java 1.4.2 compiler, configuring maven-compiler-plugin as needed, it works fine for Maven.

When I import the project into Eclipse after using eclipse:eclipse, the compiler level is good (1.4) but the runtime library use is the default JRE used in the Workspace : JRE 1.6.0, the bad is that it permit to produce 1.4 bytecode accessing classes and/or methods that appears in later release of the Java Runtime.
In order to compile/execute the project against the 1.4 JRE, I found the Execution Environment which let Eclipse choose the appropriate Runtime and voila! My project compiling against JRE 1.4 runtime (previously added in Eclipse preferences screens)

For the moment, I use the <classpathContainers> configuration to tune the maven-eclipse-plugin but I think that it should look against the compiler level (like it looks for code character encoding) to choose the appropriate Runtime Environment and by default the default installed JRE.
The generated classpath contains :
    org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4
instead of :
    org.eclipse.jdt.launching.JRE_CONTAINER

I can later submit a patch including unit test if you do not have time to investigate.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira