[ 
http://jira.codehaus.org/browse/MECLIPSE-172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_114949
 ] 

Nathan Beyer (Cerner) commented on MECLIPSE-172:
------------------------------------------------

Regarding the last few comments:

I don't think reading the workspace preferences would be the best route for 
this plugin, long term. It's difficult to find the workspace and there's 
practical way to configure it in a portable fashion, so you'd have to point to 
it ever time you run 'eclipse:eclipse' and that's a pain. I would suggest 
taking advantage of the inclusion of the OSGi Execution Environment enumeration 
that's included in the JRE management and point to the best matching Execution 
Environment, rather than just the default.

For example:
If the compiler is setup for 1.4, then use this - 
org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4.
If the compiler is setup for 1.5/5, then use this - 
org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5
If the compiler is setup for 1.6/6, then use this - 
org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6
Otherwise use this - 
org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType



> Don't add Default ClasspathContainer if a alternate JRE or a "Execution 
> Environment" is configured as ClasspathContainer.
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MECLIPSE-172
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-172
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2, 2.3
>         Environment: Maven 2.0.4,  Eclipse 3.2.1, Windows XP
>            Reporter: Markus Grieder
>            Assignee: Arnaud Heritier
>             Fix For: 2.5
>
>         Attachments: EclipsePlugin.java.patch, 
> MECLIPSE-172-fix-and-test.patch, org.eclipse.jdt.launching.prefs, patch.txt
>
>
> If have a Eclipse Workspace with Projects where some use Java 1.5 (Default 
> JRE) and some Java 1.3
> For 1.3-Projects i have configured the following ClasspathContainer:
> <classpathContainers>                 
> <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/server_jre</classpathContainer>
> </classpathContainers>
> This generates in ".classpath":
> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
> <classpathentry kind="con" 
> path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/server_jre"/>
> Which is wrong, because the Default JRE is Java 1.5, but the Project should 
> only see Java 1.3-Libraries and not both.
> -> The Default ClasspathContainer should only be added if no JRE_CONTAINER 
> (alternate JRE or a Execution Environment (>=Eclipse 3.2)) was specified. The 
> attached Patch replace the "contains"-match with a "starts-with"-match, which 
> only adds the Default ClasspathContainer if no classpathContainer is 
> configured which starts with the "JRE_CONTAINER"-Path.

-- 
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

        

Reply via email to