From 8ee8479080a87465614c7c3906e5e325aba347a6 Mon Sep 17 00:00:00 2001 From: Robert Scholte Date: Sat, 5 Jul 2014 15:26:29 +0200 Subject: [PATCH] Trying to fix MNG4625 on Jenkins Update maven-shared-utils to 0.6 --- its/core-it-suite/pom.xml | 2 +- ...SettingsXmlInterpolationWithXmlMarkupTest.java | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/its/core-it-suite/pom.xml b/its/core-it-suite/pom.xml index a7cdcf2931..80d3d302da 100644 --- a/its/core-it-suite/pom.xml +++ b/its/core-it-suite/pom.xml @@ -122,7 +122,7 @@ under the License. org.apache.maven.shared maven-shared-utils - 0.1 + 0.6 diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4625SettingsXmlInterpolationWithXmlMarkupTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4625SettingsXmlInterpolationWithXmlMarkupTest.java index 9781f47580..7cec58591f 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4625SettingsXmlInterpolationWithXmlMarkupTest.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4625SettingsXmlInterpolationWithXmlMarkupTest.java @@ -21,6 +21,7 @@ package org.apache.maven.it; import org.apache.maven.it.Verifier; import org.apache.maven.it.util.ResourceExtractor; +import org.codehaus.plexus.util.Os; import java.io.File; import java.util.Properties; @@ -51,7 +52,19 @@ public class MavenITmng4625SettingsXmlInterpolationWithXmlMarkupTest Verifier verifier = newVerifier( testDir.getAbsolutePath() ); verifier.setAutoclean( false ); verifier.deleteDirectory( "target" ); - verifier.setSystemProperty( "test.prop", "&x=y<>" ); + + // http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6468220 + // A lot of bugs related to Windows arguments and quoting + // Directly called from commandline succeeds, indirect often fails + if( Os.isFamily( Os.FAMILY_WINDOWS ) && !System.getProperties().contains( "CLASSWORLDS_LAUNCHER" ) ) + { + verifier.setSystemProperty( "test.prop", "\"&x=y<>\"" ); + } + else + { + verifier.setSystemProperty( "test.prop", "&x=y<>" ); + } + verifier.addCliOption( "--settings" ); verifier.addCliOption( "settings.xml" ); verifier.executeGoal( "validate" );