maven-surefire git commit: [SUREFIRE-1376] "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-06-03 Thread tibordigana
Repository: maven-surefire
Updated Branches:
  refs/heads/master fac376c5f -> 59c065f5d


[SUREFIRE-1376] "The forked VM terminated without properly saying goodbye" when 
running Surefire in a very deep project structure on Windows


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/59c065f5
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/59c065f5
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/59c065f5

Branch: refs/heads/master
Commit: 59c065f5d4a5a9c181ef9ce788b31305886e8592
Parents: fac376c
Author: Tibor17 
Authored: Sat Jun 3 08:55:23 2017 +0200
Committer: Tibor17 
Committed: Sat Jun 3 12:46:46 2017 +0200

--
 .../maven/plugin/surefire/SurefireHelper.java   | 33 
 .../booterclient/ForkConfiguration.java | 13 
 .../plugin/surefire/SurefireHelperTest.java | 24 ++
 3 files changed, 63 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/59c065f5/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
index 8bdf75e..cd49249 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
@@ -36,6 +36,7 @@ import java.util.Collection;
 import java.util.List;
 
 import static java.util.Collections.unmodifiableList;
+import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS;
 import static 
org.apache.maven.surefire.booter.DumpErrorSingleton.DUMPSTREAM_FILE_EXT;
 import static 
org.apache.maven.surefire.booter.DumpErrorSingleton.DUMP_FILE_EXT;
 import static 
org.apache.maven.surefire.cli.CommandLineOption.LOGGING_LEVEL_DEBUG;
@@ -55,6 +56,19 @@ public final class SurefireHelper
 
 public static final String DUMPSTREAM_FILENAME_FORMATTER = 
DUMP_FILE_PREFIX + "%d" + DUMPSTREAM_FILE_EXT;
 
+/**
+ * see sun/nio/fs/WindowsPath 
+ * 
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/7534523b4174/src/windows/classes/sun/nio/fs/WindowsPath.java#l46
+ * https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath
+ * 
+ * 
+ * The maximum path that does not require long path prefix. On Windows 
+ * the maximum path is 260 minus 1 (NUL) but for directories it is 260 
+ * minus 12 minus 1 (to allow for the creation of a 8.3 file in the 
+ * directory).
+ */
+private static final int MAX_PATH_LENGTH_WINDOWS = 247;
+
 private static final String[] DUMP_FILES_PRINT =
 {
 "[date]-jvmRun[N]" + DUMP_FILE_EXT,
@@ -165,6 +179,25 @@ public final class SurefireHelper
 }
 }
 
+/**
+ * Normalized file path for Windows; otherwise returns {@code path}.
+ * 
+ * 
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/7534523b4174/src/windows/classes/sun/nio/fs/WindowsPath.java#l46
+ * 
+ * https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath
+ *
+ * @param pathsource path
+ * @return escaped to platform path
+ */
+public static String escapeToPlatformPath( String path )
+{
+if ( IS_OS_WINDOWS && path.length() > MAX_PATH_LENGTH_WINDOWS )
+{
+path = path.startsWith( "" ) ? "?\\UNC\\" + 
path.substring( 2 ) : "?\\" + path;
+}
+return path;
+}
+
 private static String getFailureBehavior( MavenExecutionRequest request )
 throws NoSuchMethodException, InvocationTargetException, 
