1

I wonder how to make married eclipse development target definition and maven/tycho repository.

Suppose two teams A and B. The team A develops a target platform for team B.

In pure maven development without the help of Eclipse as development environment, the maven repository is the ideal tool to make communicate the both teams : when A releases a bundle, this one is published in the maven repository and available for team B when starting his maven generation.

But there is a problem for team B developping under Eclipse. Bundles published in repository by team A cannot be seen by Eclipse. The result is Eclipse cannot compile and link correctly... In fact, Eclipse becomes inefficient as a development environment.

I know that Tycho publishes P2 repository into Maven repository. But, how to use this published P2 repo ??? As far as I know, it is not possible de define an Eclipse Target Definition pointing to this published P2 Repository...

Any solutions ? Do you have the same problem ?

Thanks a lot for your help.

crepu
  • 91
  • 9
  • Tycho allows you to consume p2 repos and create many Eclipse related artifacts, like products. Tycho can't take a p2 repo and turn it into a maven repo. – Paul Webster Mar 05 '12 at 20:58

2 Answers2

0

This question is a lot like Handling non-OSGi dependencies when integrating Maven, Tycho and Eclipse

I use nexus with its p2 plugins, which provide both a maven and p2 repository. (You can pay to run nexus with p2 or you can install the older beta plugins, which work well enough.)

It's important to:

  • Use maven and p2 repositories
  • Properly setup your pom.xml files
  • Use the maven tycho plugin

The link above includes a discussion on how to do this.

FYI, it is possible to point to nexus p2 in you Target Platform definition.

  • Open your Target Definition
  • In Locations, select Add, and then select your nexus p2 update site
Community
  • 1
  • 1
B. Robinson
  • 106
  • 1
  • 6
0

It should be possible to use the generated P2 repository. Did you create features for your bundles? Eclipse only recognizes features, if you want to configure your target platform.

If you use Nexus as repository manager and the OSGI metadata plugins for Nexus, then it isn't directly possible, because the metadata plugin for Nexus doesn't generate metadata for features. But there is development going on to bring that to the plugin.

dunni
  • 43,386
  • 10
  • 104
  • 99
  • The P2 repo published in Maven repository is zipped. If I want a target platform points to this repo, I have to unzip it and copy it on a Web server. Well, I have expected something more straightforward ! About Nexus, do you talk about the professional version of Nexus or free version ? – crepu Mar 05 '12 at 07:44
  • The plugins for generating OSGI metadata were open sourced by Sonatype with the new Nexus 2 version, so you can use it now in the free version (it was only available with Pro in earlier versions). – dunni Mar 05 '12 at 11:12