svn commit: r1013415 - /websites/production/maven/content/

2017-06-03 Thread hboutemy
Author: hboutemy
Date: Sat Jun  3 14:29:52 2017
New Revision: 1013415

Log:
Publishing svnmucc operation to maven site by hboutemy

Added:
websites/production/maven/content/
  - copied from r1013414, websites/staging/maven/trunk/content/



svn commit: r1013414 [4/4] - in /websites/staging/maven/trunk/content: ./ apache-resource-bundles/ archetypes/ archives/maven-2.x/ background/ developers/ developers/conventions/ developers/release/ d

2017-06-03 Thread buildbot
Modified: websites/staging/maven/trunk/content/index.html
==
--- websites/staging/maven/trunk/content/index.html (original)
+++ websites/staging/maven/trunk/content/index.html Sat Jun  3 14:27:57 2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
@@ -10,7 +10,7 @@
 
 
 
-
+
 
 Maven  Welcome to Apache Maven
 
@@ -42,7 +42,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Welcome to Apache Maven
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: websites/staging/maven/trunk/content/install.html
==
--- websites/staging/maven/trunk/content/install.html (original)
+++ websites/staging/maven/trunk/content/install.html Sat Jun  3 14:27:57 2017
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
   
 
 
-
+
 
 Maven  Installing Apache Maven
 
@@ -39,7 +39,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Installing Apache Maven
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: websites/staging/maven/trunk/content/integration.html
==
--- websites/staging/maven/trunk/content/integration.html (original)
+++ websites/staging/maven/trunk/content/integration.html Sat Jun  3 14:27:57 
2017
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
   
 
 
-
+
 
 Maven  CI Management
 
@@ -39,7 +39,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 CI Management
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: websites/staging/maven/trunk/content/issue-tracking.html
==
--- websites/staging/maven/trunk/content/issue-tracking.html (original)
+++ websites/staging/maven/trunk/content/issue-tracking.html Sat Jun  3 
14:27:57 2017
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
   
 
 
-
+
 
 Maven  Overview
 
@@ -39,7 +39,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Overview
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: websites/staging/maven/trunk/content/mail-lists.html
==
--- websites/staging/maven/trunk/content/mail-lists.html (original)
+++ websites/staging/maven/trunk/content/mail-lists.html Sat Jun  3 14:27:57 
2017
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
   
 
 
-
+
 
 Maven  Project Mailing Lists
 
@@ -39,7 +39,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Project Mailing Lists
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: websites/staging/maven/trunk/content/maven-1.x-eol.html
==
--- websites/staging/maven/trunk/content/maven-1.x-eol.html (original)
+++ websites/staging/maven/trunk/content/maven-1.x-eol.html Sat Jun  3 14:27:57 
2017
@@ -1,13 +1,13 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
   
 
 
-
+
 
 Maven  End Of Life Apache Maven 1.x
 
@@ -39,7 +39,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 End Of Life Apache Maven 1.x
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: websites/staging/maven/trunk/content/maven-2.x-eol.html
==
--- websites/staging/maven/trunk/content/maven-2.x-eol.html (original)
+++ websites/staging/maven/trunk/content/maven-2.x-eol.html Sat Jun  3 14:27:57 
2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
@@ -9,7 +9,7 @@
 
 
 
-
+
 
 Maven  End Of Life of Maven 2.x
 
@@ -41,7 +41,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 End Of Life of Maven 2.x
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: websites/staging/maven/trunk/content/maven-ci-friendly.html
==
--- 

svn commit: r1013414 [2/4] - in /websites/staging/maven/trunk/content: ./ apache-resource-bundles/ archetypes/ archives/maven-2.x/ background/ developers/ developers/conventions/ developers/release/ d

2017-06-03 Thread buildbot
Modified: websites/staging/maven/trunk/content/docs/2.0.7/release-notes.html
==
--- websites/staging/maven/trunk/content/docs/2.0.7/release-notes.html 
(original)
+++ websites/staging/maven/trunk/content/docs/2.0.7/release-notes.html Sat Jun  
3 14:27:57 2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
@@ -9,7 +9,7 @@
 
 
 
-
+
 
 Maven  Release Notes - Maven 2.0.7
 
@@ -41,7 +41,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Release Notes - Maven 2.0.7
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: websites/staging/maven/trunk/content/docs/2.0.8/release-notes.html
==
--- websites/staging/maven/trunk/content/docs/2.0.8/release-notes.html 
(original)
+++ websites/staging/maven/trunk/content/docs/2.0.8/release-notes.html Sat Jun  
3 14:27:57 2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
@@ -9,7 +9,7 @@
 
 
 