IllegalAccessException
 {

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/59c065f5/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
index cd4ae2b..2768210 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
@@ -21,13 +21,13 @@ package org.apache.maven.plugin.surefire.booterclient;
 
 import org.apache.maven.plugin.surefire.AbstractSurefireMojo;
 import 

maven-surefire git commit: [SUREFIRE-1376] "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows [Forced Update!]

2017-06-03 Thread tibordigana
Repository: maven-surefire
Updated Branches:
  refs/heads/SUREFIRE-1376 de410132b -> 59c065f5d (forced update)


[SUREFIRE-1376] "The forked VM terminated without properly saying goodbye" when 
running Surefire in a very deep project structure on Windows


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/59c065f5
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/59c065f5
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/59c065f5

Branch: refs/heads/SUREFIRE-1376
Commit: 59c065f5d4a5a9c181ef9ce788b31305886e8592
Parents: fac376c
Author: Tibor17 
Authored: Sat Jun 3 08:55:23 2017 +0200
Committer: Tibor17 
Committed: Sat Jun 3 12:46:46 2017 +0200

--
 .../maven/plugin/surefire/SurefireHelper.java   | 33 
 .../booterclient/ForkConfiguration.java | 13 
 .../plugin/surefire/SurefireHelperTest.java | 24 ++
 3 files changed, 63 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/59c065f5/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
index 8bdf75e..cd49249 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
@@ -36,6 +36,7 @@ import java.util.Collection;
 import java.util.List;
 
 import static java.util.Collections.unmodifiableList;
+import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS;
 import static 
org.apache.maven.surefire.booter.DumpErrorSingleton.DUMPSTREAM_FILE_EXT;
 import static 
org.apache.maven.surefire.booter.DumpErrorSingleton.DUMP_FILE_EXT;
 import static 
org.apache.maven.surefire.cli.CommandLineOption.LOGGING_LEVEL_DEBUG;
@@ -55,6 +56,19 @@ public final class SurefireHelper
 
 public static final String DUMPSTREAM_FILENAME_FORMATTER = 
DUMP_FILE_PREFIX + "%d" + DUMPSTREAM_FILE_EXT;
 
+/**
+ * see sun/nio/fs/WindowsPath 
+ * 
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/7534523b4174/src/windows/classes/sun/nio/fs/WindowsPath.java#l46
+ * https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath
+ * 
+ * 
+ * The maximum path that does not require long path prefix. On Windows 
+ * the maximum path is 260 minus 1 (NUL) but for directories it is 260 
+ * minus 12 minus 1 (to allow for the creation of a 8.3 file in the 
+ * directory).
+ */
+private static final int MAX_PATH_LENGTH_WINDOWS = 247;
+
 private static final String[] DUMP_FILES_PRINT =
 {
 "[date]-jvmRun[N]" + DUMP_FILE_EXT,
@@ -165,6 +179,25 @@ public final class SurefireHelper
 }
 }
 
+/**
+ * Normalized file path for Windows; otherwise returns {@code path}.
+ * 
+ * 
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/7534523b4174/src/windows/classes/sun/nio/fs/WindowsPath.java#l46
+ * 
+ * https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath
+ *
+ * @param pathsource path
+ * @return escaped to platform path
+ */
+public static String escapeToPlatformPath( String path )
+{
+if ( IS_OS_WINDOWS && path.length() > MAX_PATH_LENGTH_WINDOWS )
+{
+path = path.startsWith( "" ) ? "?\\UNC\\" + 
path.substring( 2 ) : "?\\" + path;
+}
+return path;
+}
+
 private static String getFailureBehavior( MavenExecutionRequest request )
 throws NoSuchMethodException, InvocationTargetException, 
IllegalAccessException
 {

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/59c065f5/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
index cd4ae2b..2768210 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
@@ -21,13 +21,13 @@ package org.apache.maven.plugin.surefire.booterclient;
 
 import 

maven-surefire git commit: [SUREFIRE-1376] "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows [Forced Update!]

2017-06-03 Thread tibordigana
Repository: maven-surefire
Updated Branches:
  refs/heads/SUREFIRE-1376 9c73ff499 -> de410132b (forced update)


[SUREFIRE-1376] "The forked VM terminated without properly saying goodbye" when 
running Surefire in a very deep project structure on Windows


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/de410132
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/de410132
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/de410132

Branch: refs/heads/SUREFIRE-1376
Commit: de410132b27372f5206ef43dd6a2d31f6820409b
Parents: fac376c
Author: Tibor17 
Authored: Sat Jun 3 08:55:23 2017 +0200
Committer: Tibor17 
Committed: Sat Jun 3 12:30:47 2017 +0200

--
 .../maven/plugin/surefire/SurefireHelper.java   | 33 
 .../booterclient/ForkConfiguration.java | 13 
 .../plugin/surefire/SurefireHelperTest.java | 24 ++
 3 files changed, 63 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/de410132/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
index 8bdf75e..cd49249 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
@@ -36,6 +36,7 @@ import java.util.Collection;
 import java.util.List;
 
 import static java.util.Collections.unmodifiableList;
+import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS;
 import static 
org.apache.maven.surefire.booter.DumpErrorSingleton.DUMPSTREAM_FILE_EXT;
 import static 
org.apache.maven.surefire.booter.DumpErrorSingleton.DUMP_FILE_EXT;
 import static 
org.apache.maven.surefire.cli.CommandLineOption.LOGGING_LEVEL_DEBUG;
@@ -55,6 +56,19 @@ public final class SurefireHelper
 
 public static final String DUMPSTREAM_FILENAME_FORMATTER = 
DUMP_FILE_PREFIX + "%d" + DUMPSTREAM_FILE_EXT;
 
+/**
+ * see sun/nio/fs/WindowsPath 
+ * 
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/7534523b4174/src/windows/classes/sun/nio/fs/WindowsPath.java#l46
+ * https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath
+ * 
+ * 
+ * The maximum path that does not require long path prefix. On Windows 
+ * the maximum path is 260 minus 1 (NUL) but for directories it is 260 
+ * minus 12 minus 1 (to allow for the creation of a 8.3 file in the 
+ * directory).
+ */
+private static final int MAX_PATH_LENGTH_WINDOWS = 247;
+
 private static final String[] DUMP_FILES_PRINT =
 {
 "[date]-jvmRun[N]" + DUMP_FILE_EXT,
@@ -165,6 +179,25 @@ public final class SurefireHelper
 }
 }
 
