Version range in Fragment-Host declaration
------------------------------------------
Key: FELIX-760
URL: https://issues.apache.org/jira/browse/FELIX-760
Project: Felix
Issue Type: Bug
Components: Maven Bundle Plugin
Affects Versions: maven-bundle-plugin-1.4.3
Environment: Maven Bundle Plugin 1.4.3
Apache Felix Bundle Repository 1.2.0
Apache Felix 1.2.1/Eclipse Equinox 3.4.0
Reporter: Dirk Mahler
The catalina coyote bundle in the SpringSource.com bundle repository
(http://www.springsource.com/repository/app/bundle/version/detail?name=com.springsource.org.apache.coyote&version=6.0.16)
specifies a Fragment-Host using a version range (which IMHO is correct):
Fragment-Host: com.springsource.org.apache.catalina;version="[6.0.16, 6.0.16]"
The Maven Bundle Plugin creates an entry in the OBR repository metadata which
contains a capability with a version "[6.0.16, 6.0.16]":
<capability name="fragment">
<p n="host" v="com.springsource.org.apache.catalina"/>
<p n="version" t="version" v="[6.0.16,6.0.16]"/>
</capability>
This cannot be read by the bundle repository plugin resulting in the following
exception:
java.lang.NumberFormatException: For input string: "[6"
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.parseInt(Integer.java:497)
at org.osgi.framework.Version.<init>(Version.java:128)
at
org.apache.felix.bundlerepository.PropertyImpl.convertType(PropertyImpl.java:85)
at
org.apache.felix.bundlerepository.PropertyImpl.setT(PropertyImpl.java:62)
at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.felix.bundlerepository.metadataparser.XmlCommonHandler.startElement(XmlCommonHandler.java:490)
at
org.apache.felix.bundlerepository.metadataparser.kxmlsax.KXml2SAXParser.parseXML(KXml2SAXParser.java:67)
...
PS: is the declaration of a Fragment-Host really a capability? I think it
should be requirement...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.