[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] How to build a product without distribute eclipse features in the repository?

Hi everybody,

I'm trying to use Ganymede with p2 to build and distribute my product. My product is based on features and depends on org.eclipse.platform and org.eclipse.rcp. Currently, I'm using eclipse-SDK-I20080613-2000-win32 and eclipse-I20080613-2000-delta-pack versions.

I'm using headless build in order to build the product (using product build) and I've added the following p2 metadata generator tags in build.properties

generate.p2.metadata=true
p2.metadata.repo = file:${buildDirectory}/repo
p2.artifact.repo = file:${buildDirectory}/repo
p2.metadata.repo.name = Metadata Repo
p2.artifact.repo.name = Artifact Repo
p2.flavor = tooling
p2.publish.artifacts=true

Note 1: I verified that product build did not p2ize my product. It launches correctly, but I got the error "Cannot launch the Update UI. This installation has not been configured properly for Software Updates" when I try to open Help->Software Updates.

After that, I used p2 director to p2ize my product. To this, I used the following ant task:

<java failonerror="true" jar="/eclipse/plugins/org.eclipse.equinox.launcher_1.0.100.v20080509-1800.jar" fork="true">
    <arg line="-application org.eclipse.equinox.p2.director.app.application"/>
    <arg line="-metadataRepository /repo"/>
    <arg line="-artifactRepository /repo"/>
    <arg line="-installIU myproduct.product"/>
    <arg line="-destination /myproduct"/>
    <arg line="-profile MyProfile"/>
    <arg line="-profileProperties org.eclipse.update.install.features=true"/>
    <arg line="-bundlepool /myproduct"/>
    <arg line="-p2.os win32"/>
    <arg line="-p2.ws win32"/>
    <arg line="-p2.arch x86"/>
    <arg line="-roaming"/>
    <jvmarg value="-Declipse.p2.data.area=/myproduct/p2"/>
</java>

Note 2: My -installIU parameter is pointing to my product. The output product worked fine and the Help->Software Updates opened correctly, but the launcher icon was not updated as expected. In addition, I verified that the tab "Installed Softwares" only list one item, that is my product id.
The problem that I'm facing regards to the product update. I re-generated the metadata repository after updating one feature and one plugin version. I tried to use this NEW repository to update my product and I'd got the following error: "cannot find a solution where both match[requiredCapability: <featureName>/[1.0.0,1.0.0]] and match[requiredCapability: <featureName>/[1.0.1,1.0.1]] can be satisfied".

As a workaround, I tried to use the Eclipse Product export wizard to export the new feature, pointing it to the SAME directory where the previous repository (used to install the application using p2 director) was. After that I added this modified repository manually as a "new site" and the new version was displayed and ready for update (it worked!).

Now I'm facing the following problems:
1) How can I generate my repository just with the features that I distribute, that is, without org.eclipse.* (features and plugins)?
2) How can I turn available the eclipse features to be updated (see Note 2 above)?
3) Should I install ALL required features using p2 director in the same destination, to resolve question 2?
4) If I distribute my product installed as described above, how can I guarantee that users can update org.eclipse.* (features and plugins) when these updates are available? *

* As far as I understood, this kind of update will be available only if I put them into my repository (update site).

Thanks,
-- Euclides