In the past, we had our bundles and features on the file system and made them available in Eclipse through a target definition file with a 'Directory' location. In this way, it was easy to use them with the Export wizards in Eclipse.
Now I'm trying to build an eclipse-plugin
with Tycho which has third party dependencies, e.g. javax.vecmath and org.apache.commons.math.
From what I know, the best way to obtain the dependencies in a Tycho build is through a p2 repository. So I'm using one for the Eclipse bundles. But for my third-party bundles, it seems that there is no p2 repository available.
So my question is: How do I easily get the JARs (vecmath, commons-math) into a p2 repository?
I thought I could build a p2 repository with Tycho, but how to do this when I can't access the third-party bundles in Tycho? I tried to use a target definition, but Tycho only supports links to p2 repositories, and not directories or installations. So are there other ways to use my third-party dependencies in a Maven/Tycho build?
According to your question, the third party dependencies are already bundles. This is good – all that is left to do is to generate p2 metadata for the bundles.
This can be done easily through the Features and Bundles Publisher application. The result is a p2 repository. Obviously, you don't want that all your developers have to do this locally in order to run the Tycho build, so you should put the result of the publisher application onto a web server. Then, reference the bundles via an http URL in the target file of your project.