o Updated to add a test verifying invocations in directories with spaces and special chars are working (Windows).
git-svn-id: https://svn.apache.org/repos/asf/maven/shared/trunk@1776515 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/test/java/org/apache/maven/shared/invoker/DefaultInvokerTest.java b/src/test/java/org/apache/maven/shared/invoker/DefaultInvokerTest.java
index 618ddea..f0924c0 100644
--- a/src/test/java/org/apache/maven/shared/invoker/DefaultInvokerTest.java
+++ b/src/test/java/org/apache/maven/shared/invoker/DefaultInvokerTest.java
@@ -113,6 +113,33 @@
}
@Test
+ public void testSpaceAndSpecialCharPom()
+ throws Exception
+ {
+ logTestStart();
+
+ File basedir = getBasedirForBuild();
+
+ Invoker invoker = newInvoker();
+
+ InvocationRequest request = new DefaultInvocationRequest();
+ request.setBaseDirectory( basedir );
+
+ request.setPomFileName( "pom with spaces & special char.xml" );
+
+ request.setDebug( true );
+
+ List<String> goals = new ArrayList<String>();
+ goals.add( "clean" );
+
+ request.setGoals( goals );
+
+ InvocationResult result = invoker.execute( request );
+
+ assertEquals( 0, result.getExitCode() );
+ }
+
+ @Test
public void testSpaceSettings()
throws Exception
{
diff --git a/src/test/resources/test-space-and-special-char-pom/pom with spaces & special char.xml b/src/test/resources/test-space-and-special-char-pom/pom with spaces & special char.xml
new file mode 100644
index 0000000..f65e8dd
--- /dev/null
+++ b/src/test/resources/test-space-and-special-char-pom/pom with spaces & special char.xml
@@ -0,0 +1,27 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.shared.invoker</groupId>
+ <artifactId>test-space-and-special-char-pom</artifactId>
+ <packaging>jar</packaging>
+ <version>1</version>
+</project>