diff --git a/test/src/main/java/org/jvnet/hudson/test/WarExploder.java b/test/src/main/java/org/jvnet/hudson/test/WarExploder.java index 304a21ea65cc4392ef6fb6d67309e0d35a9e8ef1..5e0a11d1d51231e199c7d1bd924de0f314774163 100644 --- a/test/src/main/java/org/jvnet/hudson/test/WarExploder.java +++ b/test/src/main/java/org/jvnet/hudson/test/WarExploder.java @@ -88,7 +88,8 @@ final class WarExploder { File war = Which.jarFile(Class.forName("executable.Executable")); // TODO this assumes that the CWD of the Maven process is the plugin ${basedir}, which may not be the case - File explodeDir = new File("./target/jenkins-for-test").getAbsoluteFile(); + File buildDirectory = new File(System.getProperty("buildDirectory", "target")); + File explodeDir = new File(buildDirectory, "jenkins-for-test").getAbsoluteFile(); explodeDir.getParentFile().mkdirs(); while (new File(explodeDir + ".exploding").isFile()) { explodeDir = new File(explodeDir + "x");