I have created a new preference in Buckminster that stores
the OSGi version and build ID that I want set across all plugins and features
that I’m building. I have written two Buckminster headless Java extensions
to support this. One goes through the workspace and updates all manifest.mf,
feature.xml, and *.product files to set the version. The other performs a
SVN tag operation. Both of these extensions are able to read the
Buckminster preference without a problem.
The last bit of our build system is to package the artifacts.
Right now, the packaging is a simple zip file. I’d like the zip
file name to contain the same version information defined by the preference
value. Of course, Ant appears to be the right tool for doing the
packaging, but I don’t’ know how to pass the preference value to
the ant script. Here is the relevant snippet from my cspex file:
<actions>
<public name="package" actor="ant">
<actorProperties>
<property key="buildFile" value="build.xml"/>
</actorProperties>
<properties>
<property key="build.id" value="${buckminster.preference:buildid}" />
</properties>
<prerequisites>
<attribute name="feature.exports"/>
</prerequisites>
</public>
</actions>