-
+
 
 Maven  Release Notes - Maven 2.0.8
 
@@ -41,7 +41,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Release Notes - Maven 2.0.8
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: websites/staging/maven/trunk/content/docs/2.0.9/release-notes.html
==
--- websites/staging/maven/trunk/content/docs/2.0.9/release-notes.html 
(original)
+++ websites/staging/maven/trunk/content/docs/2.0.9/release-notes.html Sat Jun  
3 14:27:57 2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
@@ -9,7 +9,7 @@
 
 
 
-
+
 
 Maven  Release Notes - Maven 2.0.9
 
@@ -41,7 +41,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Release Notes - Maven 2.0.9
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: websites/staging/maven/trunk/content/docs/2.0/release-notes.html
==
--- websites/staging/maven/trunk/content/docs/2.0/release-notes.html (original)
+++ websites/staging/maven/trunk/content/docs/2.0/release-notes.html Sat Jun  3 
14:27:57 2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
@@ -8,7 +8,7 @@
 
 
 
-
+
 
 Maven  Release Notes - Maven 2.0
 
@@ -40,7 +40,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Release Notes - Maven 2.0
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: websites/staging/maven/trunk/content/docs/2.1.0/release-notes.html
==
--- websites/staging/maven/trunk/content/docs/2.1.0/release-notes.html 
(original)
+++ websites/staging/maven/trunk/content/docs/2.1.0/release-notes.html Sat Jun  
3 14:27:57 2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
@@ -11,7 +11,7 @@
 Jason van Zyl
 Brian Fox" />
 
-
+
 
 Maven  Release Notes - Maven 2.1.0
 
@@ -43,7 +43,7 @@ Brian Fox" />
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Release Notes - Maven 2.1.0
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: websites/staging/maven/trunk/content/docs/2.2.0/release-notes.html
==
--- websites/staging/maven/trunk/content/docs/2.2.0/release-notes.html 
(original)
+++ websites/staging/maven/trunk/content/docs/2.2.0/release-notes.html Sat Jun  
3 14:27:57 2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
@@ -12,7 +12,7 @@ Jason van Zyl
 Brian Fox
 John Casey" />
 
-
+
 
 Maven  Release Notes - Maven 2.2.0
 
@@ -44,7 +44,7 @@ John Casey" />
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Release Notes - Maven 2.2.0
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: websites/staging/maven/trunk/content/docs/2.2.1/release-notes.html
==
--- websites/staging/maven/trunk/content/docs/2.2.1/release-notes.html 
(original)
+++ websites/staging/maven/trunk/content/docs/2.2.1/release-notes.html Sat Jun  
3 14:27:57 2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">

svn commit: r1013414 [3/4] - in /websites/staging/maven/trunk/content: ./ apache-resource-bundles/ archetypes/ archives/maven-2.x/ background/ developers/ developers/conventions/ developers/release/ d

2017-06-03 Thread buildbot
Modified: 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-archetypes.html
==
--- 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-archetypes.html
 (original)
+++ 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-archetypes.html
 Sat Jun  3 14:27:57 2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
@@ -9,7 +9,7 @@
 
 
 
-
+
 
 Maven  Introduction to Archetypes
 
@@ -41,7 +41,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Introduction to Archetypes
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-dependency-mechanism.html
==
--- 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-dependency-mechanism.html
 (original)
+++ 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-dependency-mechanism.html
 Sat Jun  3 14:27:57 2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
@@ -11,7 +11,7 @@
 Trygve Laugstol
 Karl Heinz Marbaise" />
 
-
+
 
 Maven  Introduction to the Dependency Mechanism
 
@@ -43,7 +43,7 @@ Karl Heinz Marbaise" />
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Introduction to the Dependency Mechanism
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
==
--- 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
 (original)
+++ 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
 Sat Jun  3 14:27:57 2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
@@ -9,7 +9,7 @@
 
 
 
-
+
 
 Maven  Optional Dependencies and Dependency 
Exclusions
 
@@ -41,7 +41,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Optional Dependencies and Dependency Exclusions
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-plugin-prefix-mapping.html
==
--- 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-plugin-prefix-mapping.html
 (original)
+++ 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-plugin-prefix-mapping.html
 Sat Jun  3 14:27:57 2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
@@ -9,7 +9,7 @@
 
 
 
-
+
 
 Maven  Introduction to Plugin Prefix Resolution
 
