You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicemix.apache.org by "Christoph Läubrich (Jira)" <ji...@apache.org> on 2021/04/15 04:29:00 UTC
[jira] [Created] (SM-4728) Wrong version in Eclipse-SourceBundle
header
Christoph Läubrich created SM-4728:
--------------------------------------
Summary: Wrong version in Eclipse-SourceBundle header
Key: SM-4728
URL: https://issues.apache.org/jira/browse/SM-4728
Project: ServiceMix
Issue Type: Bug
Reporter: Christoph Läubrich
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)