Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Is it possible to support multiple env in the same p2 repository?
Is it possible to support multiple env in the same p2 repository? [message #1766436] Wed, 21 June 2017 13:42 Go to next message
Guillaume Papon is currently offline Guillaume PaponFriend
Messages: 13
Registered: August 2016
Junior Member
Hello guys,

I have an eclipse RCP app which supports both windows and macos x.

I would like to know if it is possible to use the same p2 repository for updating both windows and mac versions?

When i look inside the repo, the content of repository/binary seems to contain the executable, so i tried to put both windows and macos binaries into this directory but only one is working.

In content.jar, there is env specifc configuration, so i wonder if there is any mean to make several versions share the same repo, or if i need one repo per env?
Re: Is it possible to support multiple env in the same p2 repository? [message #1766438 is a reply to message #1766436] Wed, 21 June 2017 13:46 Go to previous messageGo to next message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
Yes, it is possible to support multiple environments in the same p2 repository.
This is what the Eclipse Platform and the Release train repos are doing.
This is achieved by having IUs (one unit of xml in the content.xml file contained in the content.jar) have filtered requirements. For example you would have your main IU for your product (or some subpart) requiring the windows executable and also requiring the macos executable.

For this to work, you just need to export the application targeting multiple platforms.
Re: Is it possible to support multiple env in the same p2 repository? [message #1766457 is a reply to message #1766438] Wed, 21 June 2017 15:30 Go to previous messageGo to next message
Guillaume Papon is currently offline Guillaume PaponFriend
Messages: 13
Registered: August 2016
Junior Member
Thank you Pascal for your quick reply.

Where should i do this?

I added an extra mac environment in my maven target-platform-configuration but when ran on windows, it failed buinding the mac version with this message:

Quote:
Cannot complete the install because one or more required items could not be found.
Software being installed: fast 2.0.3 (dp.fast.product 2.0.3)
Missing requirement for filter properties ~= $0: dp.fast.product.executable.cocoa.macosx.cocoa 2.0.3 requires 'org.eclipse.equinox.launcher.cocoa.macosx 0.0.0' but it could not be found
Cannot satisfy dependency:
From: fast 2.0.3 (dp.fast.product 2.0.3)
To: toolingdp.fast.product.application [2.0.3]
Cannot satisfy dependency:
From: toolingdp.fast.product.application 2.0.3
To: dp.fast.product.executable.cocoa.macosx.cocoa [2.0.3]


I think it is the only place where i set something related to envirenment.

I also tried to uncheck "This product includes native launcher artifacts" in the product definition, and although it succeded building both products, in the repository i no more have the binary directory.

[Updated on: Wed, 21 June 2017 15:40]

Report message to a moderator

Re: Is it possible to support multiple env in the same p2 repository? [message #1766888 is a reply to message #1766457] Wed, 28 June 2017 15:01 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 659
Registered: January 2012
Senior Member

You need to specify the different target platforms that you want to support. See the following page for an example:

https://wiki.eclipse.org/Tycho/Reference_Card#Target_runtime_environment


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:Plugin installation is really slow
Next Topic:artifacts.xml documentation?
Goto Forum:
  


Current Time: Tue Oct 17 18:58:42 GMT 2017

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

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