throws Exception
{
// Set up the CVSRoot. Note that it might still be null after this
// call if the user has decided to set it with the -d command line
// global option
GlobalOptions globalOptions = new GlobalOptions();
globalOptions.setCVSRoot( getCVSRoot( localPath ) );
// Set up any global options specified. These occur before the
// name of the command to run
int commandIndex;
try
{
commandIndex = processGlobalOptions( args, globalOptions );
}
catch ( IllegalArgumentException e )
{
if ( logger.isErrorEnabled() )
{
logger.error( "Invalid argument: " + e );
}
return false;
}
// if we don't have a CVS root by now, the user has messed up
if ( globalOptions.getCVSRoot() == null )
{
if ( logger.isErrorEnabled() )
{
logger.error( "No CVS root is set. Check your <repository> information in the POM." );
}
return false;
}
// parse the CVS root into its constituent parts
CVSRoot root;
final String cvsRoot = globalOptions.getCVSRoot();
try
{
root = CVSRoot.parse( cvsRoot );
}
catch ( IllegalArgumentException e )