+/**
+ * Normalized file path for Windows; otherwise returns {@code path}.
+ * 
+ * 
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/7534523b4174/src/windows/classes/sun/nio/fs/WindowsPath.java#l46
+ * 
+ * https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath
+ *
+ * @param pathsource path
+ * @return escaped to platform path
+ */
+public static String escapeToPlatformPath( String path )
+{
+if ( IS_OS_WINDOWS && path.length() > MAX_PATH_LENGTH_WINDOWS )
+{
+path = path.startsWith( "" ) ? "?\\UNC\\" + 
path.substring( 2 ) : "?\\" + path;
+}
+return path;
+}
+
 private static String getFailureBehavior( MavenExecutionRequest request )
 throws NoSuchMethodException, InvocationTargetException, 
IllegalAccessException
 {

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/de410132/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
index cd4ae2b..2768210 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
@@ -21,13 +21,13 @@ package org.apache.maven.plugin.surefire.booterclient;
 
 import 

maven-surefire git commit: [SUREFIRE-1376] "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows [Forced Update!]

2017-06-03 Thread tibordigana
Repository: maven-surefire
Updated Branches:
  refs/heads/SUREFIRE-1376 008052d28 -> 9c73ff499 (forced update)


[SUREFIRE-1376] "The forked VM terminated without properly saying goodbye" when 
running Surefire in a very deep project structure on Windows


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/9c73ff49
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/9c73ff49
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/9c73ff49

Branch: refs/heads/SUREFIRE-1376
Commit: 9c73ff4997e5b53b730fa3b403d7342c53d4ac53
Parents: fac376c
Author: Tibor17 
Authored: Sat Jun 3 08:55:23 2017 +0200
Committer: Tibor17 
Committed: Sat Jun 3 12:24:05 2017 +0200

--
 .../maven/plugin/surefire/SurefireHelper.java   | 33 
 .../booterclient/ForkConfiguration.java | 13 
 .../plugin/surefire/SurefireHelperTest.java | 20 
 3 files changed, 59 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9c73ff49/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
index 8bdf75e..cd49249 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
@@ -36,6 +36,7 @@ import java.util.Collection;
 import java.util.List;
 
 import static java.util.Collections.unmodifiableList;
+import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS;
 import static 
org.apache.maven.surefire.booter.DumpErrorSingleton.DUMPSTREAM_FILE_EXT;
 import static 
org.apache.maven.surefire.booter.DumpErrorSingleton.DUMP_FILE_EXT;
 import static 
org.apache.maven.surefire.cli.CommandLineOption.LOGGING_LEVEL_DEBUG;
@@ -55,6 +56,19 @@ public final class SurefireHelper
 
 public static final String DUMPSTREAM_FILENAME_FORMATTER = 
DUMP_FILE_PREFIX + "%d" + DUMPSTREAM_FILE_EXT;
 
+/**
+ * see sun/nio/fs/WindowsPath 
+ * 
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/7534523b4174/src/windows/classes/sun/nio/fs/WindowsPath.java#l46
+ * https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath
+ * 
+ * 
+ * The maximum path that does not require long path prefix. On Windows 
+ * the maximum path is 260 minus 1 (NUL) but for directories it is 260 
+ * minus 12 minus 1 (to allow for the creation of a 8.3 file in the 
+ * directory).
+ */
+private static final int MAX_PATH_LENGTH_WINDOWS = 247;
+
 private static final String[] DUMP_FILES_PRINT =
 {
 "[date]-jvmRun[N]" + DUMP_FILE_EXT,
@@ -165,6 +179,25 @@ public final class SurefireHelper
 }
 }
 
