ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: How to access files from Clear case
Date Thu, 18 Nov 2004 13:28:24 GMT
"Sanjeev_Das" <> wrote ..
> Hi All,
> I was using VSS until now. In that case I used to use the task <vssget>
> to access the files from VSS. Now that I am shifting to Clear Case, I
> don't know what commands to use to access the files. Would appreciate
> any kind of help regarding what commands/tasks to use for clear case.

there is a whole set of optional  cc tasks....which I have found 

here is an example of labelling with cc

<!-- ===================================================== --> 
<!-- cc: label	  		                       	   --> 
<!-- ===================================================== --> 
<target name="cc.label" description="example cc label">

<property name="version" value="1.0.1"/>

<!-- create label cbrm -->                
<ccmklbtype vob="/src"

<!-- label src -->
<ccmklabel viewpath="/src"

note how you must 1st create label, then instruct labelling with recurse flag set to true.

I find the cc tasks a bit awkward because they dont support the notion of filesets or paths,
for example...lets say I want Ant to checkout a set of files for me...

<!-- ===================================================== --> 
<!-- CC Checkout example                                   --> 
<!-- ===================================================== --> 

<target name="cc.checkout" description="example cc checkout">

<!-- need to use antcontrib's foreach task   -->
<taskdef resource="net/sf/antcontrib/">
	<pathelement location="lib/ant-contrib/lib/ant-contrib1.0b1.jar"/>

<!-- iterate through each file and run cleartool to perform a checkout -->
<foreach param="file_var" target="run_cleartool_checkout">
            <fileset dir="/src">
                 <include name="**/*.*"/>
                 <exclude name="**/.lock"/>                 


this target has to iterate through each file under /src, calling run_cleartool_checkout target,
which then applys the <cccheckout/> task to each individual file... which is defined
in a seperate target below;

<!-- perform a checkout..really this should be a macro -->
<target name="run_cleartool_checkout">    

<cccheckout viewpath="${file_var}"
        comment="Ant Checked this out"/>


fun no? perhaps others know of more advanced macro wrapping around existing cc tasks...or
they know of any new work being done with them.

gl, Jim Fuller

View raw message