File workDir = new File( getBasedir(), "target/test-classes/work-dir" );
FileUtils.deleteDirectory( workDir );
File testDir = new File( getBasedir(), "target/test-classes/test-dir" );
FileUtils.deleteDirectory( testDir );
ContinuumReleaseDescriptor descriptor = new ContinuumReleaseDescriptor();
descriptor.setInteractive( false );
descriptor.setScmSourceUrl( "scm:svn:file://localhost/" + scmPath + "/trunk" );
descriptor.setWorkingDirectory( workDir.getAbsolutePath() );
ScmRepository repository = getScmRepositorty( descriptor.getScmSourceUrl() );
ScmFileSet fileSet = new ScmFileSet( workDir );
scmManager.getProviderByRepository( repository ).checkOut( repository, fileSet, (ScmVersion) null );
String pom = FileUtils.fileRead( new File( workDir, "pom.xml" ) );
assertTrue( "Test dev version", pom.indexOf( "<version>2.1-SNAPSHOT</version>" ) > 0 );
doPrepareWithNoError( descriptor );
pom = FileUtils.fileRead( new File( workDir, "pom.xml" ) );
assertTrue( "Test version increment", pom.indexOf( "<version>2.2-SNAPSHOT</version>" ) > 0 );
repository = getScmRepositorty( "scm:svn:file://localhost/" + scmPath + "/tags/test-artifact-2.1" );
fileSet = new ScmFileSet( testDir );
scmManager.getProviderByRepository( repository ).checkOut( repository, fileSet, (ScmVersion) null );
pom = FileUtils.fileRead( new File( testDir, "pom.xml" ) );
assertTrue( "Test released version", pom.indexOf( "<version>2.1</version>" ) > 0 );
File file = new File( descriptor.getWorkingDirectory(), "release.properties" );
assertTrue( "release.properties file does not exist", file.exists() );
Properties properties = new Properties();
InputStream inStream = null;