Updating with P2 from PDE-built to Buckminster-built product [message #955211] |
Tue, 23 October 2012 12:03  |
Eclipse User |
|
|
|
Hi all!
I think we have a similar problem like Mr. Scholz in http://www.eclipse.org/forums/index.php/mv/msg/354684/875978/#msg_875978 with our project.
Our RCP project uses an implementation of the P2 Operations API (UpdateOperation + ProvisioningJob) for updating.
Previous versions have been built via the PDE Export wizard but as our project kept growing, we decided to setup a buildsystem using Buckminster Headless within a Jenkins CI.
The problem now is that the PDE-built products cannot be updated from repositories built with Buckminster. The result of an update request would simply state "nothing to update".
As I was analysing the differences between PDE and Buckminster built repos/products, I noticed that the names of the profiles and root IUs differ.
The projects consists of two products therefor we chose two releng features containing the product definitions and a reference to our main plugin (where the product extension point is defined).
With the following product definition (filename: myAppA.product)
- ID: "" (blank)
- version: "1.0.0.qualifier"
- name: "myAppAProduct"
- product: "myAppA.main.product"
- application: "myAppA.main.application"
... this is what is generated:
1. by PDE export wizard:
1.1 content.xml in repo
Quote:
...
<unit id='myAppA.main.product' version='1.0.0.201207181026'>
<update id='myAppA.main.product' range='0.0.0' severity='0'/>
<properties size='3'>
<property name='org.eclipse.equinox.p2.name' value='myAppAProduct'/>
<property name='lineUp' value='true'/>
<property name='org.eclipse.equinox.p2.type.group' value='true'/>
</properties>
<provides size='1'>
<provided namespace='org.eclipse.equinox.p2.iu' name='myAppA.main.product' version='1.0.0.201207181026'/>
</provides>
...
1.2 profile-file in ./p2/org.eclipse.equinox.p2.engine/profileRegistry/<profilename>/<latest>.profile.gz
Profile name is "profile.profile"
Quote:
...
<iuProperties id='myAppA.main.product' version='1.0.0.201207181026'>
<properties size='2'>
<property name='org.eclipse.equinox.p2.internal.inclusion.rules' value='STRICT'/>
<property name='org.eclipse.equinox.p2.type.root' value='true'/>
</properties>
</iuProperties>
<iuProperties id='myAppA.main.product_root.win32.win32.x86' version='1.0.0.201207181026'>
<properties size='1'>
<property name='unzipped|@artifact|/some/path' value='/some/path/myAppA|'/>
</properties>
</iuProperties>
</iusProperties>
...
2. by Buckminster:
We perform the standard site.p2 action as prerequesite to a rather common create.product action which calls p2's director:
Quote:
<java jar="${equinox.launcher.jar}" fork="true" failonerror="true">
<arg value="-application" />
<arg value="org.eclipse.equinox.p2.director" />
<arg value="-repository" />
<arg value="${repository}" />
<arg value="-destination" />
<arg value="${destination}" />
<arg value="-profile" />
<arg value="${profile}" />
<arg value="-profileProperties" />
<arg value="org.eclipse.update.install.features=true" />
<arg value="-installIU" />
<arg value="${iu}" />
<arg value="-p2.os" />
<arg value="${target.os}" />
<arg value="-p2.ws" />
<arg value="${target.ws}" />
<arg value="-p2.arch" />
<arg value="${target.arch}" />
<arg value="-roaming" />
<arg value="-consoleLog" />
</java>
Where the iu property is set to myAppA.product.
To stop Buckminster from complaining (about "The installable unit myAppA.product has not been found.") I had to change the ID in the product definition to "myAppA.product".
Now Buckminster builts just fine, but with following differences to the PDE-wizard...
2.1 content.xml in repo
Quote:
...
<unit id='myAppA.product' version='3.1.1'>
<update id='myAppA.product' range='0.0.0' severity='0'/>
<properties size='3'>
<property name='org.eclipse.equinox.p2.name' value='myAppAProduct'/>
<property name='lineUp' value='true'/>
<property name='org.eclipse.equinox.p2.type.group' value='true'/>
</properties>
<provides size='1'>
<provided namespace='org.eclipse.equinox.p2.iu' name='myAppA.product' version='3.1.1'/>
</provides>
...
2.2 profile-file in ./p2/org.eclipse.equinox.p2.engine/profileRegistry/<profilename>/<latest>.profile.gz
Quote:
...
<iusProperties size='175'>
<iuProperties id='myAppA.product' version='3.1.1'>
<properties size='2'>
<property name='org.eclipse.equinox.p2.internal.inclusion.rules' value='STRICT'/>
<property name='org.eclipse.equinox.p2.type.root' value='true'/>
</properties>
</iuProperties>
<iuProperties id='myAppA.product.executable.win32.win32.x86' version='3.1.1'>
<properties size='1'>
<property name='unzipped|@artifact|/path/to/product_built' value='/path/to/product_built/eclipsec.exe|/path/to/product_built/myAppA.exe|'/>
</properties>
</iuProperties>
</iusProperties>
...
Is there any chance to make Buckminster build just like PDE does?
Any help will be greatly appreciated.
Kind regards,
M. Emmerling
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03385 seconds