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

Jean-Baptiste Onofré updated SM-4728:
-------------------------------------
    Component/s: bundles

> Wrong version in Eclipse-SourceBundle header
> --------------------------------------------
>
>                 Key: SM-4728
>                 URL: https://issues.apache.org/jira/browse/SM-4728
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: bundles
>            Reporter: Christoph Läubrich
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>
> If I download a source bundle that has an underscore in its version, eclipse 
> complains about invalid version String
> Example: 
> https://repo1.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.junit/4.13_1/org.apache.servicemix.bundles.junit-4.13_1-sources.jar
> {noformat}
> !MESSAGE Problem processing bundle manifest source header in plug-in Apache 
> ServiceMix :: Bundles :: junit version 4.13_1
> !STACK 0
> java.lang.IllegalArgumentException: invalid version "4.13_1": non-numeric 
> "13_1"
>       at org.osgi.framework.Version.parseInt(Version.java:169)
>       at org.osgi.framework.Version.<init>(Version.java:130)
>       at 
> org.eclipse.pde.internal.core.BundleManifestSourceLocationManager.setPlugins(BundleManifestSourceLocationManager.java:221)
>       at 
> org.eclipse.pde.internal.core.SourceLocationManager.initializeBundleManifestLocations(SourceLocationManager.java:414)
>       at 
> org.eclipse.pde.internal.core.SourceLocationManager.getBundleManifestLocator(SourceLocationManager.java:240)
>       at 
> org.eclipse.pde.internal.core.SourceLocationManager.getBundleManifestLocation(SourceLocationManager.java:232)
>       at 
> org.eclipse.pde.internal.core.SourceLocationManager.searchBundleManifestLocations(SourceLocationManager.java:316)
>       at 
> org.eclipse.pde.internal.core.SourceLocationManager.findSourcePath(SourceLocationManager.java:75)
>       at 
> org.eclipse.pde.internal.core.ClasspathUtilCore.getSourceAnnotation(ClasspathUtilCore.java:189)
> {noformat}
> It seems that version cleanup macro should be used in the BND file before 
> create the header:
> https://bnd.bndtools.org/macros/version_cleanup.html



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to