Background:
We are in the process of moving our application framework (around 70K lines and 7K classes) from eclipse pde to bndtools. Since we already used maven via tycho in our jenkins/nexus-based deployment and because we wanted to become more IDE agnostic we have chosen not to use bnd’s workspace model, but are using the bnd-maven tooling.
Other then 2 POC’s we have done (1 with bnd-workspace and 1 with pure bnd-maven-plugin) nobody from our team had experience with bndtools before.
We are facing 2 problems:
1. We are using a 3’rd party library (org.eclipse.xtext.xbase.lib-2.11.0) which has a dependency declared in its pom with a version range. As long as the version is defined as a range, there is an exception in the browse bundle window from bndtools: „java.lang.IllegalArguementException: Invalid syntax for version.“
I have created a small demo project showing the same behaviour. So how to specify a version range in a pom and also, how to solve this problem, if the bundle is a external artefact?
2. We satisfying maven-compile we have defined maven-central dependencies for all 3’rd party libraries. Most jars are osgi-bundles, so these libraries work also at runtime. For other jar’s, which are no bundles, we need to resolve them from a different repository. So far we have been using the orbit-repo. We have configured our companies nexus server to proxy the orbit-repo.
Our problem is how to specify our nexus-orbit-proxy. We have tried:
-plugin.B.orbit-neon-3 = \
aQute.bnd.repository.p2.provider.P2Repository; \
url=http://[url]:8081/nexus/content/repositories/orbit-neon-3/; \
name = orbit-neon-3
and also added following in ~/.bnd/settings.xml:
<settings>
<servers>
<server>
<id>http://[url]:8081</id>
<username>user</username>
<password>pass</password>
</server>
</servers>
</settings>
The exception is: „java.lang.IllegalArgumentException: For a p2 repository you must set the url parameter to the repository“
Thanks for help!