Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » creating a repository keeping all the versions
creating a repository keeping all the versions [message #881434] Mon, 04 June 2012 10:47 Go to next message
Lorenzo Bettini is currently offline Lorenzo Bettini
Messages: 1306
Registered: July 2009
Senior Member
Hi

I'm building a p2 repository with Buckminster for some features, and I'd
like to keep all the versions of my features in that repository (even
when they differ for the .qualifier).

However, every build creates artifacts.jar and contents.jar which refer
only to the latest version...

what is the best practice to achieve that?

many thanks in advance
cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Re: creating a repository keeping all the versions [message #881457 is a reply to message #881434] Mon, 04 June 2012 11:35 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2498
Registered: July 2009
Senior Member
On 2012-04-06 16:47, Lorenzo Bettini wrote:
> Hi
>
> I'm building a p2 repository with Buckminster for some features, and I'd
> like to keep all the versions of my features in that repository (even
> when they differ for the .qualifier).
>
> However, every build creates artifacts.jar and contents.jar which refer
> only to the latest version...
>
> what is the best practice to achieve that?
>
> many thanks in advance
> cheers
> Lorenzo
>
We use an aggregate repository and simply add each created repository as
a child repo. We have one release repository where we simply aggregate
the builds that we "blessed".

Does that help?

- henrik
Re: creating a repository keeping all the versions [message #881532 is a reply to message #881457] Mon, 04 June 2012 15:16 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo Bettini
Messages: 1306
Registered: July 2009
Senior Member
On 04/06/2012 17:35, Henrik Lindberg wrote:
> On 2012-04-06 16:47, Lorenzo Bettini wrote:
>> Hi
>>
>> I'm building a p2 repository with Buckminster for some features, and I'd
>> like to keep all the versions of my features in that repository (even
>> when they differ for the .qualifier).
>>
>> However, every build creates artifacts.jar and contents.jar which refer
>> only to the latest version...
>>
>> what is the best practice to achieve that?
>>
>> many thanks in advance
>> cheers
>> Lorenzo
>>
> We use an aggregate repository and simply add each created repository as
> a child repo. We have one release repository where we simply aggregate
> the builds that we "blessed".
>

You mean http://wiki.eclipse.org/Eclipse_b3/aggregator/manual ?

thanks in advance
Lorenzo


--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Re: creating a repository keeping all the versions [message #881800 is a reply to message #881434] Tue, 05 June 2012 05:21 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis Huebner
Messages: 198
Registered: July 2009
Senior Member

Hi Lorenzo,
we use composite repository for our stable and release builds. After a build is promoted and tested I add it manually to the composite*.xml's.
It's very handy because you can publish your repository in a separate folder. Means you can test it separately, you can simply move it around, cleanup, you can easily turn it on or off and all this with less effort. Furthermore you can use the special build folder e.g. S201205291024 in your project b3aggrcon file for the Juno aggregation contribution (if you participate to the common repo).

See /home/data/httpd/download.eclipse.org/modeling/tmf/xtext/updates/milestones/

Regards,
Dennis.



+Dennis Hübner

--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: creating a repository keeping all the versions [message #881909 is a reply to message #881532] Tue, 05 June 2012 09:31 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2498
Registered: July 2009
Senior Member
On 2012-04-06 21:16, Lorenzo Bettini wrote:
> On 04/06/2012 17:35, Henrik Lindberg wrote:
>> On 2012-04-06 16:47, Lorenzo Bettini wrote:
>>> Hi
>>>
>>> I'm building a p2 repository with Buckminster for some features, and I'd
>>> like to keep all the versions of my features in that repository (even
>>> when they differ for the .qualifier).
>>>
>>> However, every build creates artifacts.jar and contents.jar which refer
>>> only to the latest version...
>>>
>>> what is the best practice to achieve that?
>>>
>>> many thanks in advance
>>> cheers
>>> Lorenzo
>>>
>> We use an aggregate repository and simply add each created repository as
>> a child repo. We have one release repository where we simply aggregate
>> the builds that we "blessed".
>>
>
> You mean http://wiki.eclipse.org/Eclipse_b3/aggregator/manual ?
>
No, sorry, I meant a COMPOSITE repository, I wrote "aggregated" where I
meant composite. I think Dennis already gave some
information about composite repos.

Sorry about the confusion.
Regards
- henrik
Re: creating a repository keeping all the versions [message #882785 is a reply to message #881909] Thu, 07 June 2012 03:41 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo Bettini
Messages: 1306
Registered: July 2009
Senior Member
On 06/05/2012 03:31 PM, Henrik Lindberg wrote:
> On 2012-04-06 21:16, Lorenzo Bettini wrote:
>> On 04/06/2012 17:35, Henrik Lindberg wrote:
>>> On 2012-04-06 16:47, Lorenzo Bettini wrote:
>>>> Hi
>>>>
>>>> I'm building a p2 repository with Buckminster for some features, and
>>>> I'd
>>>> like to keep all the versions of my features in that repository (even
>>>> when they differ for the .qualifier).
>>>>
>>>> However, every build creates artifacts.jar and contents.jar which refer
>>>> only to the latest version...
>>>>
>>>> what is the best practice to achieve that?
>>>>
>>>> many thanks in advance
>>>> cheers
>>>> Lorenzo
>>>>
>>> We use an aggregate repository and simply add each created repository as
>>> a child repo. We have one release repository where we simply aggregate
>>> the builds that we "blessed".
>>>
>>
>> You mean http://wiki.eclipse.org/Eclipse_b3/aggregator/manual ?
>>
> No, sorry, I meant a COMPOSITE repository, I wrote "aggregated" where I
> meant composite. I think Dennis already gave some
> information about composite repos.
>
> Sorry about the confusion.
> Regards
> - henrik
>

No problem :)
but from what I've read so far about aggregator I could create a
composite site using the aggregator, couldn't I? Or that's another
functionality?

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Re: creating a repository keeping all the versions [message #882787 is a reply to message #881800] Thu, 07 June 2012 03:43 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo Bettini
Messages: 1306
Registered: July 2009
Senior Member
On 06/05/2012 11:21 AM, Dennis Huebner wrote:
> Hi Lorenzo,
> we use composite repository for our stable and release builds. After a
> build is promoted and tested I add it manually to the composite*.xml's.
> It's very handy because you can publish your repository in a separate
> folder. Means you can test it separately, you can simply move it around,
> cleanup, you can easily turn it on or off and all this with less effort.
> Furthermore you can use the special build folder e.g. S201205291024 in
> your project b3aggrcon file for the Juno aggregation contribution (if
> you participate to the common repo).
>
> See
> /home/data/httpd/download.eclipse.org/modeling/tmf/xtext/updates/milestones/
>

Thanks Dennis

could you please suggest a composite.xml file to begin with?
Probably this
http://wiki.eclipse.org/Equinox/p2/Composite_Repositories_%28new%29#Sample_Composite_Metadata_Repository
?

However, as you said, this must be done manually, right?

thanks again
cheers
Lorenzo


--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Re: creating a repository keeping all the versions [message #882836 is a reply to message #882787] Thu, 07 June 2012 05:43 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis Huebner
Messages: 198
Registered: July 2009
Senior Member

Hello Lorenzo,
> Probably this
> http://wiki.eclipse.org/Equinox/p2/Composite_Repositories_%28new%29#Sample_Composite_Metadata_Repository
> ?
Yes you can start here.
It's probably good to see how other projects create their composite repositories e.g.:
http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/?list

compositeArtifacts.xml. Can also be zipped so it becomes compositeArtifacts.jar
<?xml version='1.0' encoding='UTF-8'?>
<?compositeArtifactRepository version='1.0.0'?>
<repository name='M2T Xpand Update Site (Milestones)' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
  <properties size='1'>
    <property name='p2.timestamp' value='1338911403239'/>
  </properties>
  <children size='1'>
    <child location='S201206050419'/>
  </children>
</repository>

and compositeContent.xml (or jar)
<?xml version='1.0' encoding='UTF-8'?>
<?compositeMetadataRepository version='1.0.0'?>
<repository name='M2T Xpand Update Site (Milestones)' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
  <properties size='1'>
    <property name='p2.timestamp' value='1338911403242'/>
  </properties>
  <children size='1'>
    <child location='S201206050419'/>
  </children>
</repository>


And please, don't forget to use a p2.index. Just put this file in your composite repository root.
version = 1
metadata.repository.factory.order = compositeContent.xml,\!
artifact.repository.factory.order = compositeArtifacts.xml,\!

See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=381598 Twisted Evil

> However, as you said, this must be done manually, right?
I used to do it manually. But in the meantime I use Kenn's ant script:
http://download.eclipse.org/modeling/emf/emf/updates/build.xml
With this script, you can add new and remove existing repositories from your composite repository usind "add" and "remove" command.

How to use:

  • ssh to build.eclipse.org
  • cd to your composite repository location
  • copy your new child repository e.g. cp /fromsomewhere/R201206060717/ .
  • run the script: ant -f /home/data/httpd/download.eclipse.org/modeling/emf/emf/updates/build.xml add -Dcomposite.name="My Project Composite Repository" -Dchild.repository=R201206060717
  • To remove R201206060717 from the composite repository again, run: ant -f /home/data/httpd/download.eclipse.org/modeling/emf/emf/updates/build.xml remove -Dchild.repository=R201206060717


Note: build.xml creates compositeContent.jar and compositeArtifacts.jar for you if they are not exist. -Dcomposite.name="My Project Composite Repository" is only neccessary if you create a new composite repository.
You can also read this wiki page:
http://wiki.eclipse.org/Equinox/p2/Ant_Tasks#Composite_Repository_Task



+Dennis Hübner

--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: creating a repository keeping all the versions [message #882867 is a reply to message #882836] Thu, 07 June 2012 06:48 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo Bettini
Messages: 1306
Registered: July 2009
Senior Member
Thanks Dennis for all your precious information! :)

cheers
Lorenzo

On 06/07/2012 11:43 AM, Dennis Huebner wrote:
> Hello Lorenzo,
>> Probably this
>> http://wiki.eclipse.org/Equinox/p2/Composite_Repositories_%28new%29#Sample_Composite_Metadata_Repository
>> ?
> Yes you can start here.
> It's probably good to see how other projects create their composite
> repositories e.g.:
> http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/?list
>
> compositeArtifacts.xml. Can also be zipped so it becomes
> compositeArtifacts.jar
> <?xml version='1.0' encoding='UTF-8'?>
> <?compositeArtifactRepository version='1.0.0'?>
> <repository name='M2T Xpand Update Site (Milestones)'
> type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository'
> version='1.0.0'>
> <properties size='1'>
> <property name='p2.timestamp' value='1338911403239'/>
> </properties>
> <children size='1'>
> <child location='S201206050419'/>
> </children>
> </repository>
> and compositeContent.xml (or jar)
> <?xml version='1.0' encoding='UTF-8'?>
> <?compositeMetadataRepository version='1.0.0'?>
> <repository name='M2T Xpand Update Site (Milestones)'
> type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository'
> version='1.0.0'>
> <properties size='1'>
> <property name='p2.timestamp' value='1338911403242'/>
> </properties>
> <children size='1'>
> <child location='S201206050419'/>
> </children>
> </repository>
>
> And please, don't forget to use a p2.index. Just put this file in your
> composite repository root.
> version = 1
> metadata.repository.factory.order = compositeContent.xml,\!
> artifact.repository.factory.order = compositeArtifacts.xml,\!
> See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=381598 :twisted:
>
>> However, as you said, this must be done manually, right?
> I used to do it manually. But in the meantime I use
> http://kenn-hussey.blogspot.de/'s ant script:
> http://download.eclipse.org/modeling/emf/emf/updates/build.xml
> With this script, you can add new and remove existing repositories from
> your composite repository usind "add" and "remove" command.
>
> How to use:
>
> ssh to build.eclipse.org
> cd to your composite repository location
> copy your new child repository e.g. cp /fromsomewhere/R201206060717/ .
> run the script: ant -f
> /home/data/httpd/download.eclipse.org/modeling/emf/emf/updates/build.xml
> add -Dcomposite.name="My Project Composite Repository"
> -Dchild.repository=R201206060717
> To remove R201206060717 from the composite repository again, run: ant -f
> /home/data/httpd/download.eclipse.org/modeling/emf/emf/updates/build.xml
> remove -Dchild.repository=R201206060717
>
>
> Note: build.xml creates compositeContent.jar and compositeArtifacts.jar
> for you if they are not exist. -Dcomposite.name="My Project Composite
> Repository" is only neccessary if you create a new composite repository.
> You can also read this wiki page:
> http://wiki.eclipse.org/Equinox/p2/Ant_Tasks#Composite_Repository_Task


--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Re: creating a repository keeping all the versions [message #882882 is a reply to message #882785] Thu, 07 June 2012 07:47 Go to previous message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2498
Registered: July 2009
Senior Member
On 2012-07-06 9:41, Lorenzo Bettini wrote:

> but from what I've read so far about aggregator I could create a
> composite site using the aggregator, couldn't I? Or that's another
> functionality?
>
Yes, you can use the aggregator to create composite sites. Don't know it
is the most practical to use in a build scenario - it is great for
combining multiple sources/sites, and especially good when you want to
setup inhouse mirrors, and possibly also serve some of the 3d party
content yourself. i.e. good for a bit more complex use cases.

Regards
- henrik
Previous Topic:buckminster 3.7 + subclipse 1.8.x is NOT compatible.
Next Topic:How to organize JUnit tests for running with Buckminster
Goto Forum:
  


Current Time: Fri Jul 25 13:43:00 EDT 2014

Powered by FUDForum. Page generated in 0.02862 seconds