Issue Details (XML | Word | Printable)

Key: MPECLIPSE-100
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Ken Weiner
Votes: 5
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Maven 1.x Eclipse Plugin

No ability to configure the JRE specified in generated .classpath file

Created: 30/Aug/05 09:31 PM   Updated: 30/Aug/05 09:31 PM
Component/s: None
Affects Version/s: 1.9
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Text File eclipse-plugin-patch.txt (3 kB)



 Description  « Hide
The generated .classpath file always sets the JRE to the default JRE in Eclipse as follows:

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>

There needs to be a way to override this so one can specify an alternate like so:

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/sun-jdk-1.4.2.08"/>

In this case, the eclipse project would use the jdk that the user named "sun-jdk-1.4.2.08".

An easy way to fix this is to remove the hard-coded setting in plugin.jelly and, instead, make "org.eclipse.jdt.launching.JRE_CONTAINER" the default value of the "maven.eclipse.conclasspath" property. Then in plugin.jelly, the <classpathentry kind="con" path="..."/> would always be generated with a path equal to org.eclipse.jdt.launching.JRE_CONTAINER unless the property was overriden.

Carlos Sanchez helped me produce the patch.

An alternate fix would be to make a new property called something like "maven.eclipse.jre" which would have a value like "sun-jdk-1.4.2.08" in which case plugin.jelly would generate:

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/sun-jdk-1.4.2.08"/>

instead of

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>

Attached are patches.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.