Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331588

Summary: Attempt to build p2 repository for RCP Mail sample app/product fails due to missing SWT platform fragments
Product: z_Archived Reporter: Robert M. Fuhrer <rfuhrer>
Component: BuckminsterAssignee: buckminster.core-inbox <buckminster.core-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: thomas
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Robert M. Fuhrer CLA 2010-12-01 14:10:51 EST
[FWIW, my problem seems strongly related to bug #320408, hence my posting as a bug rather than on a newsgroup. Apologies if this turns out not to be appropriate...]

I'm investigating using Buckminster as the build engine for the IMP project (http://www.eclipse.org/imp). [Right now, we're using PDE-derived Ant scripts.]

To get started, I followed the Buckminster tutorial at http://www.ralfebert.de/blog/eclipsercp/rcp_builds/ and got the following error when building the p2 site using "Buckminster" => "Invoke Action" => "site.p2":

    No component named org.eclipse.swt.motif.solaris.sparc:osgi.bundle/[3.6.1.v3655c,3.6.1.v3655c](&(target.arch=sparc)(target.os=solaris)(target.ws=motif)) is known to Buckminster

However, the active Target Platform *does* have the above-cited bundle.

==========

I'm running Helios 3.6.1 on Mac OS X, using Java 6 (1.6.0_22-b04-307-10M3261). I installed Buckminster from the Helios update site, and got "Buckminster - Core 1.3.1.r11579".

==========

Here are the steps I followed:

0) Create Target Platform:

I created an empty Target Platform, and added to it the "Eclipse RCP SDK" and "Eclipse Platform Launchers" features from the Helios site http://download.eclipse.org/releases/helios. I set this as the active Target Platform. I shared this as a file in the workspace; its content was:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <?pde version="3.6"?>
    <target name="Eclipse RCP">
        <locations>
            <location includeAllPlatforms="true" includeMode="slicer" type="InstallableUnit">
                <unit id="org.eclipse.equinox.executable.feature.group" version="3.4.1.R36x_v20100823-7M7K7JF90dnJ-WLf3cf4yi"/>
                <unit id="org.eclipse.rcp.sdk.id" version="3.6.0.M20100909-0800"/>
                <repository location="http://download.eclipse.org/releases/helios"/>
            </location>
        </locations>
    </target>


1) Create an RCP application, com.example.mail, using the RCP Mail template.

2) Create a feature project, com.example.mail.feature, that includes this bundle.

3) Create a product configuration that contains the above feature.

    <?xml version="1.0" encoding="UTF-8"?>
    <?pde version="3.5"?>

    <product name="Mail" uid="com.example.mail.product" id="com.example.mail.product"
             application="com.example.mail.application" version="1.0.0" useFeatures="true"
             includeLaunchers="true">

        <configIni use="default"/>

        <launcherArgs>
            <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
        </launcherArgs>

        <plugins/>

        <features>
            <feature id="com.example.mail.feature" version="1.0.0.qualifier"/>
        </features>
    </product>

4) Create a feature project, com.example.mail.site, which includes the above feature. Its feature.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <feature id="com.example.mail.site" label="Site" version="1.0.0.qualifier" provider-name="me">
       <description url="http://www.example.com/description"> ... </description>
       <copyright url="http://www.example.com/copyright"> ... </copyright>
       <license url="http://www.example.com/license"> ... </license>

       <includes id="com.example.mail.feature" version="0.0.0"/>
    </feature>

I test-launched the product and it seemed to behave properly.

5) Create buckminster.properties with the following contents:

    buckminster.output=${user.home}/tmp/mail
    buckminster.temp.root=${user.home}/tmp/buildtmp
    qualifier.replacement.*=generator:lastRevision

    target.os=*
    target.ws=*
    target.arch=*

6) I right-clicked on my site project (com.example.mail.site) and invoked "Buckminster" => "Invoke Action" and selected "site.p2" from the dialog. The result was the following error:

    No component named org.eclipse.swt.motif.solaris.sparc:osgi.bundle/[3.6.1.v3655c,3.6.1.v3655c](&(target.arch=sparc)(target.os=solaris)(target.ws=motif)) is known to Buckminster

   True enough, if I look into where I think Buckminster/p2 caches the components in the Target Platform, I see what looks like all of the RCP bundles, but not the one cited in the error message.

    $ cd <myworkspace>/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/
    $ ls plugins
    ... <no sign of the SWT motif/solaris/sparc bundle>
    $

7) Reading through the comments on bug 320408, I saw the advice to add the Helios update site to the rmap file. I don't have an rmap file, since the tutorial implies I don't need one (yet?).

   Still, I thought perhaps modifying my Target Platform might have the same effect. So, I added the Helios update site http://download.eclipse.org/eclipse/updates/3.6 to the Target Platform. It now looks like this:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <?pde version="3.6"?>
    <target name="Eclipse RCP">
        <locations>
            <location includeAllPlatforms="true" includeMode="slicer" type="InstallableUnit">
                <unit id="org.eclipse.equinox.executable.feature.group" version="3.4.1.R36x_v20100823-7M7K7JF90dnJ-WLf3cf4yi"/>
                <unit id="org.eclipse.rcp.sdk.id" version="3.6.0.M20100909-0800"/>
                <repository location="http://download.eclipse.org/releases/helios"/>
            </location>
            <location includeAllPlatforms="true" includeMode="slicer" type="InstallableUnit">
                <unit id="org.eclipse.equinox.executable.feature.group" version="3.4.1.R36x_v20100823-7M7K7JF90dnJ-WLf3cf4yi"/>
                <unit id="org.eclipse.rcp.sdk.id" version="3.6.0.M20100909-0800"/>
                <repository location="http://download.eclipse.org/eclipse/updates/3.6"/>
            </location>
        </locations>
    </target>

8) Re-tried the "site.p2" build, and got the same error.

Interesting, though: now the Target Platform cache does indeed have the cited bundle: org.eclipse.swt.motif.solaris.sparc_3.6.1.v3655c.jar.

9) Tried re-loading the Target Platform, but that didn't fix the problem.
Comment 1 Robert M. Fuhrer CLA 2010-12-01 18:07:15 EST
Ah - the problem was that Buckminster seemed to be caching the contents of the Target Platform, and didn't notice that its contents had changed when I added the 2nd location (the Helios eclipse/updates site). This even after telling the PDE to reload the contents a couple of times.

After I restarted Eclipse, the "site.p2" action proceeded as expected.

On a tangentially-related note, my buckminster.properties file erroneously specified the property "buckminster.output" instead of "buckminster.output.root", which caused an ImmutablePropertyException to be logged in the Error Log. It would have been nicer had the error been reported in a somewhat clearer fashion.
Comment 2 Thomas Hallgren CLA 2010-12-02 01:33:28 EST
(In reply to comment #1)
> ...  It would have been nicer had the error been reported
> in a somewhat clearer fashion.

A patch is always welcome.