Author: jdcasey Date: Wed Jul 30 18:07:50 2008 New Revision: 681249 URL: http://svn.apache.org/viewvc?rev=681249&view=rev Log: incremental improvements to IT for mng-3599.
Modified: maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3599useHttpProxyForWebDAV.java maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3599-useHttpProxyForWebDAV/settings.xml.template Modified: maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3599useHttpProxyForWebDAV.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3599useHttpProxyForWebDAV.java?rev=681249&r1=681248&r2=681249&view=diff ============================================================================== --- maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3599useHttpProxyForWebDAV.java (original) +++ maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3599useHttpProxyForWebDAV.java Wed Jul 30 18:07:50 2008 @@ -68,19 +68,24 @@ throws Exception { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3599-useHttpProxyForWebDAV" ); + String settings = FileUtils.fileRead( new File( testDir, "settings.xml.template" ) ); settings = StringUtils.replace( settings, "@port@", Integer.toString( port ) ); String newSettings = StringUtils.replace( settings, "@protocol@", "http" ); + FileUtils.fileWrite( new File( testDir, "settings.xml" ).getAbsolutePath(), newSettings ); - + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); List cliOptions = new ArrayList(); cliOptions.add( "--settings" ); cliOptions.add( "settings.xml" ); + verifier.setCliOptions( cliOptions ); verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar" ); + verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "pom" ); + verifier.executeGoal( "compile" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); @@ -101,9 +106,12 @@ if ( matchesVersionRange( "(2.0.10,2.0.99)" ) ) { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3599-useHttpProxyForWebDAV" ); - + String settings = FileUtils.fileRead( new File( testDir, "settings.xml.template" ) ); settings = StringUtils.replace( settings, "@port@", Integer.toString( port ) ); + String newSettings = StringUtils.replace( settings, "@protocol@", "dav" ); + + FileUtils.fileWrite( new File( testDir, "settings.xml" ).getAbsolutePath(), newSettings ); Verifier verifier = new Verifier( testDir.getAbsolutePath() ); @@ -113,10 +121,9 @@ verifier.setCliOptions( cliOptions ); - String newSettings = StringUtils.replace( settings, "@protocol@", "dav" ); - FileUtils.fileWrite( new File( testDir, "settings.xml" ).getAbsolutePath(), newSettings ); - verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar" ); + verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "pom" ); + verifier.executeGoal( "compile" ); verifier.verifyErrorFreeLog(); verifier.resetStreams(); Modified: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3599-useHttpProxyForWebDAV/settings.xml.template URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3599-useHttpProxyForWebDAV/settings.xml.template?rev=681249&r1=681248&r2=681249&view=diff ============================================================================== --- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3599-useHttpProxyForWebDAV/settings.xml.template (original) +++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3599-useHttpProxyForWebDAV/settings.xml.template Wed Jul 30 18:07:50 2008 @@ -10,7 +10,7 @@ <proxy> <id>http-proxy</id> <protocol>http</protocol> - <host>localhost</host> + <host>127.0.0.1</host> <port>@port@</port> </proxy> </proxies>