You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2008/03/13 13:51:28 UTC

[jira] Updated: (MECLIPSE-399) URL for javadoc attachments on Unix is invalid

     [ http://jira.codehaus.org/browse/MECLIPSE-399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MECLIPSE-399:
---------------------------------------

    Priority: Minor  (was: Trivial)

> URL for javadoc attachments on Unix is invalid
> ----------------------------------------------
>
>                 Key: MECLIPSE-399
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-399
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4
>         Environment: Unix, Eclipse 3.3
>            Reporter: Benjamin Bentmann
>            Priority: Minor
>         Attachments: javadoc-file-uri.patch
>
>
> Currently, the plugin constructs the URL for the javadoc attachment via
> {code:java}
> "jar:file:/" + javadocpath + "!/"
> {code}
> 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()|http://java.sun.com/javase/6/docs/api/java/io/File.html#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).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira