[ 
https://issues.apache.org/jira/browse/FELIX-423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stuart McCulloch resolved FELIX-423.
------------------------------------

    Resolution: Fixed

Made a couple of fixes to PathFile in the OBR code - it now encodes spaces on 
all platforms (previously just did this on Windows) and changed it so it 
returns the absolute path when it can't remove the base directory from an 
existing absolute pathname, which should avoid any bogus "null" strings (the 
only places that use "getOnlyRelativeFilename" never check the return value).

The discrepancy between "C:\Documents and Settings" and 
"C:\Documents%20and%20Settings" has been fixed by adding a workaround to the 
bundle plugin code, which was passing an encoded URI - the OBR code appears to 
expects a decoded URI string with either "file" or "http" scheme (but afaict 
this isn't clearly documented)

A lot of the PathFile code (and other checks in the OBR code) could probably be 
removed by using the standard Java API along with the Plexus FileUtils / 
PathUtils / StringUtils utility classes to handle file paths and URIs. This 
would also make the code much clearer.

> Incorrect URI generated in repository.xml when path contains spaces
> -------------------------------------------------------------------
>
>                 Key: FELIX-423
>                 URL: https://issues.apache.org/jira/browse/FELIX-423
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven OBR Plugin
>            Reporter: Rajini Sivaram
>            Assignee: Stuart McCulloch
>
> I am using maven-bundle-plugin to create bundles and add entries to 
> repository.xml, using the default repository file, which is "C:\Documents and 
> Settings\Administrator\.m2\repository\repository.xml". The URIs generated 
> start with 'null' instead of a relative path. The code in maven-obr-plugin 
> which determines the relative path segment to generate this URI seems to be 
> comparing "C:\Documents and Settings" against 
> "C:\Documents%20and%20Settings", and returns null since these dont match. I 
> am using maven-bundle-plugin version 1.1.0-SNAPSHOT.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to