throws Exception
{
client = new ContinuumXmlRpcClient( new URL( args[0] ), args[1], args[2] );
System.out.println( "Adding project..." );
AddingResult result = client.addMavenTwoProject( "http://svn.apache.org/repos/asf/continuum/sandbox/simple-example/pom.xml" );
if ( result.hasErrors() )
{
System.out.println( result.getErrorsAsString() );
return;
}
System.out.println( "Project Groups added." );
System.out.println( "=====================" );
int projectGroupId = 0;
for ( Iterator i = result.getProjectGroups().iterator(); i.hasNext(); )
{
ProjectGroupSummary pg = (ProjectGroupSummary) i.next();
projectGroupId = pg.getId();
printProjectGroupSummary( client.getProjectGroupSummary( projectGroupId ) );
}
System.out.println();
System.out.println( "Projects added." );
System.out.println( "=====================" );
for ( Iterator i = result.getProjects().iterator(); i.hasNext(); )
{
ProjectSummary p = (ProjectSummary) i.next();
printProjectSummary( client.getProjectSummary( p.getId() ) );
}
System.out.println();
System.out.println( "Waiting the end of the check out..." );
ProjectSummary ps = (ProjectSummary) result.getProjects().get( 0 );
while ( !"New".equals( client.getProjectStatusAsString( ps.getState() ) ) )
{
ps = client.refreshProjectSummary( ps );
System.out.println( "State of " + ps.getName() + "(" + ps.getId() + "): " +