Uploaded image for project: 'Maven Eclipse Plugin (RETIRED)'
  1. Maven Eclipse Plugin (RETIRED)
  2. MECLIPSE-583

Add config parameter to allow use of M2_REPO variable in Javadoc path in .classpath

    XMLWordPrintableJSON

Details

    Description

      Currently there is no way to configure the plugin to force the use of the M2_REPO variable in the Javadoc location that is generated in the .classpath file. Is it possible to add a config parameter that allows this?

      According to the comments in EclipseClasspathWriter.java the full path is used because Eclipse 3.1 does not allow variables in the Javadoc path. So rather than using the M2_REPO variable, it generates the full path to the local repository (see line 518 in EclipseClasspathWriter.java in the maven-eclipse-plugin-2.7 tag in SVN).

      This results in entries in the .classpath file like this:

      <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4-sources.jar">
      <attributes>
      <attribute value="jar:file:/C:/Documents%20and%20Settings/shane/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4-javadoc.jar!/" name="javadoc_location"/>
      </attributes>
      </classpathentry>

      Considering that newer versions of Eclipse do allow variables in the Javadoc location attribute, can we add a config parameter that allows the variable to be used which would result in the attribute being generated like so:

      <attribute value="jar:file:/M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4-javadoc.jar!/" name="javadoc_location"/>

      The default behavior can remain as is if backwards compatibility with Eclipse 3.1 is an issue.

      Attachments

        Activity

          People

            Unassigned Unassigned
            shane_a_bell Shane Bell
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: