Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » [solved] Trigger action for another component from cspex
[solved] Trigger action for another component from cspex [message #725174] Wed, 14 September 2011 07:04 Go to next message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 70
Registered: July 2009
Location: Graz, Austria
Member
I am trying to build an RCP with buckminster. Therefore I have my own "releng" feature project with a cspex file in it.

There exists another feature project "p2.updatesite" that creates - as the name suggests - an update site repository.

Now I want my custom action in releng to first trigger p2.updatesite -> site.p2 and use that resulting repository for its build process.

Where, and how would I trigger such a build? I see there are dependencies and prerequisites but I could not find out, how to put things together.

thanks for help
Christian

[Updated on: Wed, 14 September 2011 12:29]

Report message to a moderator

Re: Trigger action for another component from cspex [message #725283 is a reply to message #725174] Wed, 14 September 2011 12:29 Go to previous messageGo to next message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 70
Registered: July 2009
Location: Graz, Austria
Member
It's easy once you figure it out:

just add

            <prerequisites alias="repository">
                <attribute name="p2.updatesite" /><!-- feture ID -->
                <attribute name="site.p2" /><!-- action name -->
            </prerequisites>


to the action and it magically works.
Re: Trigger action for another component from cspex [message #725321 is a reply to message #725283] Wed, 14 September 2011 14:04 Go to previous messageGo to next message
Carsten Reckord is currently offline Carsten ReckordFriend
Messages: 139
Registered: July 2009
Senior Member
On 14.09.2011 14:29, Christian Pontesegger wrote:
> It's easy once you figure it out:
>
> just add
>
>
> <prerequisites alias="repository">
> <attribute name="p2.updatesite" /><!-- feture ID -->
> <attribute name="site.p2" /><!-- action name -->
> </prerequisites>
>
>
> to the action and it magically works.

Actually, that snippet would attempt to trigger two actions, p2.updatesite
and site.p2, both in the current component.

What you are looking for is

<prerequisites alias="repository">
<attribute name="site.p2" component="p2.updatesite" />
</prerequisites>

(optionally, if you have components of different type with the same id, i.e.
both a plugin and a feature named "p2.updatesite", you can add a third value
componentType="eclipse.feature" to the <attribute .../> to select the
correct one)

More information is available in the Bucky Book
(http://www.eclipse.org/downloads/download.php?file=/tools/buckminster/doc/BuckyBook.pdf),
chapter 6.
Re: Trigger action for another component from cspex [message #725900 is a reply to message #725321] Fri, 16 September 2011 06:41 Go to previous message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 70
Registered: July 2009
Location: Graz, Austria
Member
Carsten Reckord wrote on Wed, 14 September 2011 10:04

Actually, that snippet would attempt to trigger two actions, p2.updatesite
and site.p2, both in the current component.


Thanks for clarifying things here. So the attribute name always refers to an action on the current component.

What about the properties file passed to the original action? Can it be replaced for the prerequisites?

What I want to do is build an p2 update site first, followed by an RCP. All by triggering one action.

While site.p2 should be built with target.os=* RCP needs some dedicated target.os
So I have 2 actions, 1 property and 2 different values it should hold. AFAIK ant properties are immutable. Is there some neat buckminster magic that can do the trick?

[Updated on: Fri, 16 September 2011 06:41]

Report message to a moderator

Previous Topic:Resolution Bug?
Next Topic:Create p2 site that shows all bundles
Goto Forum:
  


Current Time: Thu Nov 20 23:03:12 GMT 2014

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

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