Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » create.product failing on target platform dependency
create.product failing on target platform dependency [message #540721] Thu, 17 June 2010 07:54 Go to next message
Geejay is currently offline GeejayFriend
Messages: 160
Registered: February 2010
Senior Member
When I am building my product using Buckminster, I have a target platform
already setup (this is defined using the Hudson Buckminster plug-in).

I can build an update site fine.

But when I try to do a create.product using the example create.product
action supplied in the example in the Bucky book, I get an ant exception

[ant] Missing requirement: myapp 1.0.0.qualifier (myapp.product.id
1.0.0.qualifier) requires 'org.eclipse.osgi.services 0.0.0' but it could not
be found

Judging by this error message, Buckminster can't see my Target platform in
this step.

I would like to know what sort of access Buckminster has to the target
platform while performing create.product, and what I have to do to get
Buckminster access to my target platform.

Appreciate any help

Thanks

Greg
Re: create.product failing on target platform dependency [message #540729 is a reply to message #540721] Thu, 17 June 2010 08:11 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
On 06/17/2010 09:54 AM, geejay wrote:
> I would like to know what sort of access Buckminster has to the target
> platform while performing create.product, and what I have to do to get
> Buckminster access to my target platform.
>
Buckminster builds the workspace, just like the IDE would build it. Consequently, it uses the PDE target platform that
is specified for the workspace. It can be specified in a template workspace, by using the importtargetdefinition
command, or by using the setpref targetPlatformPath=<some path> preference setting.

Unless you specify what TP to use, Buckminster will use the current runtime (i.e. the bundles provided in the
buckminster installation). I don't think this is what's happening to you since you don't seem to have anything at all in
your TP. It's more likely that you appoint a TP that is empty which begs the question, how do you specify your TP?

Regards,
Thomas Hallgren
Re: create.product failing on target platform dependency [message #540740 is a reply to message #540729] Thu, 17 June 2010 08:45 Go to previous messageGo to next message
Geejay is currently offline GeejayFriend
Messages: 160
Registered: February 2010
Senior Member
Ok, the log is attached.

Here are the important (as far as I know) bits:

Setting the TP:

setpref 'targetPlatformPath=/usr/lib/hudson/home/jobs/htc-target-pla tform/builds/2010-06-14_14-35-02/archive//targetPlatform'
targetPlatformPath set to the value '/usr/lib/hudson/home/jobs/htc-target-platform/builds/2010-0 6-14_14-35-02/archive//targetPlatform'

And here is the exception:

init actor: ant[ch.myapp.htc.site:eclipse.feature$1.0.0.qualifier#create .product]
buildFile=build/product.ant
targets=create.product
INFO: [start ch.myapp.htc.site:eclipse.feature$1.0.0.qualifier#create.pro duct]
Prerequisite alias = repository
Product alias = destination
Product base = ${buckminster.output}/
buckminster.component=ch.myapp.htc.site
workspace.root=/usr/lib/hudson/home/jobs/myapp-multi/workspa ce/arch/x86/os/win32/ws/win32
buckminster.temp=/usr/lib/hudson/home/jobs/myapp-multi/works pace/arch/x86/os/win32/ws/win32/buckminster.temp/ch.myapp.ht c.site_1.0.0-eclipse.feature/temp
buckminster.home=/usr/lib/hudson/home/jobs/myapp-multi/works pace/arch/x86/os/win32/ws/win32/features/ch.myapp.htc.site/
buckminster.output=/usr/lib/hudson/home/jobs/myapp-multi/wor kspace/arch/x86/os/win32/ws/win32/buckminster.output/ch.myap p.htc.site_1.0.0-eclipse.feature
localhost=builder.local
generator.buildTimestamp.format=2010-06-17T08:21:05.440+0000
buckminster.component.type=eclipse.feature
buckminster.version=1.0.0.qualifier
target.nl=en_US
eclipse.home=/usr/lib/buckminster-headless-3.6
profile=HTCProfile
iu=myapp.product.id
target.location=/usr/lib/hudson/home/jobs/htc-target-platfor m/builds/2010-06-14_14-35-02/archive/targetPlatform
[ant] /usr/lib/buckminster-headless-3.6/plugins/org.eclipse.equino x.launcher_1.1.0.v20100208.jar
[ant] file:/usr/lib/hudson/home/jobs/myapp-multi/workspace/arch/x8 6/os/win32/ws/win32/buckminster.output/ch.myapp.htc.site_1.0 .0-eclipse.feature/site.p2/
[ant] /usr/lib/hudson/home/jobs/myapp-multi/workspace/arch/x86/os/ win32/ws/win32/buckminster.output/ch.myapp.htc.site_1.0.0-ec lipse.feature/htc.win32.win32.x86
[ant] Cannot complete the install because one or more required items could not be found.
[ant] Software being installed: myappHTC 1.0.0.qualifier (myapp.product.id 1.0.0.qualifier)
[ant] Missing requirement: myappHTC 1.0.0.qualifier (myapp.product.id 1.0.0.qualifier) requires 'org.eclipse.osgi.services 0.0.0' but it could not be found

And here is evidence(?) of the TP containing the missing service:

[root@builder targetPlatform]# pwd
/usr/lib/hudson/home/jobs/htc-target-platform/builds/2010-06 -14_14-35-02/archive/targetPlatform
[root@builder targetPlatform]# cat artifacts.xml | grep osgi.services
<artifact classifier='osgi.bundle' id='org.eclipse.osgi.services' version='3.2.0.v20090520-1800'>
<artifact classifier='osgi.bundle' id='org.eclipse.osgi.services.nl_de' version='3.5.0.v20091121043401'>

Any help appreciated.

Thanks

Greg
Re: create.product failing on target platform dependency [message #540776 is a reply to message #540740] Thu, 17 June 2010 11:09 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Is there a file named org.eclipse.osgi.service_<some version>.jar under the target platform?
Did you build the workspace before calling perform ? I.e.

- thomas


On 06/17/2010 10:45 AM, Geejay wrote:
> Ok, the log is attached.
>
> Here are the important (as far as I know) bits:
>
> Setting the TP:
>
> setpref 'targetPlatformPath=/usr/lib/hudson/home/jobs/htc-target-pla
> tform/builds/2010-06-14_14-35-02/archive//targetPlatform'
> targetPlatformPath set to the value
> '/usr/lib/hudson/home/jobs/htc-target-platform/builds/2010-0
> 6-14_14-35-02/archive//targetPlatform'
>
> And here is the exception:
>
> init actor: ant[ch.myapp.htc.site:eclipse.feature$1.0.0.qualifier#create
> .product]
> buildFile=build/product.ant
> targets=create.product
> INFO: [start
> ch.myapp.htc.site:eclipse.feature$1.0.0.qualifier#create.pro duct]
> Prerequisite alias = repository
> Product alias = destination
> Product base = ${buckminster.output}/
> buckminster.component=ch.myapp.htc.site
> workspace.root=/usr/lib/hudson/home/jobs/myapp-multi/workspa
> ce/arch/x86/os/win32/ws/win32
> buckminster.temp=/usr/lib/hudson/home/jobs/myapp-multi/works
> pace/arch/x86/os/win32/ws/win32/buckminster.temp/ch.myapp.ht
> c.site_1.0.0-eclipse.feature/temp
> buckminster.home=/usr/lib/hudson/home/jobs/myapp-multi/works
> pace/arch/x86/os/win32/ws/win32/features/ch.myapp.htc.site/
> buckminster.output=/usr/lib/hudson/home/jobs/myapp-multi/wor
> kspace/arch/x86/os/win32/ws/win32/buckminster.output/ch.myap
> p.htc.site_1.0.0-eclipse.feature
> localhost=builder.local
> generator.buildTimestamp.format=2010-06-17T08:21:05.440+0000
> buckminster.component.type=eclipse.feature
> buckminster.version=1.0.0.qualifier
> target.nl=en_US
> eclipse.home=/usr/lib/buckminster-headless-3.6
> profile=HTCProfile
> iu=myapp.product.id
> target.location=/usr/lib/hudson/home/jobs/htc-target-platfor
> m/builds/2010-06-14_14-35-02/archive/targetPlatform
> [ant] /usr/lib/buckminster-headless-3.6/plugins/org.eclipse.equino
> x.launcher_1.1.0.v20100208.jar
> [ant] file:/usr/lib/hudson/home/jobs/myapp-multi/workspace/arch/x8
> 6/os/win32/ws/win32/buckminster.output/ch.myapp.htc.site_1.0
> .0-eclipse.feature/site.p2/
> [ant] /usr/lib/hudson/home/jobs/myapp-multi/workspace/arch/x86/os/
> win32/ws/win32/buckminster.output/ch.myapp.htc.site_1.0.0-ec
> lipse.feature/htc.win32.win32.x86
> [ant] Cannot complete the install because one or more required items
> could not be found.
> [ant] Software being installed: myappHTC 1.0.0.qualifier
> (myapp.product.id 1.0.0.qualifier)
> [ant] Missing requirement: myappHTC 1.0.0.qualifier (myapp.product.id
> 1.0.0.qualifier) requires 'org.eclipse.osgi.services 0.0.0' but it could
> not be found
>
> And here is evidence(?) of the TP containing the missing service:
>
> [mailto:root@builder targetPlatform]# pwd
> /usr/lib/hudson/home/jobs/htc-target-platform/builds/2010-06
> -14_14-35-02/archive/targetPlatform
> [mailto:root@builder targetPlatform]# cat artifacts.xml | grep
> osgi.services
> <artifact classifier='osgi.bundle' id='org.eclipse.osgi.services'
> version='3.2.0.v20090520-1800'>
> <artifact classifier='osgi.bundle' id='org.eclipse.osgi.services.nl_de'
> version='3.5.0.v20091121043401'>
>
> Any help appreciated.
>
> Thanks
>
> Greg
Re: create.product failing on target platform dependency [message #540798 is a reply to message #540776] Thu, 17 June 2010 12:13 Go to previous messageGo to next message
Geejay is currently offline GeejayFriend
Messages: 160
Registered: February 2010
Senior Member
Yep, here's the directory listing in /plugins:

-rw-r----- 1 root root 66065 Jun 14 14:35 org.eclipse.osgi.services_3.2.0.v20090520-1800.jar

Here are my commands in the Buckminster section in Hudson:

import ${WORKSPACE}/headless.htc.mspec
build
perform ch.myapp.htc.site#create.product.zip

What I don't understand is that the action site.p2 works fine, and this requires the target platform.

Greg
Re: create.product failing on target platform dependency [message #540811 is a reply to message #540798] Thu, 17 June 2010 12:25 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
On 06/17/2010 02:13 PM, Geejay wrote:
> Yep, here's the directory listing in /plugins:
>
> -rw-r----- 1 root root 66065 Jun 14 14:35
> org.eclipse.osgi.services_3.2.0.v20090520-1800.jar
>
> Here are my commands in the Buckminster section in Hudson:
>
> import ${WORKSPACE}/headless.htc.mspec
> build
> perform ch.myapp.htc.site#create.product.zip
>
> What I don't understand is that the action site.p2 works fine, and this
> requires the target platform.
>
Aha. Now I see what's going on. The target platform is used when creating the repoisitory (the site.p2 action). This is
the first step when creating a product and that succeeds. Next step is to install the product from the created
repository using the p2 director. That fails. Probably because the given bundle isn't included in the repository that
you create (this is often the case since many repositories are intended as supplements to the platform).

You can rectify this by providing the platform repository to the create action. I.e. add a "-i
http://download.eclipse.org/eclipse/updates/3.6" to the director call in your ant script.

Another way to fix it is of course to add the needed bundles to the repository.

- thomas
Re: create.product failing on target platform dependency [message #540816 is a reply to message #540811] Thu, 17 June 2010 12:44 Go to previous messageGo to next message
Geejay is currently offline GeejayFriend
Messages: 160
Registered: February 2010
Senior Member
Sorry but I don't fully understand.

Isn't the org.eclipse.osgi.services bundle sitting in the repository? Doesn't the director know where the target platform is?

Doesn't the director need to know where all the bundles required for the app are (for e.g the update site + the target platform)?

As to your second suggestion, if I have 3 or 4 different CQUERYs, 1 for platform, one for equinox, one for my own external plugins, and one for my app, how do I get them all into a single repository that I can point the director to?

Thanks again

Greg





Re: create.product failing on target platform dependency [message #540817 is a reply to message #540721] Thu, 17 June 2010 12:46 Go to previous messageGo to next message
Geejay is currently offline GeejayFriend
Messages: 160
Registered: February 2010
Senior Member
NOTE: I am running my build from within the Hudson Bucky plugin.

[Updated on: Thu, 17 June 2010 13:02]

Report message to a moderator

Re: create.product failing on target platform dependency [message #540848 is a reply to message #540816] Thu, 17 June 2010 13:06 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
On 06/17/2010 02:44 PM, Geejay wrote:
> Sorry but I don't fully understand.
>
> Isn't the org.eclipse.osgi.services bundle sitting in the repository?

Not unless you put it there. Do you have a site.p2 feature that actually includes this bundle?

> Doesn't the director know where the target platform is?

No. The director has no clue unless you feed it a repository.

> Doesn't the director need to know where all the bundles required for the
> app are (for e.g the update site + the target platform)?
>
Yes, it needs to know that. So you must tell it.

> As to your second suggestion, if I have 3 or 4 different CQUERYs, 1 for
> platform, one for equinox, one for my own external plugins, and one for
> my app, how do I get them all into a single repository that I can point
> the director to?
>
Why do you need a single repository? The director can use multiple repositories. Just add more -i <repo URL> options to it.

Regards,
Thomas Hallgren
Re: create.product failing on target platform dependency [message #540849 is a reply to message #540816] Thu, 17 June 2010 13:07 Go to previous messageGo to next message
Johannes Utzig is currently offline Johannes UtzigFriend
Messages: 329
Registered: July 2009
Senior Member
Hi Geejay,

please see comments inline

Am 17.06.2010 14:44, schrieb Geejay:
> Sorry but I don't fully understand.
>
> Isn't the org.eclipse.osgi.services bundle sitting in the repository?
> Doesn't the director know where the target platform is?
> Doesn't the director need to know where all the bundles required for the
> app are (for e.g the update site + the target platform)?
>

The director is started as an independant process from the product.ant
and it has no idea which target platform you used to create your
p2.repository. And yes, the director needs to know where to find the
bundles that your repository depends on, that is why you need to tell
the director about them.

> As to your second suggestion, if I have 3 or 4 different CQUERYs, 1 for
> platform, one for equinox, one for my own external plugins, and one for
> my app, how do I get them all into a single repository that I can point
> the director to?
>

Either your repository is self-contained (i.e. has no external
dependencies) or it is not selt-contained and you need to use several
repositories to build your product. You have basically 3 options:
1. Create a feature that contains your real feature + ALL dependencies
and invoke site.p2 on that feature

2. Build your own feature and use the aggregator to merge this
repository with other repositories that contain your dependencies

3.Build your own feature and point the director to the p2 repository
that buckminster created from it + the other repositories that contain
your dependencies.

here is what I usually do:
1. I use the b3 aggregator to create an internal composite repository
that contains all my external dependencies.
2. I create a target file that points to this internal repository and
select that parts that I want in the target platform for my specific product
3. I import that target file in buckminster to define the target
platform for that build
4. I resolve the query for my feature to be build
5. I invoke my.releng.feature#create.product

My product.ant looks like this (note that there's two repositories
listed, the one built by buckminster and my internal composite repository)

<property name="internal.mirrored.repo"
value="http:/example.org/eclipse/update/"/>
<target name="create.product">
<property name="destination" location="${sp:destination}"/>
<delete dir="${destination}"></delete>
<makeurl property="repository" file="${sp:repository}"/>
<mkdir dir="${destination}"/>
<echo message="${equinox.launcher.jar}"/>
<echo message="${repository}"/>
<echo message="${destination}"/>
<java jar="${equinox.launcher.jar}" fork="true" failonerror="true"
output="directorOut.txt">
<arg value="-consoleLog"/>
<arg value="-application"/>
<arg value="org.eclipse.equinox.p2.director"/>
<arg value="-artifactRepository"/>
<!--important: here you add a LIST of all involved repositories -->
<arg value="${repository},${internal.mirrored.repo}"/>
<arg value="-metadataRepository"/>
<arg value="${repository},${internal.mirrored.repo}"/>
....

As for your other question:

> And as to the Ant script, how do I change that? I thought Buckminster
> created it on the fly?

No, it is not. The mailapp example contains a product.ant file that can
serve as a template but you need such an ant file somewhere in your
feature/releng project.



Best regards,
Johannes
Re: create.product failing on target platform dependency [message #540850 is a reply to message #540817] Thu, 17 June 2010 13:13 Go to previous message
Geejay is currently offline GeejayFriend
Messages: 160
Registered: February 2010
Senior Member
Sorry ignore my comment "And as to the Ant script, how do I change that? I
thought Buckminster created it on the fly?"

Of course the ant script it is my site.

"Geejay" <gjmcknight@schlagundrahm.ch> wrote in message
news:hvd5fo$u3b$1@build.eclipse.org...
> And as to the Ant script, how do I change that? I thought Buckminster
> created it on the fly?
>
> NOTE: I am running my build from within the Hudson Bucky plugin.
Previous Topic:Build errors on downloaded plugins
Next Topic:Property buckminster.build.timestamp no longer ISO-8601?
Goto Forum:
  


Current Time: Wed Aug 04 01:10:27 GMT 2021

Powered by FUDForum. Page generated in 0.01953 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top