java left logo
java middle logo
java right logo
 

Home arrow Other API Tips
 
 
Main Menu
Home
Java Tutorials
Book Reviews
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Java Network
Java Forums
Java Blog




Most Visited Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews
Top Rated Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews


Statistics
Registered Users: 4100
Java SE Tips: 614
Java ME Tips: 202
Java EE Tips: 183
Other API Tips: 779
Java Applications: 298
Java Libraries: 209
Java Games: 16
Book Reviews:
 
 
 
How to use Cvs task E-mail
User Rating: / 8
PoorBest 

Cvs

Description

Handles packages/modules retrieved from a CVS repository.

Important: This task needs "cvs" on the path. If it isn't, you will get an error (such as error 2 on windows). If <cvs> doesn't work, try to execute cvs.exe from the command line in the target directory in which you are working.

CVSNT Note: CVSNT prefers users to store the passwords inside the registry. If the cvspass task and the passfile attribute don't seem to work for you, the most likely reason is that CVSNT ignores your .cvspass file completely. See bug zilla report 21657 for recommended workarounds.

Parameters

Attribute Description Required
command the CVS command to execute. No, default "checkout".
compression true or false - if set to true, this is the same as compressionlevel="3" No. Defaults to false.
compressionlevel A number between 1 and 9 (corresponding to possible values for CVS' -z# argument). Any other value is treated as compression="false" No. Defaults to no compression.
cvsRoot the CVSROOT variable. No
cvsRsh the CVS_RSH variable. No
dest the directory where the checked out files should be placed. Note that this is different from CVS's -d command line switch as Ant will never shorten pathnames to avoid empty directories. No, default is project's basedir.
package the package/module to check out. No
tag the tag of the package/module to check out. No
date Use the most recent revision no later than the given date No
quiet suppress informational messages. This is the same as -q on the command line. No, default "false"
reallyquiet suppress all messages. This is the same as -Q on the command line. since Ant 1.6. No, default "false"
noexec report only, don't change any files. No, default to "false"
output the file to direct standard output from the command. No, default output to ANT Log as MSG_INFO.
error the file to direct standard error from the command. No, default error to ANT Log as MSG_WARN.
append whether to append output/error when redirecting to a file. No, default to "false".
port Port used by CVS to communicate with the server. No, default port 2401.
passfile Password file to read passwords from. No, default file ~/.cvspass.
failonerror Stop the build process if the command exits with a return code other than 0. Defaults to "false" No

Examples

  <cvs cvsRoot=":pserver:
 This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
 :/home/cvspublic"
       package="ant"
       dest="${ws.dir}"
  />

checks out the package/module "ant" from the CVS repository pointed to by the cvsRoot attribute, and stores the files in "${ws.dir}".

  <cvs dest="${ws.dir}" command="update"/>

updates the package/module that has previously been checked out into "${ws.dir}".

  <cvs command="-q diff -u -N" output="patch.txt"/>

silently (-q) creates a file called patch.txt which contains a unified (-u) diff which includes new files added via "cvs add" (-N) and can be used as input to patch. The equivalent, using <commandline> elements, is:

<cvs output="patch">
    <commandline>
        <argument value="-q"/>
        <argument value="diff"/>

        <argument value="-u"/>
        <argument value="-N"/>
    </commandline>
</cvs>
or:
<cvs output="patch">
    <commandline>
        <argument line="-q diff -u -N"/>
    </commandline>
</cvs>

You may include as many <commandline> elements as you like. Each will inherit the failonerror, compression, and other "global" parameters from the <cvs> element.

  <cvs command="update -A -d"/>

Updates from the head of repository ignoring sticky bits (-A) and creating any new directories as necessary (-d).

Note: the text of the command is passed to cvs "as-is" so any cvs options should appear before the command, and any command options should appear after the command as in the diff example above. See the cvs manual for details, specifically the Guide to CVS commands

Source: Apache Ant


 Related Tips

 
< Prev   Next >

Page 1 of 0 ( 0 comments )

You can share your information about this topic using the form below!

Please do not post your questions with this form! Thanks.


Name (required)


E-Mail (required)

Your email will not be displayed on the site - only to our administrator
Homepage(optional)



Comment Enable HTML code : Yes No



 
       
         
     
 
 
 
   
 
 
java bottom left
java bottom middle
java bottom right
RSS 0.91 FeedRSS 1.0 FeedRSS 2.0 FeedATOM FeedOPML Feed

Home - About Us - Privacy Policy
Copyright 2005 - 2008 www.java-tips.org
Java is a trademark of Sun Microsystems, Inc.