[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

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