Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » p2.inf file is ignored(Headless Build - default repositories added through p2.inf file is ignored)
p2.inf file is ignored [message #652051] Wed, 02 February 2011 14:17 Go to next message
Praveen  is currently offline Praveen Friend
Messages: 86
Registered: July 2009
Member
I am trying to configure default repositories to my RCP application through p2.inf file. However, the Application does not contain the added repositories in 'Available Software sites' preference. We use Headless build for building the product.

Is there any property that needs to be specified in build.xml for considering the data in p2.inf file ?

The format of p2.inf file is
----------------------------------------------------
instructions.configure=\
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type :0,location:http${#58}// <data>);\
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type :1,location:http${#58}// <data>);
----------------------------------------------------

The build.properties specify p2.gathering = true

I think I am missing a property for including p2.inf into the build.xml file ?
Re: p2.inf file is ignored [message #652165 is a reply to message #652051] Wed, 02 February 2011 20:16 Go to previous messageGo to next message
Laurent Marchal is currently offline Laurent MarchalFriend
Messages: 91
Registered: July 2009
Member
Hi,
Where did you put the p2.inf file ? mine is located at the root of my
root feature and works fine.

Laurent Marchal.



Le 02/02/2011 08:17 AM, Praveen a écrit :
> I am trying to configure default repositories to my RCP application
> through p2.inf file. However, the Application does not contain the added
> repositories in 'Available Software sites' preference. We use Headless
> build for building the product.
>
> Is there any property that needs to be specified in build.xml for
> considering the data in p2.inf file ?
>
> The format of p2.inf file is
> ----------------------------------------------------
> instructions.configure=\
> org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type
> :0,location:http${#58}// <data>);\
> org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(type
> :1,location:http${#58}// <data>);
> ----------------------------------------------------
>
> The build.properties specify p2.gathering = true
>
> I think I am missing a property for including p2.inf into the build.xml
> file ?
Re: p2.inf file is ignored [message #652201 is a reply to message #652165] Thu, 03 February 2011 02:49 Go to previous messageGo to next message
Praveen  is currently offline Praveen Friend
Messages: 86
Registered: July 2009
Member
p2.inf file is located along with the .product and build.properties files. I guess it should be picked up by p2 during HEADLESS build.

What does these lines mean to p2 ?
p2.metadata.repo=file:${builder}/repository
p2.artifact.repo=file:${builder}/repository
Re: p2.inf file is ignored [message #652278 is a reply to message #652201] Thu, 03 February 2011 12:54 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 02/02/2011 09:49 PM, Praveen wrote:
>
> What does these lines mean to p2 ?
> p2.metadata.repo=file:${builder}/repository
> p2.artifact.repo=file:${builder}/repository

That tells PDE build where to generate the p2 output.

If you have a p2.inf with your product file, how are you consuming your
..product file? Is it a product build?

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: p2.inf file is ignored [message #652286 is a reply to message #652278] Thu, 03 February 2011 13:27 Go to previous messageGo to next message
Praveen  is currently offline Praveen Friend
Messages: 86
Registered: July 2009
Member
Yes Paul. We run p2 product build as target.

Are there any params we need to pass while Running p2 publishing task ? Currently we are using p2 application as FeaturesAndBundlesPublisher and the -artifactRepository and -metadataRepository are specified with args as -publishArtifacts.

Please let me know if any other info is required. I would like to know what is the desired location for p2.inf to be placed, or any params to be used in build.xml or build.properties to consider p2.inf so that the sites are published in 'Available update sites'.

Thanks,
Praveen.
Re: p2.inf file is ignored [message #652298 is a reply to message #652286] Thu, 03 February 2011 13:54 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 02/03/2011 08:27 AM, Praveen wrote:
> Yes Paul. We run p2 product build as target.

This should generate the p2 repos with the product IU (which contains
the p2.inf information) and build the product zips for each platform
config specified, right?


> Are there any params we need to pass while Running p2 publishing task ?
> Currently we are using p2 application as FeaturesAndBundlesPublisher and
> the -artifactRepository and -metadataRepository are specified with args
> as -publishArtifacts.

What are you doing with this step? It's only needed if you have a set
of features and plugins that have no corresponding p2 metadata (like an
old update site that wasn't generated with p2).

Your product-level p2.inf should be with your .product file.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: p2.inf file is ignored [message #652819 is a reply to message #652298] Mon, 07 February 2011 08:05 Go to previous messageGo to next message
Praveen  is currently offline Praveen Friend
Messages: 86
Registered: July 2009
Member
At last I get it worked when I placed p2 advice file (p2.inf) in a plug-in's META-INF folder.

Looks the p2.inf is not handled properly when it is placed with .product file (though I see the <buildno>/buildrepo/content.xml shows the touchpoint instruction added into it after headless build). The same file works charm when it is located in META-INF folder.
Re: p2.inf file is ignored [message #652877 is a reply to message #652819] Mon, 07 February 2011 13:03 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 02/07/2011 03:05 AM, Praveen wrote:
> Looks the p2.inf is not handled properly when it is placed with .product
> file (though I see the <buildno>/buildrepo/content.xml shows the
> touchpoint instruction added into it after headless build). The same
> file works charm when it is located in META-INF folder.

The product p2.inf should be with the .product file, and work. When you
were building your product, were you using the product IU id or the
feature IU to build it?

If the p2.inf isn't working with the .product file (it is for us), then
please open a bug so it can be fixed.

You've introduced a workaround by tying your product meta-information to
a plugin (which means it would be included in all products that include
that plugin).

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: p2.inf file is ignored [message #652893 is a reply to message #652877] Mon, 07 February 2011 13:32 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 02/07/2011 08:03 AM, Paul Webster wrote:
>
> The product p2.inf should be with the .product file, and work. When you
> were building your product, were you using the product IU id or the
> feature IU to build it?

In this context "build it" means the call to the director to instantiate
the product for a specific platform on the disk.

PW



--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Equinox Aspects Weaving Problem
Next Topic:p2 - update the core bundle doesn't work
Goto Forum:
  


Current Time: Tue Apr 23 09:46:48 GMT 2024

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

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

Back to the top