@@ -41,7 +41,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Introduction to Plugin Prefix Resolution
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-plugins.html
==
--- 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-plugins.html
 (original)
+++ 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-plugins.html
 Sat Jun  3 14:27:57 2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
@@ -9,7 +9,7 @@
 
 
 
-
+
 
 Maven  Introduction to Maven 2.0 Plugin Development
 
@@ -41,7 +41,7 @@
 https://www.apache.org/; class="externalLink" 
title="Apache">Apache/
   Maven/
 Introduction to Maven 2.0 Plugin Development
-Last Published: 2017-05-28
+Last Published: 2017-06-03
 
   
   

Modified: 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-profiles.html
==
--- 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-profiles.html
 (original)
+++ 
websites/staging/maven/trunk/content/guides/introduction/introduction-to-profiles.html
 Sat Jun  3 14:27:57 2017
@@ -1,6 +1,6 @@
 
 
 http://www.w3.org/1999/xhtml; xml:lang="en" lang="en">
@@ -9,7 +9,7 @@
 
 
 
-
+
 
 Maven  Introduction to build profiles
 
@@ 

svn commit: r1797509 - /maven/site/trunk/content/apt/repository/central-index.apt

2017-06-03 Thread hboutemy
Author: hboutemy
Date: Sat Jun  3 14:26:35 2017
New Revision: 1797509

URL: http://svn.apache.org/viewvc?rev=1797509=rev
Log:
added a little tutorial to use central index with Luke

Modified:
maven/site/trunk/content/apt/repository/central-index.apt

