dependency ranges in pom AND adding p2 repository

103 views
Skip to first unread message

Jörg Wille

unread,
Mar 27, 2017, 7:20:55 PM3/27/17
to bndtools-users
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!

BJ Hargrave

unread,
Apr 10, 2017, 11:56:03 AM4/10/17
to bndtool...@googlegroups.com
2.) I am not sure what the issue is there. Perhaps you can make a small repo to show the issue and open an issue in github?

--
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