+/**
+ * Normalized file path for Windows; otherwise returns {@code path}.
+ * 
+ * 
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/7534523b4174/src/windows/classes/sun/nio/fs/WindowsPath.java#l46
+ * 
+ * https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath
+ *
+ * @param pathsource path
+ * @return escaped to platform path
+ */
+public static String escapeToPlatformPath( String path )
+{
+if ( IS_OS_WINDOWS && path.length() > MAX_PATH_LENGTH_WINDOWS )
+{
+path = path.startsWith( "" ) ? "?\\UNC\\" + 
path.substring( 2 ) : "?\\" + path;
+}
+return path;
+}
+
 private static String getFailureBehavior( MavenExecutionRequest request )
 throws NoSuchMethodException, InvocationTargetException, 
IllegalAccessException
 {

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9c73ff49/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
index cd4ae2b..2768210 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
@@ -21,13 +21,13 @@ package org.apache.maven.plugin.surefire.booterclient;
 
 import 

maven-surefire git commit: [SUREFIRE-1376] "The forked VM terminated without properly saying goodbye" when running Surefire in a very deep project structure on Windows

2017-06-03 Thread tibordigana
Repository: maven-surefire
Updated Branches:
  refs/heads/SUREFIRE-1376 [created] 008052d28


[SUREFIRE-1376] "The forked VM terminated without properly saying goodbye" when 
running Surefire in a very deep project structure on Windows


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/008052d2
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/008052d2
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/008052d2

Branch: refs/heads/SUREFIRE-1376
Commit: 008052d2882fb3a60e7c4b58a0f9cafae3031f07
Parents: fac376c
Author: Tibor17 
Authored: Sat Jun 3 08:55:23 2017 +0200
Committer: Tibor17 
Committed: Sat Jun 3 08:55:23 2017 +0200

--
 .../maven/plugin/surefire/SurefireHelper.java   | 33 
 .../booterclient/ForkConfiguration.java | 13 
 2 files changed, 39 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/008052d2/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
index 8bdf75e..e3a6fee 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
@@ -36,6 +36,7 @@ import java.util.Collection;
 import java.util.List;
 
 import static java.util.Collections.unmodifiableList;
+import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS;
 import static 
org.apache.maven.surefire.booter.DumpErrorSingleton.DUMPSTREAM_FILE_EXT;
 import static 
org.apache.maven.surefire.booter.DumpErrorSingleton.DUMP_FILE_EXT;
 import static 
org.apache.maven.surefire.cli.CommandLineOption.LOGGING_LEVEL_DEBUG;
@@ -55,6 +56,19 @@ public final class SurefireHelper
 
 public static final String DUMPSTREAM_FILENAME_FORMATTER = 
DUMP_FILE_PREFIX + "%d" + DUMPSTREAM_FILE_EXT;
 
+/**
+ * see sun/nio/fs/WindowsPath 
+ * 
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/7534523b4174/src/windows/classes/sun/nio/fs/WindowsPath.java#l46
+ * https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath
+ * 
+ * 
+ * The maximum path that does not require long path prefix. On Windows 
+ * the maximum path is 260 minus 1 (NUL) but for directories it is 260 
+ * minus 12 minus 1 (to allow for the creation of a 8.3 file in the 
+ * directory).
+ */
+private static final int MAX_PATH_LENGTH_WINDOWS = 247;
+
 private static final String[] DUMP_FILES_PRINT =
 {
 "[date]-jvmRun[N]" + DUMP_FILE_EXT,
@@ -165,6 +179,25 @@ public final class SurefireHelper
 }
 }
 
+/**
+ * Normalized file path for Windows; otherwise returns {@code path}.
+ * 
+ * 
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/7534523b4174/src/windows/classes/sun/nio/fs/WindowsPath.java#l46
+ * 
+ * https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath
+ *
+ * @param pathsource path
+ * @return normalized path
+ */
+public static String normalizePath( String path )
+{
+if ( IS_OS_WINDOWS && path.length() > MAX_PATH_LENGTH_WINDOWS )
+{
+path = path.startsWith( "" ) ? "?\\UNC\\" + 
path.substring( 2 ) : "?\\" + path;
+}
+return path;
+}
+
 private static String getFailureBehavior( MavenExecutionRequest request )
 throws NoSuchMethodException, InvocationTargetException, 
IllegalAccessException
 {

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/008052d2/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
index cd4ae2b..62e5ec1 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkConfiguration.java
@@ -21,13 +21,13 @@ package org.apache.maven.plugin.surefire.booterclient;
 
 import org.apache.maven.plugin.surefire.AbstractSurefireMojo;
 import