Maven 1.x Eclipse Plugin
  1. Maven 1.x Eclipse Plugin
  2. MPECLIPSE-100

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

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.9
    • Fix Version/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

        Hide
        Michael Osipov added a comment -

        Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

        Show
        Michael Osipov added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ken Weiner
          • Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: