Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » How to add <references> to metadata repository(Add an update site URL to content.xml)
How to add <references> to metadata repository [message #550805] Wed, 04 August 2010 12:06 Go to next message
Martin Skorsky is currently offline Martin SkorskyFriend
Messages: 112
Registered: July 2009
Senior Member
How can I add <references> to a metadata repository?
When I add a section
<references size='2'>
<repository uri='http://www.example.com/eclipse/updates' url='http://www.example.com/eclipse/updates' type='0' options='0'/>
<repository uri='http://www.example.com/eclipse/updates' url='http://www.example.com/eclipse/updates' type='1' options='0'/>
</references>
to content.xml
this update site is listed in the Available Software Sites.

Can some task during PDE build do this?
Are the details of <references> documented somewhere?
Is there some other tooling in p2 to add this to content.xml?
Re: How to add <references> to metadata repository [message #552564 is a reply to message #550805] Thu, 12 August 2010 15:55 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Site.xml files can be used to categorize your repository. You specify it
using "p2.category.site"
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_p2_productbuilds.htm

I've never tried this myself, but it appears that old style update sites had
an attribute "associateSitesURL".
There is some documentation here:
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/reference/misc/update_sitemap.html
This should be a relative url which points to an xml file which lists the
assoicated sites.

Looking at the code p2 publishing code
(SiteXMLAction#getFeatureToCategoryMappings), it appears that if the
site.xml contains the associateSitesURL, then these URLs will be read and
set on the repository as references.

Using the "p2.category.site" property to categorize your build will probably
add the references to the internal build repo and not the final result repo
because I don't believe these references are mirrored between repos.

You probably have make an extra call to add these to the final repo, you can
do this with the <eclipse.publish.featuresAndBundles/> ant task
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. pde.doc.user/tasks/pde_p2_buildtasks.htm
<eclipse.publish.featuresAndBundles repository="file:/build/repository"
site="file:/build/site.xml" >

It may also be possible to use the UpdateSite Publisher application
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/p2_publisher.html


Martin Skorsky wrote:

> How can I add <references> to a metadata repository?
> When I add a section
> <references size='2'>
> <repository uri='http://www.example.com/eclipse/updates'
> url='http://www.example.com/eclipse/updates' type='0' options='0'/>
> <repository uri='http://www.example.com/eclipse/updates'
> url='http://www.example.com/eclipse/updates' type='1' options='0'/>
> </references>
> to content.xml
> this update site is listed in the Available Software Sites.
>
> Can some task during PDE build do this?
> Are the details of <references> documented somewhere?
> Is there some other tooling in p2 to add this to content.xml?
Previous Topic:How to add <references> to metadata repository
Next Topic:How to remove stuff from update site?
Goto Forum:
  


Current Time: Fri Apr 26 22:01:32 GMT 2024

Powered by FUDForum. Page generated in 0.03316 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top