Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-984

Invalid relative path in IDEA iml on Windows when user home drive != project drive

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9-rc-3

      Description

      In building the library references in an IDEA .iml (module) file, org.gradle.plugins.idea.model.Path attempts to build a relative path from the project directory to the user's .gradle/cache directory.
      On Windows, when the drive specs of the two paths differ (C: vs. D: ) no relative path can be constructed.

      Example:
      User home directory is c:\Users\userx\.gradle
      Project directory is d:\Projects\MyProject

      Expected outcome:
      Module file should contain library entries of the form:

      <library>
        <CLASSES>
          <root url="jar://c:/Users/userx/.gradle/cache/com.foo/bar/jars/bar-1.0.jar!/"/>
        </CLASSES>
        <JAVADOC/>
        <SOURCES/>
      </library>
      

      Current outcome:
      Module file contains (invalid) relative references:

      <library>
        <CLASSES>
          <root url="jar://$MODULE_DIR$/../../Users/userx/.gradle/cache/com.foo/bar/jars/bar-1.0.jar!/"/>
        </CLASSES>
        <JAVADOC/>
        <SOURCES/>
      </library>
      

        Attachments

          Activity

            People

            Assignee:
            hans_d Hans Dockter
            Reporter:
            brian.j.sanders Brian Sanders
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: