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

Jean-Baptiste Onofré commented on SM-4728:
------------------------------------------

{{Bundle-Version}} is OK in the "main" artifact: {{Bundle-Version: 4.13.0.1}}

The problem is specific to eclipse and source artifact where the 
{{Eclipse-SourceBundle}} header contains 
{{org.apache.servicemix.bundles.junit;version="4.13_1"}}.

I'm fixing on bundle-pom, but I won't do a full release of all bundles, so, it 
will be fixed for new bundles.

If you wanna some specific bundles to be fixed, please let me know.

> 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