ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Carlson <>
Subject Re: how to reference a command line argument inside ant script
Date Wed, 29 Aug 2001 21:25:22 GMT
You'd use

ant mytarg -Dcvsrev="build-24".  

Then revision-name would be replaced with ${revision-name}

Jonathan Carlson

Russell G. Wells wrote:

>I want to create a target in my build.xml file for getting a tagged revision
>of code out of CVS, with the user specifying the revision name on the
>command line.
>	ant cvsrev build-24
>My question is how do I access the argument "build-24" within the build.xml
><!-- check for required environment variable prior to doing anything -->
><target name="init.cvs" unless="osEnv.CVSROOT">
>	<fail message="To use ANT CVS you must have CVSROOT defined"/>
><target name="cvsrev" depends="init.cvs">
>	<!-- cvs -q checkout -P -r revision-name module -->
>	<cvs command="-q checkout -P -r revision-name ${}"/>
>What should be "revision-name" be replaced with?
>Russell G. Wells
>Bear River Associates, Inc.

Do You Yahoo!?
Get your free address at

View raw message