Maven 1.x Eclipse Plugin

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

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.9
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

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.

Activity

There are no comments yet on this issue.

People

Vote (5)
Watch (4)

Dates

  • Created:
    Updated: