Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] How to re-use a product definition or include existing site?

Hi,

You can use the mirror goal [1] to merge in the output from the first repository into the 2nd repository.

You could use a relative url to the first repository location - but this is not too nice. A better alternative is to use the maven dependency plugin to unpack the repository zip [2] somewhere suitable (e.g. somewhere in the 2nd repository target directory). The dependency plugin can find artifacts in the current reactor or a maven repository and tycho attaches the eclipse-repository zip as a build artifact - thus this will work in a multi-module build or a single module build. 

You will need to use the ${project.baseUri} variable in your pom to get a file:// based uri prefix to your unpacked 1st repository.

[1] http://wiki.eclipse.org/Tycho/Additional_Tools#mirror_goal
[2] http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html


HTH,

Simon


On 20 June 2013 11:28, Mickael Istria <mistria@xxxxxxxxxx> wrote:
Hi all,

As part of a single build, I want to build 2 sites:
* First one is built from a product definition, and should build a site containing the product + all its dependencies
* First one should build a p2 repository based on product definition + category.xml (additional content) + all its dependencies.
The easiest solution would be to have 2 modules, one for each p2 repository I want to create, and to have jbds.product in first site, and jbds.product+category.xml in the other site. However, it forces duplication of jbds.product which is something we can't allow for maintenance. I could copy file at build-time, but since Tycho resolves classpath very early, it wouldn't work.

An alternative would be to allow an eclipse-repository to include content of another eclipse-repository. So I'd just make 2nd repository built using category.xml and then I would inject in output repository the 1st repo containing product. However, I don't know how to merge repositories with Tycho.

Do you have any idea of implement this cleanly?

Cheers,
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top