osgi.ee require cap with strange version spoils bundle resolution

11 views
Skip to first unread message

Matteo Rulli

unread,
Jan 18, 2018, 4:10:59 PM1/18/18
to bndtools-users
Hello,
I just upgraded a bundle to a newer version (akka-http v. 10.0.11) and the resolver is complaining with the following error:

 (default-cli) on project resolve.akka-http: Unable to resolve <<INITIAL>> version=null: missing requirement com.typesafe.akka.http [caused by: Unable to resolve com.typesafe.akka.http version=10.0.11: missing requirement akka.http.impl.engine.rendering; version=[10.0.11,10.1.0) [caused by: Unable to resolve com.typesafe.akka.http.core version=10.0.11: missing requirement akka.parboiled2.support; version=[10.0.11,10.1.0) [caused by: Unable to resolve com.typesafe.akka.parsing version=10.0.11: missing requirement &(osgi.ee=JavaSE)(version=1.8.0_144)]]] -> [Help 1]

 The manifest of the akka-http bundle actually contains this:

 Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8.0_144))"

 which seems a little bit odd as a version: I'm not even sure it is well formed, is it?

 How can I solve the problem? I tried with this in the bndrun file:

 -runsystemcapabilities = osgi.ee;osgi.ee=JavaSE;version:List<Version>="1.8,1.8.0_144"

 But I get

 [ERROR] Failed to execute goal biz.aQute.bnd:bnd-export-maven-plugin:3.5.0:export (default-cli) on project resolve.akka-http: java.lang.IllegalArgumentException: Invalid syntax for version: 1.8.0_144

Is wrapping the akka-http bundle and getting rid of the odd require-cap the only approach?

Thanks,
Matteo

BJ Hargrave

unread,
Jan 18, 2018, 4:46:26 PM1/18/18
to bndtool...@googlegroups.com
The bundle is in error. One, the version is not a valid OSGi version: 1.8.0_144 and, two, that is too precise a version number anyway since a framework implementation will just offer 1.8 for Java 8 or 9 for Java 9.

That bundle needs to be fixed.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
BJ

Milen Dyankov

unread,
Jan 18, 2018, 6:11:26 PM1/18/18
to bndtool...@googlegroups.com
I would be interested to know if there is a way to fix that without repackaging the 3rd party bundle ?

To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.

BJ Hargrave

unread,
Jan 18, 2018, 10:30:02 PM1/18/18
to bndtool...@googlegroups.com
You could try

-runsystemcapabilities = osgi.ee;osgi.ee=JavaSE;version:List<String>="1.8,1.8.0_144"


That is, use String instead version for the List type. Then it wont be parsed as a version and so wont barf. But then all filter compares are just string compares, so normal version comparison wont happen. That is, 1.8 != 1.8.0.


On Thu, Jan 18, 2018 at 6:11 PM Milen Dyankov <milend...@gmail.com> wrote:
I would be interested to know if there is a way to fix that without repackaging the 3rd party bundle ?
18 sty 2018 13:46 "BJ Hargrave" <b...@bjhargrave.com> napisał(a):
The bundle is in error. One, the version is not a valid OSGi version: 1.8.0_144 and, two, that is too precise a version number anyway since a framework implementation will just offer 1.8 for Java 8 or 9 for Java 9.

That bundle needs to be fixed.
On Thu, Jan 18, 2018 at 4:11 PM Matteo Rulli <matteo...@gmail.com> wrote:
Hello,
I just upgraded a bundle to a newer version (akka-http v. 10.0.11) and the resolver is complaining with the following error:

 (default-cli) on project resolve.akka-http: Unable to resolve <<INITIAL>> version=null: missing requirement com.typesafe.akka.http [caused by: Unable to resolve com.typesafe.akka.http version=10.0.11: missing requirement akka.http.impl.engine.rendering; version=[10.0.11,10.1.0) [caused by: Unable to resolve com.typesafe.akka.http.core version=10.0.11: missing requirement akka.parboiled2.support; version=[10.0.11,10.1.0) [caused by: Unable to resolve com.typesafe.akka.parsing version=10.0.11: missing requirement &(osgi.ee=JavaSE)(version=1.8.0_144)]]] -> [Help 1]

 The manifest of the akka-http bundle actually contains this:

 Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8.0_144))"

 which seems a little bit odd as a version: I'm not even sure it is well formed, is it?

 How can I solve the problem? I tried with this in the bndrun file:

 -runsystemcapabilities = osgi.ee;osgi.ee=JavaSE;version:List<Version>="1.8,1.8.0_144"

 But I get

 [ERROR] Failed to execute goal biz.aQute.bnd:bnd-export-maven-plugin:3.5.0:export (default-cli) on project resolve.akka-http: java.lang.IllegalArgumentException: Invalid syntax for version: 1.8.0_144

Is wrapping the akka-http bundle and getting rid of the odd require-cap the only approach?

Thanks,
Matteo

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
BJ

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
BJ
Reply all
Reply to author
Forward
0 new messages