create.product failing on target platform dependency [message #540721] |
Thu, 17 June 2010 03:54  |
Eclipse User |
|
|
|
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 04:11   |
Eclipse User |
|
|
|
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 #540848 is a reply to message #540816] |
Thu, 17 June 2010 09:06   |
Eclipse User |
|
|
|
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 09:07   |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.06123 seconds