Discussion:
Creating an aggregated p2 mirror with modified categories
(too old to reply)
Robert Gründler
2012-09-23 18:18:33 UTC
Permalink
Hi,

we're trying to create a repository mirror from a variety of 3rd party p2
repos. To create the mirrored repo, we're using the
tycho-p2-extras-plugin with the mirror goal. This works fine, however the
generated repsitory will be categorized just like the mirrored features have
been categorized.

The features in the aggregated repo should be categorized differently
though than the features in the originating repos. Currently
we're using a 2step build for this:

1. Create the mirrored repository using the tycho-p2-extras-plugin :
https://github.com/pdt-eg/p2-mirror/blob/master/org.pex.p2-mirror.aggregator/pom.xml
2. Create a new eclipse-repository using the (local) features from the
previous build, but with a separate category.xml :
https://github.com/pdt-eg/p2-mirror/tree/master/org.pex.p2-mirror.mirror

The problem with this solution is, that the category.xml needs the
hardcoded and specific versions of the features in the aggregated repo.

So anytime the version of one of the mirrored features changes, the
category.xml needs to be updated manually.

Ideally, the process should be fully automated and run by a cronjob - where
the latest features of the mirrored repos are categorized automatically.

Does anyone know if there's a way to do this?


regards

-robert
Oberlies, Tobias
2012-09-25 11:45:14 UTC
Permalink
Use "0.0.0" as version in the category.xml

Regards
Tobias

From: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] On Behalf Of Robert Gründler
Sent: Sonntag, 23. September 2012 20:19
To: Tycho user list
Subject: [tycho-user] Creating an aggregated p2 mirror with modified categories

Hi,

we're trying to create a repository mirror from a variety of 3rd party p2 repos. To create the mirrored repo, we're using the
tycho-p2-extras-plugin with the mirror goal. This works fine, however the generated repsitory will be categorized just like the mirrored features have
been categorized.

The features in the aggregated repo should be categorized differently though than the features in the originating repos. Currently
we're using a 2step build for this:

1. Create the mirrored repository using the tycho-p2-extras-plugin : https://github.com/pdt-eg/p2-mirror/blob/master/org.pex.p2-mirror.aggregator/pom.xml
2. Create a new eclipse-repository using the (local) features from the previous build, but with a separate category.xml : https://github.com/pdt-eg/p2-mirror/tree/master/org.pex.p2-mirror.mirror

The problem with this solution is, that the category.xml needs the hardcoded and specific versions of the features in the aggregated repo.

So anytime the version of one of the mirrored features changes, the category.xml needs to be updated manually.

Ideally, the process should be fully automated and run by a cronjob - where the latest features of the mirrored repos are categorized automatically.

Does anyone know if there's a way to do this?


regards

-robert
Robert Gründler
2012-09-25 15:20:50 UTC
Permalink
Hi Tobias,

i've tried the following version scheme, but i get:

<feature url="features/org.pex.feature_0.0.0.qualifier.jar"
id="org.pex.feature" version="0.0.0">

Missing requirement: mirror 0.0.1 requires 'org.pex.feature.feature.group
0.0.0' but it could not be found


What should i use for the url attribute when specifying 0.0.0 as version?


regards

-robert





On Tue, Sep 25, 2012 at 1:45 PM, Oberlies, Tobias
Use “0.0.0” as version in the category.xml****
** **
Regards****
Tobias****
** **
*Sent:* Sonntag, 23. September 2012 20:19
*To:* Tycho user list
*Subject:* [tycho-user] Creating an aggregated p2 mirror with modified
categories****
** **
Hi,
we're trying to create a repository mirror from a variety of 3rd party p2
repos. To create the mirrored repo, we're using the
tycho-p2-extras-plugin with the mirror goal. This works fine, however the
generated repsitory will be categorized just like the mirrored features have
been categorized.
The features in the aggregated repo should be categorized differently
though than the features in the originating repos. Currently
https://github.com/pdt-eg/p2-mirror/blob/master/org.pex.p2-mirror.aggregator/pom.xml
2. Create a new eclipse-repository using the (local) features from the
https://github.com/pdt-eg/p2-mirror/tree/master/org.pex.p2-mirror.mirror
The problem with this solution is, that the category.xml needs the
hardcoded and specific versions of the features in the aggregated repo.
So anytime the version of one of the mirrored features changes, the
category.xml needs to be updated manually.
Ideally, the process should be fully automated and run by a cronjob -
where the latest features of the mirrored repos are categorized
automatically.
Does anyone know if there's a way to do this?
regards
-robert
****
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
David Carver
2012-09-25 17:21:41 UTC
Permalink
Try:

<feature url="features/org.pex.feature.jar" id="org.pex.feature"
version="0.0.0">

