Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] how to add <repository /> element to <references /> in content.xml

Thanks John, what I've found is that p2 publisher will use additional sites from feature.xml (discovery) but it disables the discovery sites by default so those sites will not be used when the original provisioning planning happens and thus those dependencies can't be resolved.  When I try the p2.inf route, those touchpoints seem to get executed during the installation of the feature, but in my case my feature can't make it out of the planning stage since those repositories aren't available to the p2 dependency resolver initially.

What I have done instead is start listing my dependency features explicitly in my site.xml.  This will just cause tycho (and eventually p2) to mirror my dependent features into my updatesite.  I would rather not have to do that but it keeps me from having to write a ant script to hack the content.xml content.  

Thanks again for taking time to respond.

On Tue, May 31, 2011 at 3:42 PM, John Arthorne <arthorne.eclipse@xxxxxxxxx> wrote:
It's hard to say because I don't know anything about Tycho or the rest of your build process. The p2 publisher will take site references from feature.xml, and/or instructions from a p2.inf file to add additional repository references. However if you're not running the right p2 publisher task in your build it won't happen. Although inconvenient I don't see a problem with manually adding the references to content.xml as you describe.

John



On Tue, May 31, 2011 at 12:27 PM, Greg Amerson <gregory.amerson@xxxxxxxxxxx> wrote:
Any ideas?  I guess it would not be hard to write a script to unzip the content.jar, edit the contents of content.xml to add the references and rezip it, but I just wanted to make sure there wasn't a better way to do this directly with p2.


On Wed, May 25, 2011 at 5:26 PM, Greg Amerson <gregory.amerson@xxxxxxxxxxx> wrote:
For full context for the reason why I'm asking is I'm trying to use tycho to create an updatesite.  However, I need to make sure that the content.xml has some additional referenced repositories (Sapphire, Graphiti update-sites) without the user having to manually add 2 updatesites to install my plugins.  

At first I tried the eclipse-repository tycho package type.  However, I didn't know how to get the additional repos into content.xml.  Then I tried the other packaging type for tycho eclipse-update-site which runs UpdateSitePublisher.  I knew that with that program you could use associateSitesURL attribute to get the additional repos into content.xml.  The problem with this approach is that Tycho can not yet use a co-located assocaite-sites.xml where you store your additional repos in a xml file that is in the same updatesite eclipse project.  There is a bug for this that I have open but it is still open.

I've read from Tycho team that eclipse-repository packaging type (which doesn't use site.xml) is the future and I wanted to go towards that but have no idea how to get the referenced repositories into content.xml

John, I've tried adding additional discovery urls to my feature.xml but that doesn't seem to cause the eclipse-repository created by tycho have the correct output.  I think that tycho eclipse-repository package type uses the p2 mirror application but I'm not 100%.  Regardless using discovery urls + tycho-p2-repository-plugin(p2 mirror application) doesn't seem to do the trick.

Thoughts?


On Wed, May 25, 2011 at 4:23 PM, Greg Amerson <gregory.amerson@xxxxxxxxxxx> wrote:
How do you specify additional update-sites in feature.xml?  Do you just add <discovery /> urls under the <url> element in feature.xml?


On Wed, May 25, 2011 at 3:22 PM, John Arthorne <arthorne.eclipse@xxxxxxxxx> wrote:
You can also add an update site reference to a feature.xml file. This will be converted into a repository reference by the p2 publisher. Finally you can use a p2.inf file in a product to specify the repository location for that product. There is an excellent introduction to that here:

http://www.ralfebert.de/blog/eclipsercp/p2_updates_tutorial/#add_selfupdate_to_the_application

John



On Wed, May 25, 2011 at 1:20 PM, Greg Amerson <gregory.amerson@xxxxxxxxxxx> wrote:
Hello all,

What is the official way to add repository elements the <references /> list in content.xml?  I know at least one way is to have UpdateSitePublisher run on a old-style site.xml file that specifies an associateSitesURL attribute that points to a local associate-sites.xml file.  Is there a way to accomplish this without using an old-style site?  

Thanks!

--
Greg Amerson (@greg_amerson)
Liferay, Inc. (#liferay)

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



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




--
Greg Amerson (@greg_amerson)
Liferay, Inc. (#liferay)



--
Greg Amerson (@greg_amerson)
Liferay, Inc. (#liferay)



--
Greg Amerson (@greg_amerson)
Liferay, Inc. (#liferay)

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



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




--
Greg Amerson (@greg_amerson)
Liferay, Inc. (#liferay)

Back to the top