if ( new File( projectDirectory, "pom.xml" ).exists() )
{
downloadArtifactsLock.writeLock().lock();
try
{
FMVerifier verifier = new FMVerifier( projectDirectory.getAbsolutePath() );
verifier.getVerifierProperties().put( "use.mavenRepoLocal", "true" );
verifier.setAutoclean( false );
verifier.getCliOptions().add( "-npu" );
verifier.getCliOptions().add( "-B" );
verifier.getCliOptions().addAll( Arrays.asList( args ) );
// verifier.getCliOptions().add( "-X" );
verifier.setLogFileName( getTestName() + ".resolve.log" );
verifier.executeGoal( "dependency:go-offline" );
}
catch ( Throwable t )
{
t.printStackTrace();
// this is not a real issue
}
finally
{
downloadArtifactsLock.writeLock().unlock();
}
}
FMVerifier verifier = new FMVerifier( projectDirectory.getAbsolutePath() );
// verifier.getCliOptions().add( "-s" + rootFolder.getAbsolutePath() + "/settings.xml" );
// verifier.getCliOptions().add( "-o" );
verifier.getCliOptions().add( "-npu" );
verifier.getCliOptions().add( "-B" );
verifier.getCliOptions().add( "-X" );
verifier.getCliOptions().add( "-Dflex.coverage=true" );
verifier.getCliOptions().add( "-Dflex.coverageOverwriteSourceRoots=" + getSourceRoots() );
verifier.getVerifierProperties().put( "use.mavenRepoLocal", "true" );
Properties sysProps = new Properties();
sysProps.setProperty( "MAVEN_OPTS", "-Xmx512m" );
sysProps.setProperty( "apparat.threads", "false" );
sysProps.setProperty( "apparat.debug", "true" );
verifier.setSystemProperties( sysProps );
verifier.setLogFileName( getTestName() + ".log" );
verifier.setAutoclean( false );
return verifier;
}