osgi / osgi.enroute.site

GitHub Pages repo for OSGi enRoute website
https://enroute.osgi.org/
Apache License 2.0
18 stars 54 forks source link

Error/issue arising in the bnd-maven integration testing tutorial #121

Closed HaraldKorneliussen closed 7 years ago

HaraldKorneliussen commented 7 years ago

Hello,

I tried to create an integration test project patterned after the tutorial, but I get a strange error message during resolution. It seems that the string which is supposed to list the missing dependencies instead becomes a string representation of an index out of bounds exception, but I haven't been able to find out of it comes from equinox or the bnd testing plugin, or if it's related to something specific in the tutorial.

Here is a minimized project to show it:

https://github.com/vintermann/mvn-bnd-issue/

On mvn install, it should give the following error:

[ERROR] Failed to execute goal biz.aQute.bnd:bnd-testing-maven-plugin:3.4.0-SNAPSHOT:testing (default) on project org.example.minimized.integration-test: Unable to resolve <<INITIAL>> version=null: missing requirement java.lang.StringIndexOutOfBoundsException: String index out of range: 42 -> [Help 1]

rotty3000 commented 7 years ago

I'm pretty sure the culprit is this logic: https://github.com/bndtools/bnd/blob/master/biz.aQute.bndlib/src/aQute/bnd/osgi/resource/RequirementImpl.java#L16-L25

Any bad filter string here will silently be replaced with the message of the exception.

bjhargrave commented 7 years ago

Closing since https://github.com/bndtools/bnd/issues/1892 was opened to for this issue.