Skip to main content



      Home
Home » Archived » Buckminster » Materialization and Action in Cspex
Materialization and Action in Cspex [message #381666] Tue, 13 January 2009 11:31 Go to next message
Eclipse UserFriend
Hi all,

I have a project materialization with 3 dependencies. I would like to
materialize theses dependencies in the same global folder (e.g.:
Integration) which is the main component. In other words, this component
(Integration) contains files and has 3 dependencies to other component
that must be materialize in this top component folder.

All these components have an "unknown" componentType.

In this materialization, I want to compress the component in the 3
dependencies.. I'm doing this using a Cspex and using Ant. I don't know if
my comprehension of the buckminster's action is good enough to do this...
So far, I've written the Cspex for only one dependency (if it work for
this one, it will work for the other).
Here is a part of my Cspex file :
<?xml version="1.0" encoding="UTF-8"?>
<cspecExtension
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
xmlns="http://www.eclipse.org/buckminster/CSpec-1.0">
<dependencies>
<dependency name="ENV" componentType="unknown" versionType="OSGi"/>
</dependencies>
<generators>
<!-- Place your Generators here -->
</generators>
<artifacts>
<!-- Place your Artifacts here -->
</artifacts>
<actions>
<public name="buckminster.prebind" actor="ant">
<actorProperties>
<property key="buildFile" value="../build.xml" />
</actorProperties>
<properties>
<property key="model.zip.dest.file" value="./compress.zip"/>
<property key="model.zip.base.dir" value="env_source"/>
<property key="model.zip.excludes" value="toto.xls,tata.xls"/>
</properties>
</public>
</actions>
</cspecExtension>

In my ENV component (in the SVN repository), I have another Cspex defining
the "env_source" artifact corresponding to the ENV folder, as I think.
i.e. :
<artifacts>
<public name="env_source" path="./"/>
</artifacts>

My question is : is it a correct way to define the ENV folder ??
Where shall I put the build.xml file containing the Ant task that zip the
content? Because of the relative path, I was thinking about placing it in
the parent folder of the Cspex element...

I know its a lot of questions, but if you can answer ASAP, I will be
greatly thankful.

Marc
Re: Materialization and Action in Cspex [message #381669 is a reply to message #381666] Wed, 14 January 2009 12:40 Go to previous messageGo to next message
Eclipse UserFriend
Marc wrote:
> Hi all,
>
> I have a project materialization with 3 dependencies. I would like to
> materialize theses dependencies in the same global folder (e.g.:
> Integration) which is the main component. In other words, this component
> (Integration) contains files and has 3 dependencies to other component
> that must be materialize in this top component folder.
>
> All these components have an "unknown" componentType.
>
> In this materialization, I want to compress the component in the 3
> dependencies.. I'm doing this using a Cspex and using Ant. I don't know
> if my comprehension of the buckminster's action is good enough to do
> this...

A component with component type "unknown" must have a CSPEC file so it
seems a bit redundant to have a CSPEX too. The CSPEX is generally used
when you need to extend meta data that is extracted from other artifacts.

> So far, I've written the Cspex for only one dependency (if it work for
> this one, it will work for the other).
> Here is a part of my Cspex file :
> <?xml version="1.0" encoding="UTF-8"?>
> <cspecExtension
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
> xmlns="http://www.eclipse.org/buckminster/CSpec-1.0">
> <dependencies>
> <dependency name="ENV" componentType="unknown" versionType="OSGi"/>
> </dependencies>
> <generators>
> <!-- Place your Generators here -->
> </generators>
> <artifacts>
> <!-- Place your Artifacts here -->
> </artifacts>
> <actions>
> <public name="buckminster.prebind" actor="ant">
> <actorProperties>
> <property key="buildFile" value="../build.xml" />
> </actorProperties>
> <properties>
> <property key="model.zip.dest.file"
> value="./compress.zip"/>
> <property key="model.zip.base.dir" value="env_source"/>
> <property key="model.zip.excludes"
> value="toto.xls,tata.xls"/>
> </properties>
> </public>
> </actions>
> </cspecExtension>
>
> In my ENV component (in the SVN repository), I have another Cspex
> defining the "env_source" artifact corresponding to the ENV folder, as I
> think.
> i.e. :
> <artifacts>
> <public name="env_source" path="./"/>
> </artifacts>
>
> My question is : is it a correct way to define the ENV folder ??
> Where shall I put the build.xml file containing the Ant task that zip
> the content? Because of the relative path, I was thinking about placing
> it in the parent folder of the Cspex element...
>
> I know its a lot of questions, but if you can answer ASAP, I will be
> greatly thankful.
>
I would suggest that you maintain one component that contains one CSPEC
and the build.xml (and nothing more). Move your cspex content into that
cspec.

Regards,
Thomas Hallgren
Re: Materialization and Action in Cspex [message #382233 is a reply to message #381669] Thu, 15 January 2009 09:51 Go to previous message
Eclipse UserFriend
Thanks for the answer.

I nearly got all I need. The little remaining problem is the action
invocation...
In the CSPEC, I define an action with the buckminster.prebind name (as
I've done in the build.xml for the target name) but the action is not
executed when the component is materialized...

Best Regards,

Marc
Previous Topic:VersionConverter to select component from CVS at a specific date
Next Topic:New build for http://download.eclipse.org/tools/buckminster/updates-3.4/
Goto Forum:
  


Current Time: Mon Nov 10 09:23:26 EST 2025

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

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

Back to the top