karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (KARAF-5324) Versions are not cleaned anymore when creating version ranges
Date Tue, 29 Aug 2017 11:36:00 GMT

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

Guillaume Nodet reassigned KARAF-5324:
--------------------------------------

    Assignee: Guillaume Nodet

> Versions are not cleaned anymore when creating version ranges
> -------------------------------------------------------------
>
>                 Key: KARAF-5324
>                 URL: https://issues.apache.org/jira/browse/KARAF-5324
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-feature
>    Affects Versions: 4.2.0
>            Reporter: John Poth
>            Assignee: Guillaume Nodet
>
> This was reproduced when creating a custom distribution which had the 'camel-core/2.20.0-SNAPSHOT'
as a feature dependency. Below is the stacktrace:
> {code}
> Caused by: java.lang.IllegalArgumentException: invalid version "2.20.0-SNAPSHOT": non-numeric
"0-SNAPSHOT"
>         at org.osgi.framework.Version.parseInt(Version.java:170)
>         at org.osgi.framework.Version.<init>(Version.java:134)
>         at org.apache.karaf.features.internal.service.FeatureReq.exactVersion(FeatureReq.java:173)
>         at org.apache.karaf.features.internal.service.FeatureReq.range(FeatureReq.java:168)
>         at org.apache.karaf.features.internal.service.FeatureReq.<init>(FeatureReq.java:74)
>         at org.apache.karaf.profile.assembly.FeatureSelector.getMatching(FeatureSelector.java:77)
>         at org.apache.karaf.profile.assembly.FeatureSelector.addFeatures(FeatureSelector.java:59)
>         at org.apache.karaf.profile.assembly.FeatureSelector.addFeatures(FeatureSelector.java:66)
>         at org.apache.karaf.profile.assembly.FeatureSelector.addFeatures(FeatureSelector.java:66)
>         at org.apache.karaf.profile.assembly.FeatureSelector.getMatching(FeatureSelector.java:53)
>         at org.apache.karaf.profile.assembly.Builder.bootStage(Builder.java:878)
>         at org.apache.karaf.profile.assembly.Builder.doGenerateAssembly(Builder.java:673)
>         at org.apache.karaf.profile.assembly.Builder.generateAssembly(Builder.java:446)
>         at org.apache.karaf.tooling.AssemblyMojo.doExecute(AssemblyMojo.java:521)
>         at org.apache.karaf.tooling.AssemblyMojo.execute(AssemblyMojo.java:277)
>         ... 22 more
> Caused by: java.lang.NumberFormatException: For input string: "0-SNAPSHOT"
>         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>         at java.lang.Integer.parseInt(Integer.java:580)
>         at java.lang.Integer.parseInt(Integer.java:615)
>         at org.osgi.framework.Version.parseInt(Version.java:168)
>         ... 36 more
> {code}
> I think we were implicitly cleaning it [before|https://github.com/apache/karaf/commit/0ed141dafd5ffb321bc851886e88457b616c1c06#diff-1ba8bf8ee6ad4e0be6e473ed0bc51862L1257]
some refactoring.
> Thanks!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message