Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » How to get Qualifier from build
How to get Qualifier from build [message #760712] Sun, 04 December 2011 16:09 Go to next message
Thomas Kratz is currently offline Thomas Kratz
Messages: 163
Registered: July 2009
Senior Member
Is there a way to write the qualifier used in the current build to a file for example?
Re: How to get Qualifier from build [message #760760 is a reply to message #760712] Mon, 05 December 2011 06:38 Go to previous message
Jakob Braeuchi is currently offline Jakob Braeuchi
Messages: 69
Registered: July 2009
Location: Switzerland
Member
hi thomas,

you can extract the qualifier from a bundle manifest using an ant script:

<project>

	<macrodef name="extractManifestVersion">
		<attribute name="file" />
		<attribute name="property" />
		<sequential>
			<loadfile property="@{property}" srcfile="@{file}">
				<filterchain>
					<linecontains>
						<contains value="Bundle-Version:"/>		
					</linecontains>
					<striplinebreaks/>
					<replaceregex pattern="^Bundle-Version: \d+\.\d+\.\d+\.(.*)" replace="\1" />
				</filterchain>
			</loadfile>
		</sequential>
	</macrodef>

	<target name="setProductVersion">
		<extractManifestVersion file="${sp:manifest.mf}" property="bundle.version" />
		<echo>Set version in ${sp:product.properties} to '${bundle.version}'</echo>
		<replace file="${sp:product.properties}" token="%REL_Nr%" value="${bundle.version}" />
	</target>

</project>


the ant target above extracts the qualifier from the bundle version and writes it to a file.

hth
jakob
Previous Topic:How to discard qualifier
Next Topic:Can't install Buckminster Headless
Goto Forum:
  


Current Time: Tue Oct 21 08:58:32 GMT 2014

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

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