Command line usage

From the command line, use cvsgrab.bat or to run it.

Type cvsgrab -help to get help

You may need to define the CVSGRAB_HOME environment property if you want to call cvsgrab.bat from any location.

It works like the ANT_HOME or JAVA_HOME property: put in CVSGRAB_HOME the location of your CVSGrab installation.

Standard use

Open your browser, go the the page that contains the root of the directory you want to download.

For example, if you want to download the sources of Jakarta's Ant tool, open your browser with

To get the sources from this repository, simply type on the command line:

cvsgrab -url

Now if you wanted the 1.6 branch of Ant, in 'Show files using tag' at the bottom of the web page, select ANT_16_BRANCH and press the Show button. Copy the new url to the clipboard, and type on the command line:

cvsgrab -url -connections 3 -clean -prune

Note the -connections 3 option that speeds up downloads by allowing up to 3 concurrent downloads of files, -clean that forces cvsgrab to get the latest version of the file and override the local version (backup-ed if there were changes made to it), and -prune that removes empty directories.

Advanced use

The following examples are provided for the few times the url autodetection feature of CVSGrab doesn't work, plus some advanced feature like compatibility with ViewCVS/TortoiseCVS/any thoer cvs client, speeding transfer with multiple concurrent downloads and more.

If you discover a site that doesn't work with the -url option, or if the version of the files returned is incorrect, please let me know and file a bug report

CVSGrab itself on SourceForge (ViewCVS 0.8)


cvsgrab -url -destDir c:/tmp -packageDir CVSGrab

Note the -packageDir option that is used to avoid getting a folder called cvsgrab containing another folder called cvsgrab also on the disk.

Eclipse (ViewCVS 0.9.2) with explicit proxy settings


cvsgrab -rootUrl -packagePath org.eclipse.ant.core -destDir c:/tmp -proxyHost -proxyPort 8080

Eclipse (ViewCVS 0.9.2) with multiple roots


cvsgrab -rootUrl -packagePath org.eclipse.ercp -destDir c:\tmp -projectRoot Technology_Project

Note the -projectRoot option used by ViewCVS 1.0 when it's configured to work with multiple repositories (you should see a dropdown box with the label 'Project Root' on the web page). It's value is also the same as the root parameter from the url.

Maven on Apache Jakarta with tag MAVEN_1_0_RC1 (ViewCVS 1.0-dev)


cvsgrab -rootUrl -packagePath maven -destDir c:\tmp -tag MAVEN_1_0_RC1 -cvsRoot

Note the -cvsRoot option. This option is useful as it helps CVSGrab to build the CVS admin files in the same format as other CVS tools, like CVSGui / WinCVS, so if you manage to get a direct connection to the internet without a firewall, you can use with no changes the repository checked out by CVSGrab with WinCVS for example.

JavaCVS module on (SourceCast 1.0)


cvsgrab -rootUrl -packagePath javacvs -destDir c:\tmp -connections 3

Note the -connections option that allows up to 3 simultaneous downloads, to get faster downloads.

Great when uploading sources from a cvs repository for the first time.

WebWork on (SourceCast 2.0)


cvsgrab -rootUrl -packagePath src -destDir c:\tmp -packageDir webwork-src