Magne Rasmussen
Magne Rasmussen

Reputation: 303

Copy Tycho artifact P2 dependencies

I have a Tycho build which produces the eclipse plugins for an Xtext DSL feature. I now want to make a maven plugin which can process the DSL files. The problem is to get the artifacts the DSL plugin depends on into the maven plugin, as these are not in the Maven repositories. Also, I want the maven plugin to automatically depend on the same artifacts that the DSL plugin depends on.

I think that creating an über-jar with the dependencies would be the best way to go. The problem is to retrieve the dependencies of the DSL plugin and copy these into a directory, so I can build this über-jar.

Has anybody found a solution to this problem? My searches just turn up solutions to the opposite problem; importing a maven dependency into Tycho as (P2) dependencies.

Upvotes: 1

Views: 1356

Answers (1)

oberlies
oberlies

Reputation: 11723

With the packaging type eclipse-repository and the includeAllDependencies switch set to true, you can have Tycho aggregate your plugin and all its transitive dependencies. The build result is a zip of jars (and some p2 metadata) which you shoud be able to transform into an uber-jar using the maven-assembly-plugin.

One additional note: you can't include bundles in eclipse-repository directly (yet), so you'll need to include your bundle via a feature.

Upvotes: 2

Related Questions