Dave
Post by Robert Gründler
Hi Tobias,
<feature url="features/org.pex.feature_0.0.0.qualifier.jar"
id="org.pex.feature" version="0.0.0">
Missing requirement: mirror 0.0.1 requires
'org.pex.feature.feature.group 0.0.0' but it could not be found
What should i use for the url attribute when specifying 0.0.0 as version?
regards
-robert
On Tue, Sep 25, 2012 at 1:45 PM, Oberlies, Tobias
Use "0.0.0" as version in the category.xml
Regards
Tobias
Gründler
*Sent:* Sonntag, 23. September 2012 20:19
*To:* Tycho user list
*Subject:* [tycho-user] Creating an aggregated p2 mirror with
modified categories
Hi,
we're trying to create a repository mirror from a variety of 3rd
party p2 repos. To create the mirrored repo, we're using the
tycho-p2-extras-plugin with the mirror goal. This works fine,
however the generated repsitory will be categorized just like the
mirrored features have
been categorized.
The features in the aggregated repo should be categorized
differently though than the features in the originating repos.
Currently
https://github.com/pdt-eg/p2-mirror/blob/master/org.pex.p2-mirror.aggregator/pom.xml
2. Create a new eclipse-repository using the (local) features from
https://github.com/pdt-eg/p2-mirror/tree/master/org.pex.p2-mirror.mirror
The problem with this solution is, that the category.xml needs the
hardcoded and specific versions of the features in the aggregated repo.
So anytime the version of one of the mirrored features changes,
the category.xml needs to be updated manually.
Ideally, the process should be fully automated and run by a
cronjob - where the latest features of the mirrored repos are
categorized automatically.
Does anyone know if there's a way to do this?
regards
-robert
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Mickael Istria
2012-09-25 17:25:27 UTC
Permalink
Post by Robert Gründler
Hi Tobias,
<feature url="features/org.pex.feature_0.0.0.qualifier.jar"
id="org.pex.feature" version="0.0.0">
Missing requirement: mirror 0.0.1 requires
'org.pex.feature.feature.group 0.0.0' but it could not be found
What should i use for the url attribute when specifying 0.0.0 as version?
You can simply ignore the url parameter, it's not even parsed ;)
http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Category.java
--
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>
Mikhail Kalkov
2012-09-26 07:26:07 UTC
Permalink
Hi,

Out of curiosity, I've just looked up how category.xml is parsed by p2 itself, and it seems that the only time it cares about the url attribute is when it loads an update site [1], and even then it can build the url itself from the id and the version. When p2 parses category.xml file, it doesn't read or set the url at all [2].

[1] http://grepcode.com/file/repository.grepcode.com/java/eclipse.org/3.7.2/org.eclipse.equinox.p2/updatesite/1.0.300/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java#DefaultSiteParser.processFeature%28org.xml.sax.Attributes%29
[2] http://grepcode.com/file/repository.grepcode.com/java/eclipse.org/3.7.2/org.eclipse.equinox.p2/updatesite/1.0.300/org/eclipse/equinox/internal/p2/updatesite/CategoryParser.java#CategoryParser.processFeature%28org.xml.sax.Attributes%29


Kind regards,
Mikhail Kalkov

Purple Scout AB
Software Developer

----- Original Message -----

From: "Mickael Istria" <***@redhat.com>
To: tycho-***@eclipse.org
Sent: Tuesday, September 25, 2012 7:25:27 PM
Subject: Re: [tycho-user] Creating an aggregated p2 mirror with modified categories


On 09/25/2012 05:20 PM, Robert GrÃŒndler wrote:


Hi Tobias,

i've tried the following version scheme, but i get:

<feature url="features/org.pex.feature_0.0.0.qualifier.jar" id="org.pex.feature" version="0.0.0">

Missing requirement: mirror 0.0.1 requires 'org.pex.feature.feature.group 0.0.0' but it could not be found


What should i use for the url attribute when specifying 0.0.0 as version?


You can simply ignore the url parameter, it's not even parsed ;) http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Category.java
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets
_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
https://dev.eclipse.org/mailman/listinfo/tycho-user
Robert Gründler
2012-09-26 07:46:49 UTC
Permalink
thanks a lot for the detailed info. I got it working now. The url
attributes are indeed not needed, my category.xml looks like this now and
works fine:

https://github.com/pdt-eg/p2-mirror/blob/master/org.pex.p2-mirror.mirror/category.xml


regards


-robert




On Wed, Sep 26, 2012 at 9:26 AM, Mikhail Kalkov <
Post by Mikhail Kalkov
Hi,
Out of curiosity, I've just looked up how category.xml is parsed by p2
itself, and it seems that the only time it cares about the url attribute is
when it loads an update site [1], and even then it can build the url itself
from the id and the version. When p2 parses category.xml file, it doesn't
read or set the url at all [2].
[1]
http://grepcode.com/file/repository.grepcode.com/java/eclipse.org/3.7.2/org.eclipse.equinox.p2/updatesite/1.0.300/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java#DefaultSiteParser.processFeature%28org.xml.sax.Attributes%29
[2]
http://grepcode.com/file/repository.grepcode.com/java/eclipse.org/3.7.2/org.eclipse.equinox.p2/updatesite/1.0.300/org/eclipse/equinox/internal/p2/updatesite/CategoryParser.java#CategoryParser.processFeature%28org.xml.sax.Attributes%29
Kind regards,
Mikhail Kalkov
Purple Scout AB
Software Developer
------------------------------
*Sent: *Tuesday, September 25, 2012 7:25:27 PM
*Subject: *Re: [tycho-user] Creating an aggregated p2 mirror with
modified categories
Hi Tobias,
<feature url="features/org.pex.feature_0.0.0.qualifier.jar"
id="org.pex.feature" version="0.0.0">
Missing requirement: mirror 0.0.1 requires 'org.pex.feature.feature.group
0.0.0' but it could not be found
What should i use for the url attribute when specifying 0.0.0 as version?
You can simply ignore the url parameter, it's not even parsed ;)
http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-metadata-model/src/main/java/org/eclipse/tycho/model/Category.java
--
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>
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Loading...