You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicemix.apache.org by "Jean-Baptiste Onofré (Jira)" <ji...@apache.org> on 2022/05/27 16:16:00 UTC

[jira] [Resolved] (SM-4728) Wrong version in Eclipse-SourceBundle header

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

Jean-Baptiste Onofré resolved SM-4728.
--------------------------------------
    Fix Version/s: bundles-2022.05
       Resolution: Fixed

> 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
>             Fix For: bundles-2022.05
>
>
> 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.20.7#820007)