From a27d5d3e04716ca223211ccb3a0686ddca8ed19a Mon Sep 17 00:00:00 2001 From: John Dennis Casey Date: Fri, 11 Jul 2008 23:24:31 +0000 Subject: [PATCH] Fix these tests for running with spaces in the base directory structure. git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@676100 13f79535-47bb-0310-9956-ffa450edef68 --- .../integrationtests/MavenIT0095Test.java | 2 +- .../integrationtests/MavenIT0100Test.java | 2 +- ...venITmng3099SettingsProfilesWithNoPOM.java | 2 +- ...venITmng3372DirectInvocationOfPlugins.java | 2 +- ...mng3482DependencyPomInterpolationTest.java | 8 +++--- .../src/test/resources/it0051/pom.xml | 26 +++++++++++++++++++ 6 files changed, 33 insertions(+), 9 deletions(-) diff --git a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0095Test.java b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0095Test.java index 95d8073163..ac7d8a5e1a 100644 --- a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0095Test.java +++ b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0095Test.java @@ -24,7 +24,7 @@ public class MavenIT0095Test Verifier verifier = new Verifier( sub1.getAbsolutePath() ); List options = new ArrayList(); - options.add( "-Doutput=" + new File( sub1, "target/effective-pom.xml" ).getAbsolutePath() ); + options.add( "-Doutput=\"" + new File( sub1, "target/effective-pom.xml" ).getAbsolutePath() + "\"" ); verifier.setCliOptions( options ); diff --git a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0100Test.java b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0100Test.java index f24074c770..a7ea225e60 100644 --- a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0100Test.java +++ b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenIT0100Test.java @@ -23,7 +23,7 @@ public class MavenIT0100Test Verifier verifier = new Verifier( child.getAbsolutePath() ); List options = new ArrayList(); - options.add( "-Doutput=" + new File( child, "target/effective-pom.txt" ).getAbsolutePath() ); + options.add( "-Doutput=\"" + new File( child, "target/effective-pom.txt" ).getAbsolutePath() + "\"" ); verifier.setCliOptions( options ); diff --git a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3099SettingsProfilesWithNoPOM.java b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3099SettingsProfilesWithNoPOM.java index 4ffc8a911a..13f0c63d0f 100644 --- a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3099SettingsProfilesWithNoPOM.java +++ b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3099SettingsProfilesWithNoPOM.java @@ -59,7 +59,7 @@ public class MavenITmng3099SettingsProfilesWithNoPOM */ List cliOptions = new ArrayList(); cliOptions.add( "-s" ); - cliOptions.add( new File( testDir, "settings.xml" ).getAbsolutePath() ); + cliOptions.add( "\"" + new File( testDir, "settings.xml" ).getAbsolutePath() + "\"" ); verifier.setCliOptions( cliOptions ); diff --git a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3372DirectInvocationOfPlugins.java b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3372DirectInvocationOfPlugins.java index 6936572a0a..afaa190bbc 100644 --- a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3372DirectInvocationOfPlugins.java +++ b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3372DirectInvocationOfPlugins.java @@ -47,7 +47,7 @@ public class MavenITmng3372DirectInvocationOfPlugins List cliOptions = new ArrayList(); cliOptions.add( "-s" ); - cliOptions.add( settingsFile.getAbsolutePath() ); + cliOptions.add( "\"" + settingsFile.getAbsolutePath() + "\"" ); verifier.setCliOptions( cliOptions ); verifier.executeGoal( "mng3372:test" ); diff --git a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3482DependencyPomInterpolationTest.java b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3482DependencyPomInterpolationTest.java index 56fc66d496..0241ed56b0 100644 --- a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3482DependencyPomInterpolationTest.java +++ b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3482DependencyPomInterpolationTest.java @@ -82,8 +82,7 @@ public class MavenITmng3482DependencyPomInterpolationTest List cliOptions = new ArrayList(); cliOptions.add( "-s" ); - cliOptions.add( settings.getAbsolutePath() ); - cliOptions.add( "-X" ); + cliOptions.add( "\"" + settings.getAbsolutePath() + "\"" ); verifier.setCliOptions( cliOptions ); @@ -128,9 +127,8 @@ public class MavenITmng3482DependencyPomInterpolationTest "@TESTDIR@", testDir.getAbsolutePath() ); - File settingsOut = new File( testDir, "settings.xml" ); - - System.out.println( "Writing tets settings to: " + settingsOut ); + File settingsOut = File.createTempFile( "settings.", ".xml" ); + settingsOut.deleteOnExit(); if ( settingsOut.exists() ) { diff --git a/its/core-integration-tests/src/test/resources/it0051/pom.xml b/its/core-integration-tests/src/test/resources/it0051/pom.xml index 9740c68dc1..2d72aebc0a 100644 --- a/its/core-integration-tests/src/test/resources/it0051/pom.xml +++ b/its/core-integration-tests/src/test/resources/it0051/pom.xml @@ -15,4 +15,30 @@ test + + + + + + + maven-javadoc-plugin + 2.4 + + + org.codehaus.plexus + plexus-utils + 1.5.4 + + + + + +