Skip to main content



      Home
Home » Eclipse Projects » P2 » Multipe URLs in p2.repo property of runDirector task
Multipe URLs in p2.repo property of runDirector task [message #546010] Fri, 09 July 2010 17:15 Go to next message
Eclipse UserFriend
Apologies in advance for reposting this, but I think this is actually more relevant to P2 and I wasn't getting any response in the PDE forum.

I have a product build that worked fine in Galileo. In the pre.archive target, I would install our plugins like this:

<ant antfile="${genericTargets}" target="runDirector" inheritAll="true">
<property name="p2.repo" value="file://${base}/../updatesite/target/site, http://dev/nexus/content/groups/helios"/>
<property name="p2.director.iu" value="org.stack.ide.common.feature.feature.group"/>
<property name="p2.director.installPath" value="${eclipse.base}"/>
</ant>

However, in Helios, it looks like it is trying to replace all double slashes with a single slash, including the double slash after http:. The error I get when running my build is:

[java] [p2.director] Unable to read repository at http:/dev/nexus/content/groups/helios/artifacts.xml.

[java] [p2.director] Unable to read repository at http:/dev/nexus/content/groups/helios/content.xml.

You'll note the single slash after http:. This is causing our builds to not work.

After digging around a little, I think I've made a little bit of progress in finding the root cause here:

In org.eclipse.equinox.p2.director.app.ant.DirectorTask, the artifact and metadata repository strings are turned into a URI, then back into a string. Then when it calls DirectorApp.run, those strings are split (on ,) and turned back into URIs again.

It seems as though DirectorApplication supports multiple repos just fine, but DirectorTask does not - creating the URI the first time is what is causing http:// to become http:/.

The question is, how was this working in the first place? That behavior doesn't seem to have changed since 3.5.2. Further, should it be acceptable to pass in a comma-separated list of p2 repos?

Thanks for any feedback.

- Spencer
Re: Multipe URLs in p2.repo property of runDirector task [message #546398 is a reply to message #546010] Mon, 12 July 2010 11:48 Go to previous messageGo to next message
Eclipse UserFriend
Can you please raise a bug on p2 for this. You are correct that the ant
task does not work well with lists of repositories.

In 3.5.2 there was no <p2.director> ant task, the genericTargets/runDirector
was execing a new java instance and running the application.

One possible workaround would be to first create a local composite
repository that pointed to the two repos you wanted to use, and then pass
the composite to the director task.

<p2.composite.repository location="file:/${buildDirectory}/localComposite" >
<add>
<repository location="file://${base}/../updatesite/target/site"/>
<repository location="http://dev/nexus/content/groups/helios" />
</add>
</p2.composite.repository>


-Andrew
Spencer Uresk wrote:

> Apologies in advance for reposting this, but I think this is actually more
> relevant to P2 and I wasn't getting any response in the PDE forum.
>
> I have a product build that worked fine in Galileo. In the pre.archive
> target, I would install our plugins like this:
>
> <ant antfile="${genericTargets}" target="runDirector" inheritAll="true">
> <property name="p2.repo" value="file://${base}/../updatesite/target/site,
> http://dev/nexus/content/groups/helios"/> <property name="p2.director.iu"
> value="org.stack.ide.common.feature.feature.group"/> <property
> name="p2.director.installPath" value="${eclipse.base}"/> </ant>
>
> However, in Helios, it looks like it is trying to replace all double
> slashes with a single slash, including the double slash after http:. The
> error I get when running my build is:
>
> Unable to read repository at
> [http:/dev/nexus/content/groups/helios/artifacts.xml.
>
> [p2.director] Unable to read repository at
> [http:/dev/nexus/content/groups/helios/content.xml.
>
> You'll note the single slash after http:. This is causing our builds to
> not work.
>
> After digging around a little, I think I've made a little bit of progress
> in finding the root cause here:
>
> In org.eclipse.equinox.p2.director.app.ant.DirectorTask, the artifact and
> metadata repository strings are turned into a URI, then back into a
> string. Then when it calls DirectorApp.run, those strings are split (on ,)
> and turned back into URIs again.
>
> It seems as though DirectorApplication supports multiple repos just fine,
> but DirectorTask does not - creating the URI the first time is what is
> causing http:// to become http:/.
>
> The question is, how was this working in the first place? That behavior
> doesn't seem to have changed since 3.5.2. Further, should it be acceptable
> to pass in a comma-separated list of p2 repos?
>
> Thanks for any feedback.
>
> - Spencer
Re: Multipe URLs in p2.repo property of runDirector task [message #546456 is a reply to message #546398] Mon, 12 July 2010 16:12 Go to previous message
Eclipse UserFriend
Andrew,

Thanks for the help, your workaround did the trick.

I've logged a bug for this:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=319619

- Spencer
Re: Multipe URLs in p2.repo property of runDirector task [message #561714 is a reply to message #546398] Mon, 12 July 2010 16:12 Go to previous message
Eclipse UserFriend
Andrew,

Thanks for the help, your workaround did the trick.

I've logged a bug for this:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=319619

- Spencer
Previous Topic:Multipe URLs in p2.repo property of runDirector task
Next Topic:P2 Update Fails After Port from 3.5 to 3.6 Helios
Goto Forum:
  


Current Time: Mon Jul 07 08:49:10 EDT 2025

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

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

Back to the top