ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vikas Phonsa <VPho...@suz.com>
Subject RE: cvs checkout or update?
Date Thu, 09 Oct 2003 22:53:21 GMT
Cindy,
I'm kinda new to Ant and there might be other smart ways to achieve the
functionality you need with ant. 

You can use the input task to enable manual entry of the cvs module name or
u might want to hard code that in the script only. Then you can use the
available task like this:

<available file="/usr/local/lib" type="dir" property="local.lib.present"/>


This task sets the local.lib.present property to the value "true" if the
directory /usr/local/lib is found.

Then you can use if/unless attributes in the target where u are using cvs
task. I think this way u will have to implement two targets one for checkout
and one for update and call each depending upon the results of the available
task. Something like this:

<target name="update" if="local.lib.present">
<target name="checkout" unless="local.lib.present">

But Ant-Contrib provides an if/else task. That would allow u to avoid
writing two separate targets and u can call the cvs task to either checkout
or update depending upon the if/else conditions u use.

Again this might be a very rough approach.

Vikas













-----Original Message-----
From: Lindsey, Lucinda [mailto:lalinds@sandia.gov] 
Sent: Thursday, October 09, 2003 3:40 PM
To: 'Ant Users List'
Subject: RE: cvs checkout or update?

I mean a package in cvs (an attribute of the cvs task). What other tasks
will I have to use? Any help would be appreciated?

Cindy

-----Original Message-----
From: Vikas Phonsa [mailto:VPhonsa@suz.com]
Sent: Thursday, October 09, 2003 4:24 PM
To: 'Ant Users List'
Subject: RE: cvs checkout or update?


Do u want to just checkout one specific package (like a java package)  in a
project ? Or when u say a package, u mean any project/folder.

You will probably have to use some other tasks  along with the cvs task to
check the availability of the package in you local machine And then have the
cvs task work accordingly.

Cvs task itself won't do this checking of availability for you.

Vikas



-----Original Message-----
From: Lindsey, Lucinda [mailto:lalinds@sandia.gov] 
Sent: Thursday, October 09, 2003 3:18 PM
To: 'user@ant.apache.org'
Subject: cvs checkout or update?

Hi,

We are using a cvs task to checkout a package in our build.xml file but
would like slightly different results than what we are getting. Can anyone
help us figure out how to only do the checkout of the cvs package if that
package currently doesn't exist in our work area, and if it does exist, then
do a cvs update? 

Thanks,

Cindy Lindsey
Sandia National Labs



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message