Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to ship PDE/P2 build product with update sites pre-configured(Trying to get product to include update sites after building it using PDE build with P2 enabled)
How to ship PDE/P2 build product with update sites pre-configured [message #533540] Fri, 14 May 2010 13:55 Go to next message
Eddie Galvez is currently offline Eddie GalvezFriend
Messages: 103
Registered: July 2009
Senior Member
We build a product using PDE headless build, enabling P2 (p2.gathering=true), but when the product is run and one goes to install new software, no update sites are preconfigured.

I tried adding update sites ("discovery") to our main feature's manifest, and that had no effect.

I'm just trying to place the eclipse 3.5 update sites (galileo and platform project updates) into our product, that's all.
Re: How to ship PDE/P2 build product with update sites pre-configured [message #535773 is a reply to message #533540] Tue, 25 May 2010 14:51 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Since you are using "p2.gathering=true", you can provide a p2.inf file
beside your .product file.
http://wiki.eclipse.org/Equinox/p2/Customizing_Metadata

Add something like the following:
instructions.configure.import= \
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository
instructions.configure=\
addRepository(type:0,location:http${#58}//example.com/reposi tory,\
name:My Repository);\
addRepository(type:1,loation:http${#58}//example.com/reposit ory,\
name:My Repository);

0) The import isn't strictly necessary for p2.inf beside the .product file,
but will be necessary if you put it beside a feature.xml instead.
1) this is a java Properties file, I just escaped the newlines with \
to make it more readable
2) You need the repository twice, the 'type' is metadata or artifact
3) Notice the escaping of the colon with ${#58}

-Andrew


Eddie Galvez wrote:

> We build a product using PDE headless build, enabling P2
> (p2.gathering=true), but when the product is run and one goes to install
> new software, no update sites are preconfigured.
>
> I tried adding update sites ("discovery") to our main feature's manifest,
> and that had no effect.
>
> I'm just trying to place the eclipse 3.5 update sites (galileo and
> platform project updates) into our product, that's all.
Re: How to ship PDE/P2 build product with update sites pre-configured [message #537480 is a reply to message #535773] Wed, 02 June 2010 15:15 Go to previous messageGo to next message
Eddie Galvez is currently offline Eddie GalvezFriend
Messages: 103
Registered: July 2009
Senior Member
Andrew, I've had no luck --

I put p2.inf next to the .product file (which is the same plug-in that defines the product extension).
The exact contents:

instructions.configure.import= org.eclipse.equinox.p2.touchpoint.eclipse.addRepository
instructions.configure=addRepository(type:0,location:http${# 58}//download.eclipse.org/releases/galileo,name:Galileo,enab led:true);addRepository(type:1,location:http${#58}//download .eclipse.org/releases/galileo,name:Galileo,enabled:true);

and p2.inf is included in build.properties for a binary build.

But, nothing happens. The log shows nothing interesting. I see the p2 activity, but no word about p2.inf (not sure what else I could be looking for).

Ideas?

This is a headless build, driven by ant and using the headless pde builer.
Re: How to ship PDE/P2 build product with update sites pre-configured [message #537546 is a reply to message #537480] Wed, 02 June 2010 19:56 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
You can check to see if the p2.inf got read properly by looking in the
resulting buildDirectory/buildRepo/content.xml

In there you should expect to find a <unit> element with id matching your
product id from the .product file. This element should contain
touchpointData with instructions that match what you put in your p2.inf
file.

This is how the Eclipse SDK product does it, I posted part of the
content.xml here: http://pastebin.com/dK7p4SeC

-Andrew

Eddie Galvez wrote:

> Andrew, I've had no luck --
>
> I put p2.inf next to the .product file (which is the same plug-in that
> defines the product extension). The exact contents:
>
> instructions.configure.import=
> org.eclipse.equinox.p2.touchpoint.eclipse.addRepository
> instructions.configure=addRepository(type:0,location:http${#
> 58}//download.eclipse.org/releases/galileo,name:Galileo,enab
> led:true);addRepository(type:1,location:http${#58}//download
> .eclipse.org/releases/galileo,name:Galileo,enabled:true);
>
> and p2.inf is included in build.properties for a binary build.
>
> But, nothing happens. The log shows nothing interesting. I see the p2
> activity, but no word about p2.inf (not sure what else I could be looking
> for).
>
> Ideas?
>
> This is a headless build, driven by ant and using the headless pde builer.
Re: How to ship PDE/P2 build product with update sites pre-configured [message #538060 is a reply to message #537546] Fri, 04 June 2010 18:31 Go to previous messageGo to next message
Eddie Galvez is currently offline Eddie GalvezFriend
Messages: 103
Registered: July 2009
Senior Member
thanks for those pointers -- I did find content.xml, and I did find a proper looking touchpointData element, with the right stuff. So someone saw it, at some point. I'll have to debug a bit more -- thanks!
Re: How to ship PDE/P2 build product with update sites pre-configured [message #605916 is a reply to message #535773] Wed, 02 June 2010 15:15 Go to previous messageGo to next message
Eddie Galvez is currently offline Eddie GalvezFriend
Messages: 103
Registered: July 2009
Senior Member
Andrew, I've had no luck --

I put p2.inf next to the .product file (which is the same plug-in that defines the product extension).
The exact contents:

instructions.configure.import= org.eclipse.equinox.p2.touchpoint.eclipse.addRepository
instructions.configure=addRepository(type:0,location:http${# 58}//download.eclipse.org/releases/galileo,name:Galileo,enab led:true);addRepository(type:1,location:http${#58}//download .eclipse.org/releases/galileo,name:Galileo,enabled:true);

and p2.inf is included in build.properties for a binary build.

But, nothing happens. The log shows nothing interesting. I see the p2 activity, but no word about p2.inf (not sure what else I could be looking for).

Ideas?

This is a headless build, driven by ant and using the headless pde builer.
Re: How to ship PDE/P2 build product with update sites pre-configured [message #605920 is a reply to message #605916] Wed, 02 June 2010 19:56 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
You can check to see if the p2.inf got read properly by looking in the
resulting buildDirectory/buildRepo/content.xml

In there you should expect to find a <unit> element with id matching your
product id from the .product file. This element should contain
touchpointData with instructions that match what you put in your p2.inf
file.

This is how the Eclipse SDK product does it, I posted part of the
content.xml here: http://pastebin.com/dK7p4SeC

-Andrew

Eddie Galvez wrote:

> Andrew, I've had no luck --
>
> I put p2.inf next to the .product file (which is the same plug-in that
> defines the product extension). The exact contents:
>
> instructions.configure.import=
> org.eclipse.equinox.p2.touchpoint.eclipse.addRepository
> instructions.configure=addRepository(type:0,location:http${#
> 58}//download.eclipse.org/releases/galileo,name:Galileo,enab
> led:true);addRepository(type:1,location:http${#58}//download
> .eclipse.org/releases/galileo,name:Galileo,enabled:true);
>
> and p2.inf is included in build.properties for a binary build.
>
> But, nothing happens. The log shows nothing interesting. I see the p2
> activity, but no word about p2.inf (not sure what else I could be looking
> for).
>
> Ideas?
>
> This is a headless build, driven by ant and using the headless pde builer.
Re: How to ship PDE/P2 build product with update sites pre-configured [message #605930 is a reply to message #537546] Fri, 04 June 2010 18:31 Go to previous message
Eddie Galvez is currently offline Eddie GalvezFriend
Messages: 103
Registered: July 2009
Senior Member
thanks for those pointers -- I did find content.xml, and I did find a proper looking touchpointData element, with the right stuff. So someone saw it, at some point. I'll have to debug a bit more -- thanks!
Previous Topic:Casting ISelection to IMethod
Next Topic:Debugging a PDE with attached jar?
Goto Forum:
  


Current Time: Fri Apr 26 14:43:11 GMT 2024

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

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

Back to the top