[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.buckminster] Re: How to include component version with an action path
|
- From: Thomas Hallgren <thomas@xxxxxxx>
- Date: Tue, 18 Aug 2009 23:03:01 +0200
- Newsgroups: eclipse.tools.buckminster
- Organization: EclipseCorner
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3
Hi Tas,
On 08/18/2009 07:55 PM, Tas Frangoullides wrote:
Is this a good approach? I've gotten stuck now because I can't find a
property for the version of the component. I want the complete version
number with substituted qualifier.
The substituted qualifier is not available as a property since it is generated as part of the build. Ideally, the build
should have several phases. A first one that computes things like that and creates a set of advices in a context and
then the real build that have access to that context. This is a planned improvement but nothing that we have ready just
yet. But there are other solutions that you might want to try.
The build.xml that is bundled with our PDE support contains two ant macros that you might find useful. The
extractFeatureVersion and extractBundleVersion. Both takes two attributes. A 'file' from which to extract the version
and a 'property' that will receive the extracted version.
You can get access to these macros by adding this line to your ant script:
<import file="${buckminster.pdetasks}"/>
and then you can extract a version with:
<extractFeatureVersion file="${sp:manifest}" property="feature.version"/>
For this to work, your cspec must pass the feature.xml file that contains the calculated qualifier using a prerequisite
with alias="manifest".
HTH,
Thomas Hallgren