Modified: maven/site/trunk/content/apt/repository/central-index.apt
URL: 
http://svn.apache.org/viewvc/maven/site/trunk/content/apt/repository/central-index.apt?rev=1797509=1797508=1797509=diff
==
--- maven/site/trunk/content/apt/repository/central-index.apt (original)
+++ maven/site/trunk/content/apt/repository/central-index.apt Sat Jun  3 
14:26:35 2017
@@ -38,4 +38,26 @@ Central Index
   You can use 
{{{/maven-indexer-archives/maven-indexer-LATEST/indexer-core/apidocs/}Maven 
Indexer API}}
   (see 
{{{/maven-indexer-archives/maven-indexer-LATEST/indexer-examples/}examples}}) 
to use
   this index with a dedicated API, or use {{{http://lucene.apache.org/}Apache 
Lucene}} indexes browsers like
-  {{{https://github.com/DmitryKey/luke}Luke}} or 
{{{https://github.com/flaxsearch/marple}Marple}}.
+  {{{https://github.com/DmitryKey/luke}Luke}} or 
{{{https://github.com/flaxsearch/marple}Marple}} after
+  unpacking the index (see 
{{{/maven-indexer-archives/maven-indexer-LATEST/indexer-cli/}<<<-u>>> CLI 
option}}).
+
+* Digging Into Central Index with Luke
+
+  * download {{{https://repo.maven.apache.org/maven2/.index/}the Central 
index: <<>>}}
+  
+  * download 
{{{https://repo.maven.apache.org/maven2/org/apache/maven/indexer/indexer-cli/5.1.1/indexer-cli-5.1.1.jar}Maven
 Indexer CLI}}
+and unpack the index to raw Lucene index directory:
+
+++
+java -jar indexer-cli-5.1.1.jar -u nexus-maven-repository-index.gz -d 
central-lucene-index
+++
+
+  * download and extract 
{{{https://github.com/DmitryKey/luke/releases/download/luke-4.10.4/luke-with-deps.tar.gz}Luke
 binary tarball}}
+and launch it on the Central index with Lucene format:
+
+++
+luke.sh -ro -index central-lucene-index
+++
+
+You need an old Luke version using an old Lucene version, since Maven 
Indexer 5.5.1 uses Lucene 3.6.2:
+for this tutorial, we chose Luke version 4.10.4, but you may choose 
another version.




maven-surefire git commit: [SUREFIRE-1380] AbstractCommandStream should flush data if another Thread marks the stream closed, empty shared buffer.

2017-06-03 Thread tibordigana
Repository: maven-surefire
Updated Branches:
  refs/heads/SUREFIRE-1380_2 [created] f1f3b6fab


[SUREFIRE-1380] AbstractCommandStream should flush data if another Thread marks 
the stream closed, empty shared buffer.


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

Branch: refs/heads/SUREFIRE-1380_2
Commit: f1f3b6fab9e6179a9faa7537be49354fa58e7685
Parents: 59c065f
Author: Tibor17 
Authored: Sat Jun 3 13:40:12 2017 +0200
Committer: Tibor17 
Committed: Sat Jun 3 13:40:12 2017 +0200

--
 .../booterclient/lazytestprovider/AbstractCommandStream.java| 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/f1f3b6fa/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandStream.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandStream.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandStream.java
index 0bc2036..075d92e 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandStream.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandStream.java
@@ -90,6 +90,7 @@ public abstract class AbstractCommandStream
 {
 if ( isClosed() )
 {
+tryFlush();
 return -1;
 }
 



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-1380] Command stream should flush data anyway and refactoring

2017-06-03 Thread tibordigana
Repository: maven-surefire
Updated Branches:
  refs/heads/SUREFIRE-1380 [created] a9ea44b8e


[SUREFIRE-1380] Command stream should flush data anyway and refactoring


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

Branch: refs/heads/SUREFIRE-1380
Commit: a9ea44b8e139bd59d613d470759da75ed4f47463
Parents: fac376c
Author: Tibor17 
Authored: Sat Jun 3 10:54:33 2017 +0200
Committer: Tibor17 
Committed: Sat Jun 3 10:54:33 2017 +0200

--
 .../lazytestprovider/AbstractCommandStream.java | 22 +++-
 .../surefire/booter/MasterProcessCommand.java   |  9 +---
 2 files changed, 13 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/a9ea44b8/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandStream.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandStream.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandStream.java
index 0bc2036..31b56c4 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandStream.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/lazytestprovider/AbstractCommandStream.java
@@ -36,7 +36,6 @@ public abstract class AbstractCommandStream
 {
 private byte[] currentBuffer;
 private int currentPos;
-private volatile MasterProcessCommand lastCommand;
 
 protected abstract boolean isClosed();
 
@@ -71,12 +70,6 @@ public abstract class AbstractCommandStream
 currentPos = 0;
 }
 
-@Deprecated
-protected final MasterProcessCommand getLastCommand()
-{
-return lastCommand;
-}
-
 /**
  * Used by single thread in StreamFeeder class.
  *
@@ -90,11 +83,11 @@ public abstract class AbstractCommandStream
 {
 if ( isClosed() )
 {
+tryFlush();
 return -1;
 }
 
-byte[] buffer = currentBuffer;
-if ( buffer == null )
+if ( currentBuffer == null )
 {
 tryFlush();
 
@@ -112,17 +105,16 @@ public abstract class AbstractCommandStream
 }
 
 Command cmd = nextCommand();
-lastCommand = cmd.getCommandType();
-buffer = lastCommand.hasDataType() ? lastCommand.encode( 
cmd.getData() ) : lastCommand.encode();
+MasterProcessCommand cmdType = cmd.getCommandType();
+currentBuffer = cmdType.hasDataType() ? cmdType.encode( 
cmd.getData() ) : cmdType.encode();
 }
 
-int b =  buffer[currentPos++] & 0xff;
-if ( currentPos == buffer.length )
+int b =  currentBuffer[currentPos++] & 0xff;
+if ( currentPos == currentBuffer.length )
 {
-buffer = null;
+currentBuffer = null;
 currentPos = 0;
 }
-currentBuffer = buffer;
 return b;
 }
 }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/a9ea44b8/surefire-api/src/main/java/org/apache/maven/surefire/booter/MasterProcessCommand.java
--
diff --git 
a/surefire-api/src/main/java/org/apache/maven/surefire/booter/MasterProcessCommand.java
 
b/surefire-api/src/main/java/org/apache/maven/surefire/booter/MasterProcessCommand.java
index c82c798..a1c431a 100644
--- 
a/surefire-api/src/main/java/org/apache/maven/surefire/booter/MasterProcessCommand.java
+++ 
b/surefire-api/src/main/java/org/apache/maven/surefire/booter/MasterProcessCommand.java
@@ -85,11 +85,14 @@ public enum MasterProcessCommand
 }
 
 byte[] dataBytes = fromDataType( data );
-byte[] encoded = new byte[8 + dataBytes.length];
-int command = getId();
 int len = dataBytes.length;
+
+byte[] encoded = new byte[8 + len];
+
+int command = getId();
 setCommandAndDataLength( command, len, encoded );
-System.arraycopy( dataBytes, 0, encoded, 8, dataBytes.length );
+System.arraycopy( dataBytes, 0, encoded, 8, len );
+
 return encoded;
 }
 



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