always use --settings, only use the system property for global on those that don't support the argument

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@738992 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2009-01-29 20:13:04 +00:00
parent ad1e87e14d
commit 25efc013ba
1 changed files with 9 additions and 7 deletions

View File

@ -50,17 +50,19 @@ public class MavenITmng0294MergeGlobalAndUserSettingsTest
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.setAutoclean( false );
verifier.deleteDirectory( "target" );
Properties systemProperties = new Properties();
systemProperties.put( "org.apache.maven.user-settings", "user-settings.xml" );
systemProperties.put( "org.apache.maven.global-settings", "global-settings.xml" );
verifier.setSystemProperties( systemProperties );
if ( matchesVersionRange( "(2.99,)" ) )
verifier.getCliOptions().add( "--settings" );
verifier.getCliOptions().add( new File( testDir, "user-settings.xml" ).getAbsolutePath() );
if ( matchesVersionRange( "[3.0-alpha-1,)" ) )
{
verifier.getCliOptions().add( "--settings" );
verifier.getCliOptions().add( new File( testDir, "user-settings.xml" ).getAbsolutePath() );
verifier.getCliOptions().add( "--global-settings" );
verifier.getCliOptions().add( new File( testDir, "global-settings.xml" ).getAbsolutePath() );
}
else
{
Properties systemProperties = new Properties();
systemProperties.put( "org.apache.maven.global-settings", "global-settings.xml" );
verifier.setSystemProperties( systemProperties );
}
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-touch:touch" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();