You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "John Ross (JIRA)" <ji...@apache.org> on 2015/08/20 20:19:45 UTC

[jira] [Commented] (ARIES-1338) Bundle manifest parser does not allow multiple packages on Import-Package clause

    [ https://issues.apache.org/jira/browse/ARIES-1338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14705474#comment-14705474 ] 

John Ross commented on ARIES-1338:
----------------------------------

Throwing that exception was deliberate because the osgi.wiring.package requirement syntax does not support more than one package name. However, I don't see any reason why the header syntax can't be split up into multiple requirements.

> Bundle manifest parser does not allow multiple packages on Import-Package clause
> --------------------------------------------------------------------------------
>
>                 Key: ARIES-1338
>                 URL: https://issues.apache.org/jira/browse/ARIES-1338
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>    Affects Versions: subsystem-core-1.2.0
>            Reporter: Samuel Bratton
>            Priority: Minor
>
> Parsing a bundle manifest fails on Import-Package if a clause contains more than one target (package) for example, this syntax fails:
> Import-package: org.apache.p1; org.apache.p2; vendor="Apache"
> When the bundle with  above manifest appears as content in an esa, an exception is thrown:
> java.lang.IllegalArgumentException: Only one package name per requirement allowed
>    at org.apache.aries.subsystem.core.archive.ImportPackageRequirement.<init>(ImportPackageRequirement.java:39)
>    at org.apache.aries.subsystem.core.archive.ImportPackageHeader$Clause.toRequirement(ImportPackageHeader.java:159)
>    at org.apache.aries.subsystem.core.archive.ImportPackageHeader.toRequirements(ImportPackageHeader.java:218)
>    at org.apache.aries.subsystem.core.internal.BundleResource.computeOsgiWiringPackageRequirements(BundleResource.java:182)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)