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

URL for javadoc attachments on Unix is invalid

Attach filesAttach ScreenshotVotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4
    • 2.5
    • None
    • None
    • Unix, Eclipse 3.3
    • Patch

    Description

      Currently, the plugin constructs the URL for the javadoc attachment via

      "jar:file:/" + javadocpath + "!/"
      

      Now, consider a unix path like "/home/me/.m2/<snip>.jar". This will produce the URL "jar:file://home/me/.m2/<snip>.jar!/". Note the double slash after "file:" which will cause "home" to be parsed as a hostname instead of a directory. This misinterpretation makes Eclipse fail to access the javadocs. Acceptable URLs would either be "jar:file:/home/..." or "jar:file:///home/...".

      The simple solution is to use java.io.File.toURI() for this job. This method will not only properly handle slashes but also care for encoding of characters that may appear in filesystem paths but are illegal in URLs (most prominently spaces).

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            aheritier Arnaud Heritier
            bentmann Benjamin Bentmann
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment