How to build a product without distribute eclipse features in the repository?

View: New views
3 Messages — Rating Filter:   Alert me  

How to build a product without distribute eclipse features in the repository?

by Euclides Arcoverde :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

_______________________________________________
equinox-dev mailing list
equinox-dev@...
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Re: How to build a product without distribute eclipse features in the repository?

by Pascal Rapicault :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Answers embedded.

PaScaL


> 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".

Since your install is only made of one IU (myproduct.product), when looking for an update, p2 will only look for an update of it. Therefore any update has to be made by creating another version of myproduct.product.
Also if myproduct.product refers to a precise version of your feature, then trying to install another version of the feature will result in this situation.
If you are not trying to install the new version of teh feature on top, then you may have something else precisely referring to the old version of the feature.


> 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)?

I'm not sure what you are trying to do if you don't want to have the plug-ins :-)
Are you suggesting that you want to make your product available as an extension for an existing eclipse based application?

> 2) How can I turn available the eclipse features to be updated (see
> Note 2 above)?

Sorry, I don't understand

> 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).

The real question is how much of eclipse do you want to expose to your users. Do you expect them to know about eclipse and understand that they have to accept an update for org.eclipse.*, or instead do you expect them to only know about your product and as such only be prompted for update to it.
If you go for a model where the user is unaware of eclipse, then you will need to publish an update to your product, and make sure that there is a reference from one of the repository available to the new version of the eclipse bits you want to use. You may also want to have your product (or a part of it) refer to at the newest version of the eclipse bits you depend on.
If you go for a model where what the user sees in the "installed software" dialog is "RCP" and "MyProduct". Then you have nothing to do. However you have to ask yourself whether you think you can let the user update themselves to this new version of RCP without you having tested it (for example imagine the case where the user happens to have added the ganymede repo).

HTH,

PaScaL

_______________________________________________
equinox-dev mailing list
equinox-dev@...
https://dev.eclipse.org/mailman/listinfo/equinox-dev


Re: How to build a product without distribute eclipse features in the repository?

by Euclides Arcoverde :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Pascal,

Thanks for your help. In order to list ALL features (+ product) in the Installed Softwares tab, I installed all feature groups using director in the same destination.

Currently I'm facing a problem regarding update sites. I'm trying to check if there are updates for my installed product (or features) and every time I try this, a dialog appears saying there is no updates available, but my update site did not receive any request. I've found an message in newsgroup related to this "issue" (http://www.eclipse.org/newsportal/article.php?id=4774&group=eclipse.technology.equinox#4774).

Following I'll list the steps I've tried. Please, let me know if this (steps 6 and 7) is the behavior of "p2ized" products, or if this behavior may be an issue.

1. Generate the repository (using the Eclipse Product export wizard or adding p2 metatada generator tags in build.properties for headless build)
2. Use director app to install (p2ize) the product (.product) and all required features
3. Open the just p2ized product
4. Go to Help->Software Updates (my product and all features are being listed in "Installed Softwares" tab)
5. If I select any installed feature/product and then click on "Update...", immediately an information dialog opens saying "There is nothing to update" (my update site did not received any request as well)
6. In "Available Software" tab, there are no URLs listed in order to find updates of my product
7. In the same tab (Available Software), if I click on "Manage Sites..." there is nothing listed as well

I was opened my features.xml contents and verified that the tags "<url> <update ... /> <discovery ... /> </url>" seems to be ok.

If I remove p2 of my "p2ized" product (following the steps described in http://wiki.eclipse.org/Equinox_p2_Removal), the update sites were listed and works fine in the old UM.

Thanks,
-- Euclides

_______________________________________________
equinox-dev mailing list
equinox-dev@...
https://dev.eclipse.org/mailman/listinfo/equinox-dev