[ 
https://issues.apache.org/jira/browse/FELIX-909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12668783#action_12668783
 ] 

Stuart McCulloch commented on FELIX-909:
----------------------------------------

Yes, that's because Export-Package and Import-Package are OSGi properties that 
are calculated by Bnd itself based on the given instructions, whereas 
Import-Bundle is a non-standard property that Bnd knows nothing about and 
simply copies it across unchanged from the XML content (including whitespace 
contained inside the string). Because it doesn't know anything about the 
structure of Import-Bundle it cannot remove this whitespace - for all Bnd knows 
that whitespace might be important.

But regardless of this point, even if I create a hand-crafted manifest with 
spaces in the Export-Package / Import-Package properties it is _still_ valid 
and can be parsed by OSGi frameworks. So whatever parser you're using to read 
the Import-Bundle property should be made more robust to handle whitespace - 
because otherwise you're going to hit the same problem when a customer uses a 
bundle with a hand-written manifest that has spaces inside Import-Bundle.

> White spaces in the Import-Bundle of theManifest file
> -----------------------------------------------------
>
>                 Key: FELIX-909
>                 URL: https://issues.apache.org/jira/browse/FELIX-909
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-1.4.3
>            Reporter: Boris Burgstaller
>         Attachments: example.txt, patch.txt
>
>
> We are using the Maven Bundle Plugin to generate our bundles and manifests.
> We are using the Import-Bundle  and we noticed that it does not remove the 
> white spaces coming from the xml if you format it like this:
> <Import-Bundle>
>     com.bla.api,
>     com.bla.impl
> </Import-Bundle>
> We deploy some bundles on a springsource dm server, and if the manifest 
> contains whitespaces and newlines, it falis to parse the file.
> could you please remove the white spaces for this property?

-- 
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