Discussion:
how to use of org.eclipse.equinox.p2.repository.tools p2.composite.repository with tycho ?
(too old to reply)
Cristiano Gavião
2013-01-16 20:20:10 UTC
Permalink
Hi,

I'm generating a series of p2 repositories for my system, one for each
module.

Until now I'm creating a composite p2 for each milestone by hand and I
would like to automate this in the same aggregate reactor that creates
the p2.

I could find that exists an ant target in the
org.eclipse.equinox.p2.repository.tools bundle that could be used for
this goal.

I know that I could use maven-antrun-plugin, but I couldn't find a way
to reference the bundle on it, since its not published in maven central
repo.

Could someone give me a hint/example of how could I use it inside a
tycho build ?

thanks for any tip.

Cristiano
Nick Boldt
2013-01-17 02:03:40 UTC
Permalink
A couple options include:

a) publish the p2 repos to predictable URLs, perhaps named based on the
job name in Jenkins [1], then put those unchanging URLs into a pair of
compositeContent.xml / compositeArtifacts.xml files [2].

[1] http://download.jboss.org/jbosstools/builds/staging/ <jobName> /
[2]
http://download.jboss.org/jbosstools/builds/staging/_composite_/core/trunk/
{compositeArtifacts.xml,compositeContent.xml}

b) publish [3] the sites into a subfolder [4] named for the version of
project produced, then composite the subfolders into a single
composite*.xml pair [5] which you generate based on the list of
available subfolders [6].
Mickael Istria
2013-01-17 07:28:04 UTC
Permalink
Tycho does not provide tools for composite repositories AFAIK.
However, composite repositories are just a couple of very simple files
to set up: compositeContent.xml and compositeArtifacts.xml. I don't
think they require any tool to create them efficiently. If you need them
to by "dynamic" (ir change some URLs at build time), you could think of
using an XSL plugin to change them during your build.

HTH
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
Cristiano Gavião
2013-01-17 19:10:51 UTC
Permalink
Thank you both Nick and Michael,

I could create my dynamic composite site generation.

I've create an aggregate maven project and created one profile that
builds all p2 for a specific milestone.
I added an ant build in the verify phase of each p2 project that copy
the result to a deployment folder.
To finish, in the verify phase of the aggregate project I added an ant
script that takes each copied subfolder and creates the two xml needed
for composite p2.

cheers,

Cristiano
Post by Cristiano Gavião
Hi,
I'm generating a series of p2 repositories for my system, one for each
module.
Until now I'm creating a composite p2 for each milestone by hand and I
would like to automate this in the same aggregate reactor that creates
the p2.
I could find that exists an ant target in the
org.eclipse.equinox.p2.repository.tools bundle that could be used for
this goal.
I know that I could use maven-antrun-plugin, but I couldn't find a way
to reference the bundle on it, since its not published in maven
central repo.
Could someone give me a hint/example of how could I use it inside a
tycho build ?
thanks for any tip.
Cristiano
Nick Boldt
2013-01-17 22:06:48 UTC
Permalink
As an extra step you could also generate a p2.index file to make reading
the site slightly faster and trap fewer 404s on your web server:

http://wiki.eclipse.org/Equinox/p2/p2_index#Example_for_composite_repository
Post by Cristiano Gavião
Thank you both Nick and Michael,
I could create my dynamic composite site generation.
I've create an aggregate maven project and created one profile that
builds all p2 for a specific milestone.
I added an ant build in the verify phase of each p2 project that copy
the result to a deployment folder.
To finish, in the verify phase of the aggregate project I added an ant
script that takes each copied subfolder and creates the two xml needed
for composite p2.
cheers,
Cristiano
Post by Cristiano Gavião
Hi,
I'm generating a series of p2 repositories for my system, one for each
module.
Until now I'm creating a composite p2 for each milestone by hand and I
would like to automate this in the same aggregate reactor that creates
the p2.
I could find that exists an ant target in the
org.eclipse.equinox.p2.repository.tools bundle that could be used for
this goal.
I know that I could use maven-antrun-plugin, but I couldn't find a way
to reference the bundle on it, since its not published in maven
central repo.
Could someone give me a hint/example of how could I use it inside a
tycho build ?
thanks for any tip.
Cristiano
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Nick Boldt :: http://nick.divbyzero.com
Cristiano Gavião
2013-01-21 12:41:46 UTC
Permalink
Hi Nick,

thanks for the tip. I've added it to the our composite creation tasks.

regards,

Cristiano
Post by Nick Boldt
As an extra step you could also generate a p2.index file to make
http://wiki.eclipse.org/Equinox/p2/p2_index#Example_for_composite_repository
Post by Cristiano Gavião
Thank you both Nick and Michael,
I could create my dynamic composite site generation.
I've create an aggregate maven project and created one profile that
builds all p2 for a specific milestone.
I added an ant build in the verify phase of each p2 project that copy
the result to a deployment folder.
To finish, in the verify phase of the aggregate project I added an ant
script that takes each copied subfolder and creates the two xml needed
for composite p2.
cheers,
Cristiano
Post by Cristiano Gavião
Hi,
I'm generating a series of p2 repositories for my system, one for each
module.
Until now I'm creating a composite p2 for each milestone by hand and I
would like to automate this in the same aggregate reactor that creates
the p2.
I could find that exists an ant target in the
org.eclipse.equinox.p2.repository.tools bundle that could be used for
this goal.
I know that I could use maven-antrun-plugin, but I couldn't find a way
to reference the bundle on it, since its not published in maven
central repo.
Could someone give me a hint/example of how could I use it inside a
tycho build ?
thanks for any tip.
Cristiano
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Continue reading on narkive:
Loading...