[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] One single bundle not seen in a P2 update site

> Do you get an error? or does it just fail to provision this bundle?

The problem is that the bundle is not even "seen" from the remote
repository (and subsequently failed to be provisioned).

You can very easily reproduce this behavior without provisioning anything:
- from any Eclipse 5.1 install, go to Help > Install New Software...
- use http://www.argeo.org/projects/slc/sdk-dev/ as URL
- look at the SLC SDK category/feature
- you will see that Apache Collections is not listed although it is in
the contents.jar/artifacts.jar (see the original post) and in the
related feature (see below)

> If you get an error, can you pots the error log?

I could see no error in the workspace log during all the tests I did
again today on a fresh Eclipse RCP 3.5.1 install.

> If it just fails to provision the bundle, then this might be a problem with
> the target provisioning tools (PDE owns that work).  I think (someone
> correct me if I'm wrong) you can only add features to a target (i.e. you
> can't provision a single bundle).  If this is the case, then the bundle you
> want to add to your target must be listed in a feature.

Yes we have features:
http://www.argeo.org/projects/slc/sdk-dev/features/

If you unpack the feature you have this:

[mbaudier@alma org.argeo.slc.sdk_0.12.1.qualifier]$ ls -l
total 76
-rw-rw-r-- 1 mbaudier mbaudier 24356 Jan  6 03:17 feature.xml
drwxrwxr-x 2 mbaudier mbaudier  4096 Jan  6 10:34 META-INF
-rw-rw-r-- 1 mbaudier mbaudier 28176 Jan  6 03:17 modularDistribution.csv
-rw-rw-r-- 1 mbaudier mbaudier    78 Jan  6 03:17 p2.inf
[mbaudier@alma org.argeo.slc.sdk_0.12.1.qualifier]$ cat feature.xml |
grep collections
  <plugin id="com.springsource.org.apache.commons.collections"
version="3.2.0" download-size="72360" install-size="72360"
unpack="false"/>
[mbaudier@alma org.argeo.slc.sdk_0.12.1.qualifier]$ cat p2.inf
properties.1.name=org.eclipse.equinox.p2.type.category
properties.1.value=true

(modularDistribution.csv is a file from us, basically the equivalent
of feature.xml, but text based)

> How are you selecting the stuff you want to provision?

I don't understand the question.

Do you mean how do I select in the UI?
=> the idea is to have the target definition as an extension of our
custom plugin (it is already implemented here:
http://www.argeo.org/projects/slc/update/, but with an ugly hack to
workaround this Apache Collections issue)
=> but the bundle is never listed even if you define the target
definition by hand (you need to uncheck 'Include required software'
and check 'Include all environments') or look in "Install New
Software..." (see above)

Or do you ask where the bundles/features are coming from?
=> bundles mostly from Spring Source Enterprise Bundle Repository
=> some third parties are packaged by us
=> our bundles are packaged by Maven
=> we generate the features automatically based on Maven dependencies

> cheers,
> ian

Many thanks for looking at this!

Mathieu

>
>
> On Mon, Jan 4, 2010 at 2:47 AM, Mathieu Baudier <mbaudier@xxxxxxxxx> wrote:
>>
>> Hello,
>>
>> we develop server-side OSGi based applications, using Equinox as our
>> runtime and third party bundles packaged by Spring Source in their
>> Enterprise bundle repository (+ some packaged by ourselves).
>>
>> We are now trying to use P2 in order to provision our target platforms
>> when developing on top of our framework.
>> We use Eclipse RCP Galileo SR1 (v3.5.1) as our IDE and the related P2
>> provisioning package for Linux.
>>
>> We generated a P2 repository online:
>> http://www.argeo.org/projects/slc/sdk-dev/
>>
>> Our problem is that when we try to provision a custom target
>> definition with it, it fails to display (and use) one bundle:
>>
>> Bundle-Name: Apache Commons Collections
>> Bundle-SymbolicName: com.springsource.org.apache.commons.collections
>> Bundle-Version: 3.2.1
>>
>> As far as I could see this is the only bundle which fails to be
>> displayed (and subsequently added to the target platform).
>>
>> What puzzles me is that:
>>
>> - the bundle jar is properly transferred by the repository generator
>> at the location:
>>
>> http://www.argeo.org/projects/slc/sdk-dev/plugins/com.springsource.org.apache.commons.collections_3.2.1.jar
>>
>> - the artifacts.jar/.xml contains a reference to it:
>> ...
>>    <artifact classifier='osgi.bundle'
>> id='com.springsource.org.apache.commons.collections' version='3.2.1'>
>>      <properties size='3'>
>>        <property name='artifact.size' value='582765'/>
>>        <property name='download.size' value='582765'/>
>>        <property name='download.md5'
>> value='410afbac5991094056dd13f94c14e902'/>
>>      </properties>
>>    </artifact>
>> ...
>>
>> - the contents.jar/.xml as well contains a reference as well (see below)
>>
>> We generate the repository with the following command (using the maven
>> exec plugin which issues a regular system call):
>>
>> <configuration>
>>        <executable>${argeo.p2.cmd}</executable>
>>        <!-- optional -->
>>        <workingDirectory>/tmp</workingDirectory>
>>        <arguments>
>>                <argument>-noSplash</argument>
>>                <argument>-application</argument>
>>
>>  <argument>org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher</argument>
>>                <argument>-metadataRepository</argument>
>>                <argument>file:${argeo.p2.repository}</argument>
>>                <argument>-artifactRepository</argument>
>>                <argument>file:${argeo.p2.repository}</argument>
>>                <argument>-bundles</argument>
>>                <argument>${project.build.directory}</argument>
>>                <argument>-features</argument>
>>                <argument>${project.build.directory}</argument>
>>                <argument>-compress</argument>
>>                <argument>-publishArtifacts</argument>
>>        </arguments>
>> </configuration>
>>
>> With:
>> ${argeo.p2.cmd} : path to the eclipse executable
>> ${argeo.p2.repository}: final location of the repository
>> ${project.build.directory}: directory where all the bundles have been
>> gathered as jars
>>
>> This issue should be directly reproducible by browsing the repository
>> http://www.argeo.org/projects/slc/sdk-dev/ when adding a target
>> definition (or even as a Install New Software... update site).
>> You will see that the Apache Commons Collections is lacking in the
>> list displayed.
>> The target definition is unusable as such since many other bundles
>> depend on this one. But if the same jar is added manually to the
>> target definition, everything works properly.
>>
>> Any help would be greatly appreciated since it is blocking our rollout
>> of a P2 based solution for provisioning on customer sites.
>> Please tell me if you need more details.
>>
>> Many thanks in advance!
>>
>> Mathieu
>>
>> PS: we downloaded the provisioning package from
>> http://download.eclipse.org/equinox/drops/R-3.5.1-200909170800/index.php,
>> and took equinox-p2-agent-3.5.1-linux.tar.gz. I'm not sure that I got
>> the difference with equinox.p2.installer-3.5.1-linux.gtk.x86.tar.gz,
>> except for the size...
>>
>> PS2: contents.jar/.xml reference to the Commons Collections bundle
>> ...
>>    <unit id='com.springsource.org.apache.commons.collections'
>> version='3.2.1' singleton='false'>
>>      <update id='com.springsource.org.apache.commons.collections'
>> range='[0.0.0,3.2.1)' severity='0'/>
>>      <properties size='4'>
>>        <property name='org.eclipse.equinox.p2.name' value='Apache
>> Commons Collections'/>
>>        <property name='org.eclipse.equinox.p2.description'
>> value='Types that extend and augment the Java Collections
>> Framework.'/>
>>        <property name='org.eclipse.equinox.p2.provider'
>> value='SpringSource'/>
>>        <property name='org.eclipse.equinox.p2.doc.url'
>> value='http://commons.apache.org/collections/'/>
>>      </properties>
>>      <provides size='15'>
>>        <provided namespace='org.eclipse.equinox.p2.iu'
>> name='com.springsource.org.apache.commons.collections'
>> version='3.2.1'/>
>>        <provided namespace='osgi.bundle'
>> name='com.springsource.org.apache.commons.collections'
>> version='3.2.1'/>
>>        <provided namespace='java.package'
>> name='org.apache.commons.collections' version='3.2.1'/>
>>        <provided namespace='java.package'
>> name='org.apache.commons.collections.bag' version='3.2.1'/>
>>        <provided namespace='java.package'
>> name='org.apache.commons.collections.bidimap' version='3.2.1'/>
>>        <provided namespace='java.package'
>> name='org.apache.commons.collections.buffer' version='3.2.1'/>
>>        <provided namespace='java.package'
>> name='org.apache.commons.collections.collection' version='3.2.1'/>
>>        <provided namespace='java.package'
>> name='org.apache.commons.collections.comparators' version='3.2.1'/>
>>        <provided namespace='java.package'
>> name='org.apache.commons.collections.functors' version='3.2.1'/>
>>        <provided namespace='java.package'
>> name='org.apache.commons.collections.iterators' version='3.2.1'/>
>>        <provided namespace='java.package'
>> name='org.apache.commons.collections.keyvalue' version='3.2.1'/>
>>        <provided namespace='java.package'
>> name='org.apache.commons.collections.list' version='3.2.1'/>
>>        <provided namespace='java.package'
>> name='org.apache.commons.collections.map' version='3.2.1'/>
>>        <provided namespace='java.package'
>> name='org.apache.commons.collections.set' version='3.2.1'/>
>>        <provided namespace='org.eclipse.equinox.p2.eclipse.type'
>> name='bundle' version='1.0.0'/>
>>      </provides>
>>      <artifacts size='1'>
>>        <artifact classifier='osgi.bundle'
>> id='com.springsource.org.apache.commons.collections' version='3.2.1'/>
>>      </artifacts>
>>      <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
>>      <touchpointData size='1'>
>>        <instructions size='1'>
>>          <instruction key='manifest'>
>>            Bundle-ManifestVersion: 2&#xA;Specification-Version:
>> 3.2.1&#xA;Implementation-Title: Commons
>> Collections&#xA;Export-Package:
>>
>> org.apache.commons.collections;version=&quot;3.2.1&quot;,org.apache.commons.collections.bag;version=&quot;3.2.1&quot;;uses:=&quot;org.apache.commons.collections&quot;,org.apache.commons.collections.bidimap;version=&quot;3.2.1&quot;;uses:=&quot;org.apache.commons.collections&quot;,org.apache.commons.collections.buffer;version=&quot;3.2.1&quot;;uses:=&quot;org.apache.commons.collections&quot;,org.apache.commons.collections.collection;version=&quot;3.2.1&quot;;uses:=&quot;org.apache.commons.collections&quot;,org.apache.commons.collections.comparators;version=&quot;3.2.1&quot;;uses:=&quot;org.apache.commons.collections&quot;,org.apache.commons.collections.functors;version=&quot;3.2.1&quot;;uses:=&quot;org.apache.commons.collections&quot;,org.apache.commons.collections.iterators;version=&quot;3.2.1&quot;;uses:=&quot;org.apache.commons.collections&quot;,org.apache.commons.collections.keyvalue;version=&quot;3.2.1&quot;;uses:=&quot;org.apache.commons.collections&quot;,org.apache.commons.collections.list;version=&quot;3.2.1&quot;;uses:=&quot;org.apache.commons.collections&quot;,org.apache.commons.collections.map;version=&quot;3.2.1&quot;;uses:=&quot;org.apache.commons.collections&quot;,org.apache.commons.collections.set;version=&quot;3.2.1&quot;;uses:=&quot;org.apache.commons.collections,org.apache.commons.collections.collection&quot;&#xA;Archiver-Version:
>> Plexus Archiver&#xA;Bundle-Name: Apache Commons
>> Collections&#xA;Implementation-Vendor-Id:
>> org.apache&#xA;X-Compile-Target-JDK: 1.2&#xA;Bundle-Vendor:
>> SpringSource&#xA;Bundle-Classpath: .&#xA;Bundle-Description: Types
>> that extend and augment the Java Collections
>> Framework.&#xA;X-Compile-Source-JDK: 1.2&#xA;Created-By: 1.5.0_07 (Sun
>> Microsystems Inc.)&#xA;Manifest-Version: 1.0&#xA;Built-By: Niall
>> Pemberton&#xA;Bundle-License:
>> http://www.apache.org/licenses/LICENSE-2.0.txt&#xA;Build-Jdk:
>> 1.5.0_07&#xA;Bundle-DocURL:
>> http://commons.apache.org/collections/&#xA;Specification-Title:
>> Commons Collections&#xA;Bundle-Version:
>> 3.2.1&#xA;Implementation-Version: 3.2.1&#xA;Bundle-SymbolicName:
>> com.springsource.org.apache.commons.collections&#xA;Implementation-Vendor:
>> The Apache Software Foundation&#xA;Specification-Vendor: The Apache
>> Software Foundation&#xA;
>>          </instruction>
>>        </instructions>
>>      </touchpointData>
>>    </unit>
>> ...
>> _______________________________________________
>> p2-dev mailing list
>> p2-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/p2-dev
>
>
>
> --
> R. Ian Bull | EclipseSource Victoria | +1 250 477 7484
> http://eclipsesource.com | http://twitter.com/eclipsesource
>
> _______________________________________________
> p2-dev mailing list
> p2-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/p2-dev
>
>