maven git commit: [MNG-6216] ArrayIndexOutOfBoundsException when parsing POM o Upgraded to new release of plexus-utils which contains the fix for #22 in plexus-utils.

2017-08-03 Thread khmarbaise
Repository: maven
Updated Branches:
  refs/heads/MNG-6216 [created] 9bd69aa8f


[MNG-6216] ArrayIndexOutOfBoundsException when parsing POM
 o Upgraded to new release of plexus-utils which contains
   the fix for #22 in plexus-utils.


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

Branch: refs/heads/MNG-6216
Commit: 9bd69aa8f9b41d3f5dae2b44698a269a8882d49f
Parents: 4f2a2db
Author: Karl Heinz Marbaise 
Authored: Thu Aug 3 20:12:25 2017 +0200
Committer: Karl Heinz Marbaise 
Committed: Thu Aug 3 20:12:25 2017 +0200

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/maven/blob/9bd69aa8/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 78c375f..1439a46 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,7 +56,7 @@ under the License.
 1.10.19
 1.7.1
 1.24
-3.0.24
+3.1.0
 20.0
 4.0
 0.3.3



[10/17] maven-surefire git commit: Remove engine declaration - this should be done automatically by surefire

2017-08-03 Thread tibordigana
Remove engine declaration - this should be done automatically by surefire


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

Branch: refs/heads/junit5
Commit: acef2c3207da233c03bef600bf7467c92e8ee897
Parents: 4b8c1a4
Author: Benedikt Ritter 
Authored: Mon Feb 6 19:17:36 2017 +0100
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:35 2017 +0200

--
 surefire-providers/surefire-junit5/pom.xml | 12 
 1 file changed, 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/acef2c32/surefire-providers/surefire-junit5/pom.xml
--
diff --git a/surefire-providers/surefire-junit5/pom.xml 
b/surefire-providers/surefire-junit5/pom.xml
index cf25aa2..ec318d5 100644
--- a/surefire-providers/surefire-junit5/pom.xml
+++ b/surefire-providers/surefire-junit5/pom.xml
@@ -116,18 +116,6 @@
 
   ${java.home}/bin/java
 
-
-  
-org.junit.platform
-junit-platform-surefire-provider
-${junit-platform.version}
-  
-  
-org.junit.jupiter
-junit-jupiter-engine
-${junit-jupiter.version}
-  
-
   
   
 org.apache.maven.plugins



[06/17] maven-surefire git commit: Add surefire-junit5 provider as module to the surefire build

2017-08-03 Thread tibordigana
Add surefire-junit5 provider as module to the surefire build


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

Branch: refs/heads/junit5
Commit: e842f9b361845176a6e883d7bf12838f94e89872
Parents: c4e77a8
Author: Benedikt Ritter 
Authored: Mon Feb 6 18:55:49 2017 +0100
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:34 2017 +0200

--
 surefire-providers/pom.xml  |   1 +
 surefire-providers/surefire-junit5/pom.xml  | 166 +++
 .../surefire/provider/RunListenerAdapter.java   |   4 +-
 .../provider/SurefireProviderTestSuite.java |  49 --
 4 files changed, 169 insertions(+), 51 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/e842f9b3/surefire-providers/pom.xml
--
diff --git a/surefire-providers/pom.xml b/surefire-providers/pom.xml
index 1501554..8c69725 100644
--- a/surefire-providers/pom.xml
+++ b/surefire-providers/pom.xml
@@ -41,6 +41,7 @@
 surefire-junit3
 surefire-junit4
 surefire-junit47
+surefire-junit5
 surefire-testng-utils
 surefire-testng
   

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/e842f9b3/surefire-providers/surefire-junit5/pom.xml
--
diff --git a/surefire-providers/surefire-junit5/pom.xml 
b/surefire-providers/surefire-junit5/pom.xml
new file mode 100644
index 000..55099f5
--- /dev/null
+++ b/surefire-providers/surefire-junit5/pom.xml
@@ -0,0 +1,166 @@
+
+
+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/xsd/maven-4.0.0.xsd;>
+  4.0.0
+
+  
+org.apache.maven.surefire
+surefire-providers
+2.19.2-SNAPSHOT
+  
+
+  surefire-junit5
+
+  SureFire JUnit5 Runner
+  SureFire JUnit 5.0+ Runner
+
+  
+8
+1.0.0-M3
+5.0.0-M3
+  
+
+  
+
+  org.junit.platform
+  junit-platform-launcher
+  ${junit-platform.version}
+
+
+
+  org.junit.platform
+  junit-platform-engine
+  ${junit-platform.version}
+
+
+  org.apache.maven.surefire
+  common-java5
+  ${project.version}
+
+
+
+  org.junit.jupiter
+  junit-jupiter-api
+  ${junit-jupiter.version}
+  test
+
+
+  org.junit.jupiter
+  junit-jupiter-engine
+  ${junit-jupiter.version}
+  test
+
+
+  org.mockito
+  mockito-core
+  2.2.22
+  test
+
+
+  org.assertj
+  assertj-core
+  3.6.0
+  test
+
+  
+
+  
+
+  
+src/main/resources/META-INF
+META-INF
+  
+
+
+
+  
+  
+org.codehaus.mojo
+animal-sniffer-maven-plugin
+1.14
+
+  
+signature-check
+
+  check
+
+  
+
+
+  
+org.codehaus.mojo.signature
+java18
+1.0
+  
+
+  
+  
+org.apache.maven.plugins
+maven-surefire-plugin
+
+  ${java.home}/bin/java
+
+
+  
+org.junit.platform
+junit-platform-surefire-provider
+${junit-platform.version}
+  
+  
+org.junit.jupiter
+junit-jupiter-engine
+${junit-jupiter.version}
+  
+
+  
+  
+org.apache.maven.plugins
+maven-shade-plugin
+1.4
+
+  
+package
+
+  shade
+
+
+  true
+  
+
+  org.apache.maven.surefire:common-junit3
+  org.apache.maven.surefire:common-junit4
+  org.apache.maven.surefire:common-java5
+  org.apache.maven.shared:maven-shared-utils
+
+  
+  
+
+  org.apache.maven.shared
+  
org.apache.maven.surefire.shade.org.apache.maven.shared
+
+  
+
+  
+
+  
+
+  
+

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/e842f9b3/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/RunListenerAdapter.java
--
diff --git 

[13/17] maven-surefire git commit: Make Checkstyle happy

2017-08-03 Thread tibordigana
Make Checkstyle happy


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

Branch: refs/heads/junit5
Commit: 04b482ca6403696e9d118a3f05bd086dc82691ad
Parents: acef2c3
Author: Benedikt Ritter 
Authored: Mon Feb 6 19:54:40 2017 +0100
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:35 2017 +0200

--
 .../org/apache/maven/surefire/junit5/RunListenerAdapter.java   | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/04b482ca/surefire-providers/surefire-junit5/src/main/java/org/apache/maven/surefire/junit5/RunListenerAdapter.java
--
diff --git 
a/surefire-providers/surefire-junit5/src/main/java/org/apache/maven/surefire/junit5/RunListenerAdapter.java
 
b/surefire-providers/surefire-junit5/src/main/java/org/apache/maven/surefire/junit5/RunListenerAdapter.java
index 8e1a2e2..4bba78a 100644
--- 
a/surefire-providers/surefire-junit5/src/main/java/org/apache/maven/surefire/junit5/RunListenerAdapter.java
+++ 
b/surefire-providers/surefire-junit5/src/main/java/org/apache/maven/surefire/junit5/RunListenerAdapter.java
@@ -106,11 +106,13 @@ final class RunListenerAdapter
 {
 StackTraceWriter traceWriter = new PojoStackTraceWriter( 
className.get(),
 getMethodName( testIdentifier ).orElse( "" ), 
throwable.orElse( null ) );
-return new SimpleReportEntry( className.get(), 
testIdentifier.getDisplayName(), traceWriter, (Integer) null );
+return new SimpleReportEntry( className.get(), 
testIdentifier.getDisplayName(), traceWriter,
+(Integer) null );
 }
 else
 {
-return new SimpleReportEntry( parentDisplayName( testIdentifier ), 
testIdentifier.getDisplayName(), (Integer) null );
+return new SimpleReportEntry( parentDisplayName( testIdentifier ), 
testIdentifier.getDisplayName(),
+(Integer) null );
 }
 }
 



[15/17] maven-surefire git commit: Rename JUnit5 provider to JUnit Platform provider, as suggested by @marcphilipp

2017-08-03 Thread tibordigana
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/841d67f9/surefire-providers/surefire-junit5/src/test/java/org/apache/maven/surefire/junit5/RunListenerAdapterTests.java
--
diff --git 
a/surefire-providers/surefire-junit5/src/test/java/org/apache/maven/surefire/junit5/RunListenerAdapterTests.java
 
b/surefire-providers/surefire-junit5/src/test/java/org/apache/maven/surefire/junit5/RunListenerAdapterTests.java
deleted file mode 100644
index 5518b29..000
--- 
a/surefire-providers/surefire-junit5/src/test/java/org/apache/maven/surefire/junit5/RunListenerAdapterTests.java
+++ /dev/null
@@ -1,262 +0,0 @@
-package org.apache.maven.surefire.junit5;
-
-/*
- * 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.
- */
-
-import static java.util.Collections.singletonList;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.util.Optional;
-
-import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.RunListener;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.engine.descriptor.ClassTestDescriptor;
-import org.junit.jupiter.engine.descriptor.MethodTestDescriptor;
-import org.junit.platform.engine.TestDescriptor;
-import org.junit.platform.engine.TestExecutionResult;
-import org.junit.platform.engine.UniqueId;
-import org.junit.platform.engine.support.descriptor.EngineDescriptor;
-import org.junit.platform.launcher.TestIdentifier;
-import org.junit.platform.launcher.TestPlan;
-import org.mockito.ArgumentCaptor;
-
-/**
- * Unit tests for {@link RunListenerAdapter}.
- *
- * @since 1.0
- */
-class RunListenerAdapterTests
-{
-
-private RunListener listener;
-
-private RunListenerAdapter adapter;
-
-@BeforeEach
-public void setUp()
-{
-listener = mock( RunListener.class );
-adapter = new RunListenerAdapter( listener );
-}
-
-@Test
-void notifiedWithCorrectNamesWhenMethodExecutionStarted()
-throws Exception
-{
-ArgumentCaptor entryCaptor = ArgumentCaptor.forClass( 
ReportEntry.class );
-
-adapter.executionStarted( newMethodIdentifier() );
-verify( listener ).testStarting( entryCaptor.capture() );
-
-ReportEntry entry = entryCaptor.getValue();
-assertEquals( MY_TEST_METHOD_NAME + "()", entry.getName() );
-assertEquals( MyTestClass.class.getName(), entry.getSourceName() );
-assertNotNull( entry.getStackTraceWriter() );
-}
-
-@Test
-void notNotifiedWhenClassExecutionStarted()
-throws Exception
-{
-adapter.executionStarted( newClassIdentifier() );
-verify( listener, never() ).testStarting( any() );
-}
-
-@Test
-void notNotifiedWhenEngineExecutionStarted()
-throws Exception
-{
-adapter.executionStarted( newEngineIdentifier() );
-verify( listener, never() ).testStarting( any() );
-}
-
-@Test
-void notifiedWhenMethodExecutionSkipped()
-throws Exception
-{
-adapter.executionSkipped( newMethodIdentifier(), "test" );
-verify( listener ).testSkipped( any() );
-}
-
-@Test
-void notifiedWithCorrectNamesWhenClassExecutionSkipped()
-throws Exception
-{
-ArgumentCaptor entryCaptor = ArgumentCaptor.forClass( 
ReportEntry.class );
-
-adapter.executionSkipped( newClassIdentifier(), "test" );
-verify( listener ).testSkipped( entryCaptor.capture() );
-
-ReportEntry entry = entryCaptor.getValue();
-assertTrue( MyTestClass.class.getTypeName().contains( entry.getName() 
) );
-assertEquals( MyTestClass.class.getName(), entry.getSourceName() );
-}
-
-@Test
-void notifiedWhenEngineExecutionSkipped()
-throws Exception
-{
-

[17/17] maven-surefire git commit: SUREFIRE-1330: Fix module name in surefire-providers reactor

2017-08-03 Thread tibordigana
SUREFIRE-1330: Fix module name in surefire-providers reactor


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

Branch: refs/heads/junit5
Commit: 9580f5ef25c0d4736046165275f2d57d31686ae9
Parents: da384e9
Author: Maxime Gréau 
Authored: Tue Apr 11 15:32:10 2017 +0200
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:36 2017 +0200

--
 surefire-providers/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9580f5ef/surefire-providers/pom.xml
--
diff --git a/surefire-providers/pom.xml b/surefire-providers/pom.xml
index 8c69725..712d8e9 100644
--- a/surefire-providers/pom.xml
+++ b/surefire-providers/pom.xml
@@ -41,7 +41,7 @@
 surefire-junit3
 surefire-junit4
 surefire-junit47
-surefire-junit5
+surefire-junit-platform
 surefire-testng-utils
 surefire-testng
   



[14/17] maven-surefire git commit: Add contributors of the original provider implementation to pom.xml

2017-08-03 Thread tibordigana
Add contributors of the original provider implementation to pom.xml

Thank you for your contributions to open source:
- @lutovich
- @hotchemi
- @sbrannen
- @bechte
- @marcphilipp
- @mmerdes
- @jlink


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

Branch: refs/heads/junit5
Commit: da384e987c73ebbe4767f19427c021bced5f1c0e
Parents: 841d67f
Author: Benedikt Ritter 
Authored: Fri Feb 10 21:00:14 2017 +0100
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:36 2017 +0200

--
 .../surefire-junit-platform/pom.xml | 45 
 1 file changed, 45 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/da384e98/surefire-providers/surefire-junit-platform/pom.xml
--
diff --git a/surefire-providers/surefire-junit-platform/pom.xml 
b/surefire-providers/surefire-junit-platform/pom.xml
index 9e5cedd..a4287bf 100644
--- a/surefire-providers/surefire-junit-platform/pom.xml
+++ b/surefire-providers/surefire-junit-platform/pom.xml
@@ -139,4 +139,49 @@
   
 
   
+
+  
+
+  Konstantin Lutovich
+  
+Contributed to the original provider implementation
+  
+
+
+  Shintaro Katafuchi
+  
+Contributed to the original provider implementation
+  
+
+
+  Sam Brannen
+  
+Contributed to the original provider implementation
+  
+
+
+  Stefan Bechtold
+  
+Contributed to the original provider implementation
+  
+
+
+  Marc Philipp
+  
+Contributed to the original provider implementation
+  
+
+
+  Matthias Merdes
+  
+Contributed to the original provider implementation
+  
+
+
+  Johannes Link
+  
+Contributed to the original provider implementation
+  
+
+  
 



[12/17] maven-surefire git commit: Configure shade plugin so that is does not explode

2017-08-03 Thread tibordigana
Configure shade plugin so that is does not explode


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

Branch: refs/heads/junit5
Commit: 6a9f36e6a403f376b8088f8e7f4345e2c190b3ec
Parents: 04b482c
Author: Benedikt Ritter 
Authored: Mon Feb 6 19:54:59 2017 +0100
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:35 2017 +0200

--
 surefire-providers/surefire-junit5/pom.xml | 10 --
 1 file changed, 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/6a9f36e6/surefire-providers/surefire-junit5/pom.xml
--
diff --git a/surefire-providers/surefire-junit5/pom.xml 
b/surefire-providers/surefire-junit5/pom.xml
index ec318d5..54d5fcf 100644
--- a/surefire-providers/surefire-junit5/pom.xml
+++ b/surefire-providers/surefire-junit5/pom.xml
@@ -128,21 +128,11 @@
   shade
 
 
-  true
   
 
-  org.apache.maven.surefire:common-junit3
-  org.apache.maven.surefire:common-junit4
   org.apache.maven.surefire:common-java5
-  org.apache.maven.shared:maven-shared-utils
 
   
-  
-
-  org.apache.maven.shared
-  
org.apache.maven.surefire.shade.org.apache.maven.shared
-
-  
 
   
 



[09/17] maven-surefire git commit: Move provider classes to maven surefire package

2017-08-03 Thread tibordigana
Move provider classes to maven surefire package


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

Branch: refs/heads/junit5
Commit: 4b8c1a47ab348e16f3f9ec0938d8312cb7546f4c
Parents: 78229d5
Author: Benedikt Ritter 
Authored: Mon Feb 6 19:14:53 2017 +0100
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:35 2017 +0200

--
 .../surefire/junit5/JUnitPlatformProvider.java  | 202 
 .../surefire/junit5/RunListenerAdapter.java | 148 +
 .../surefire/junit5/TestPlanScannerFilter.java  |  64 
 .../provider/JUnitPlatformProvider.java | 202 
 .../surefire/provider/RunListenerAdapter.java   | 148 -
 .../provider/TestPlanScannerFilter.java |  64 
 maven.surefire.providerapi.SurefireProvider |   2 +-
 .../junit5/JUnitPlatformProviderTests.java  | 325 +++
 .../junit5/RunListenerAdapterTests.java | 262 +++
 .../junit5/TestPlanScannerFilterTests.java  | 190 +++
 .../provider/JUnitPlatformProviderTests.java| 325 ---
 .../provider/RunListenerAdapterTests.java   | 263 ---
 .../provider/TestPlanScannerFilterTests.java| 190 ---
 13 files changed, 1192 insertions(+), 1193 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4b8c1a47/surefire-providers/surefire-junit5/src/main/java/org/apache/maven/surefire/junit5/JUnitPlatformProvider.java
--
diff --git 
a/surefire-providers/surefire-junit5/src/main/java/org/apache/maven/surefire/junit5/JUnitPlatformProvider.java
 
b/surefire-providers/surefire-junit5/src/main/java/org/apache/maven/surefire/junit5/JUnitPlatformProvider.java
new file mode 100644
index 000..ee93165
--- /dev/null
+++ 
b/surefire-providers/surefire-junit5/src/main/java/org/apache/maven/surefire/junit5/JUnitPlatformProvider.java
@@ -0,0 +1,202 @@
+package org.apache.maven.surefire.junit5;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.surefire.providerapi.AbstractProvider;
+import org.apache.maven.surefire.providerapi.ProviderParameters;
+import org.apache.maven.surefire.report.ReporterException;
+import org.apache.maven.surefire.report.ReporterFactory;
+import org.apache.maven.surefire.report.RunListener;
+import org.apache.maven.surefire.report.SimpleReportEntry;
+import org.apache.maven.surefire.suite.RunResult;
+import org.apache.maven.surefire.testset.TestSetFailedException;
+import org.apache.maven.surefire.util.TestsToRun;
+import org.junit.platform.engine.Filter;
+import org.junit.platform.launcher.Launcher;
+import org.junit.platform.launcher.LauncherDiscoveryRequest;
+import org.junit.platform.launcher.TagFilter;
+import org.junit.platform.launcher.core.LauncherFactory;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Optional;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import static 
org.junit.platform.engine.discovery.DiscoverySelectors.selectClass;
+import static 
org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder.request;
+
+/**
+ * @since 1.0
+ */
+public class JUnitPlatformProvider
+extends AbstractProvider
+{
+
+// Parameter names processed to determine which @Tags should be executed.
+static final String EXCLUDE_GROUPS = "excludedGroups";
+
+static final String EXCLUDE_TAGS = "excludeTags";
+
+static final String INCLUDE_GROUPS = "groups";
+
+static final String INCLUDE_TAGS = "includeTags";
+
+static final String EXCEPTION_MESSAGE_BOTH_NOT_ALLOWED = "The " + 
INCLUDE_GROUPS + " and " + INCLUDE_TAGS
++ " parameters (or the " + EXCLUDE_GROUPS 

[16/17] maven-surefire git commit: Rename JUnit5 provider to JUnit Platform provider, as suggested by @marcphilipp

2017-08-03 Thread tibordigana
Rename JUnit5 provider to JUnit Platform provider, as suggested by @marcphilipp


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

Branch: refs/heads/junit5
Commit: 841d67f9f0bbb8291d5d20120f6b91f58c634e95
Parents: 6a9f36e
Author: Benedikt Ritter 
Authored: Fri Feb 10 19:59:23 2017 +0100
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:36 2017 +0200

--
 .../surefire-junit-platform/pom.xml | 142 
 .../junitplatform/JUnitPlatformProvider.java| 202 
 .../junitplatform/RunListenerAdapter.java   | 150 +
 .../junitplatform/TestPlanScannerFilter.java|  64 
 maven.surefire.providerapi.SurefireProvider |   1 +
 .../JUnitPlatformProviderTests.java | 325 +++
 .../junitplatform/RunListenerAdapterTests.java  | 262 +++
 .../TestPlanScannerFilterTests.java | 190 +++
 surefire-providers/surefire-junit5/pom.xml  | 142 
 .../surefire/junit5/JUnitPlatformProvider.java  | 202 
 .../surefire/junit5/RunListenerAdapter.java | 150 -
 .../surefire/junit5/TestPlanScannerFilter.java  |  64 
 maven.surefire.providerapi.SurefireProvider |   1 -
 .../junit5/JUnitPlatformProviderTests.java  | 325 ---
 .../junit5/RunListenerAdapterTests.java | 262 ---
 .../junit5/TestPlanScannerFilterTests.java  | 190 ---
 16 files changed, 1336 insertions(+), 1336 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/841d67f9/surefire-providers/surefire-junit-platform/pom.xml
--
diff --git a/surefire-providers/surefire-junit-platform/pom.xml 
b/surefire-providers/surefire-junit-platform/pom.xml
new file mode 100644
index 000..9e5cedd
--- /dev/null
+++ b/surefire-providers/surefire-junit-platform/pom.xml
@@ -0,0 +1,142 @@
+
+
+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/xsd/maven-4.0.0.xsd;>
+  4.0.0
+
+  
+org.apache.maven.surefire
+surefire-providers
+2.19.2-SNAPSHOT
+  
+
+  surefire-junit-platform
+
+  SureFire JUnit Platform Runner
+  SureFire JUnit Platform Runner
+
+  
+8
+1.0.0-M3
+5.0.0-M3
+  
+
+  
+
+  org.junit.platform
+  junit-platform-launcher
+  ${junit-platform.version}
+
+
+  org.junit.platform
+  junit-platform-engine
+  ${junit-platform.version}
+
+
+  org.apache.maven.surefire
+  common-java5
+  ${project.version}
+
+
+
+  org.junit.jupiter
+  junit-jupiter-api
+  ${junit-jupiter.version}
+  test
+
+
+  org.junit.jupiter
+  junit-jupiter-engine
+  ${junit-jupiter.version}
+  test
+
+
+  org.mockito
+  mockito-core
+  2.2.22
+  test
+
+
+  org.assertj
+  assertj-core
+  3.6.0
+  test
+
+  
+
+  
+
+  
+src/main/resources/META-INF
+META-INF
+  
+
+
+
+  
+  
+org.codehaus.mojo
+animal-sniffer-maven-plugin
+1.14
+
+  
+signature-check
+
+  check
+
+  
+
+
+  
+org.codehaus.mojo.signature
+java18
+1.0
+  
+
+  
+  
+org.apache.maven.plugins
+maven-surefire-plugin
+
+  ${java.home}/bin/java
+
+  
+  
+org.apache.maven.plugins
+maven-shade-plugin
+1.4
+
+  
+package
+
+  shade
+
+
+  
+
+  org.apache.maven.surefire:common-java5
+
+  
+
+  
+
+  
+
+  
+

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/841d67f9/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java
--
diff --git 
a/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java
 
b/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java
new file mode 100644
index 000..7f58921
--- /dev/null
+++ 

[03/17] maven-surefire git commit: Remove LICENSE file, ALv2 will be part of the source distribution

2017-08-03 Thread tibordigana
Remove LICENSE file, ALv2 will be part of the source distribution


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

Branch: refs/heads/junit5
Commit: 91e6d96593af11bcd7d80183caa6c9ef838fd8bc
Parents: 4bf43aa
Author: Benedikt Ritter 
Authored: Mon Feb 6 14:20:54 2017 +0100
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:33 2017 +0200

--
 surefire-providers/surefire-junit5/LICENSE.md | 194 -
 1 file changed, 194 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/91e6d965/surefire-providers/surefire-junit5/LICENSE.md
--
diff --git a/surefire-providers/surefire-junit5/LICENSE.md 
b/surefire-providers/surefire-junit5/LICENSE.md
deleted file mode 100644
index b62a9b5..000
--- a/surefire-providers/surefire-junit5/LICENSE.md
+++ /dev/null
@@ -1,194 +0,0 @@
-Apache License
-==
-
-_Version 2.0, January 2004_
-__
-
-### Terms and Conditions for use, reproduction, and distribution
-
- 1. Definitions
-
-“License” shall mean the terms and conditions for use, reproduction, and
-distribution as defined by Sections 1 through 9 of this document.
-
-“Licensor” shall mean the copyright owner or entity authorized by the 
copyright
-owner that is granting the License.
-
-“Legal Entity” shall mean the union of the acting entity and all other 
entities
-that control, are controlled by, or are under common control with that entity.
-For the purposes of this definition, “control” means **(i)** the power, 
direct or
-indirect, to cause the direction or management of such entity, whether by
-contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of 
the
-outstanding shares, or **(iii)** beneficial ownership of such entity.
-
-“You” (or “Your”) shall mean an individual or Legal Entity exercising
-permissions granted by this License.
-
-“Source” form shall mean the preferred form for making modifications, 
including
-but not limited to software source code, documentation source, and 
configuration
-files.
-
-“Object” form shall mean any form resulting from mechanical transformation 
or
-translation of a Source form, including but not limited to compiled object 
code,
-generated documentation, and conversions to other media types.
-
-“Work” shall mean the work of authorship, whether in Source or Object 
form, made
-available under the License, as indicated by a copyright notice that is 
included
-in or attached to the work (an example is provided in the Appendix below).
-
-“Derivative Works” shall mean any work, whether in Source or Object form, 
that
-is based on (or derived from) the Work and for which the editorial revisions,
-annotations, elaborations, or other modifications represent, as a whole, an
-original work of authorship. For the purposes of this License, Derivative Works
-shall not include works that remain separable from, or merely link (or bind by
-name) to the interfaces of, the Work and Derivative Works thereof.
-
-“Contribution” shall mean any work of authorship, including the original 
version
-of the Work and any modifications or additions to that Work or Derivative Works
-thereof, that is intentionally submitted to Licensor for inclusion in the Work
-by the copyright owner or by an individual or Legal Entity authorized to submit
-on behalf of the copyright owner. For the purposes of this definition,
-“submitted” means any form of electronic, verbal, or written communication 
sent
-to the Licensor or its representatives, including but not limited to
-communication on electronic mailing lists, source code control systems, and
-issue tracking systems that are managed by, or on behalf of, the Licensor for
-the purpose of discussing and improving the Work, but excluding communication
-that is conspicuously marked or otherwise designated in writing by the 
copyright
-owner as “Not a Contribution.”
-
-“Contributor” shall mean Licensor and any individual or Legal Entity on 
behalf
-of whom a Contribution has been received by Licensor and subsequently
-incorporated within the Work.
-
- 2. Grant of Copyright License
-
-Subject to the terms and conditions of this License, each Contributor hereby
-grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
-irrevocable copyright license to reproduce, prepare Derivative Works of,
-publicly display, publicly perform, sublicense, and distribute the Work and 
such
-Derivative Works in Source or 

[04/17] maven-surefire git commit: Remove unused filed

2017-08-03 Thread tibordigana
Remove unused filed


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

Branch: refs/heads/junit5
Commit: 61dbc6c79c5fea357bda999d1cbeb647bca5494b
Parents: e842f9b
Author: Benedikt Ritter 
Authored: Mon Feb 6 18:56:20 2017 +0100
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:34 2017 +0200

--
 .../src/test/resources/log4j2-test.xml  | 33 
 1 file changed, 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/61dbc6c7/surefire-providers/surefire-junit5/src/test/resources/log4j2-test.xml
--
diff --git 
a/surefire-providers/surefire-junit5/src/test/resources/log4j2-test.xml 
b/surefire-providers/surefire-junit5/src/test/resources/log4j2-test.xml
deleted file mode 100644
index 7747265..000
--- a/surefire-providers/surefire-junit5/src/test/resources/log4j2-test.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-



[07/17] maven-surefire git commit: Adopt Apache Maven code style

2017-08-03 Thread tibordigana
Adopt Apache Maven code style


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

Branch: refs/heads/junit5
Commit: c4e77a85f498cd4fc3e3fb5a79e1a717201dd02e
Parents: 9ac9198
Author: Benedikt Ritter 
Authored: Mon Feb 6 15:20:30 2017 +0100
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:34 2017 +0200

--
 .../provider/JUnitPlatformProvider.java | 129 ++
 .../surefire/provider/RunListenerAdapter.java   | 109 
 .../provider/TestPlanScannerFilter.java |  27 +-
 .../surefire/provider/package-info.java |  22 --
 .../provider/JUnitPlatformProviderTests.java| 258 +++
 .../provider/RunListenerAdapterTests.java   | 213 ---
 .../provider/SurefireProviderTestSuite.java |  15 +-
 .../provider/TestPlanScannerFilterTests.java| 112 +---
 8 files changed, 512 insertions(+), 373 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/c4e77a85/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
--
diff --git 
a/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
 
b/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
index ff55e0d..066185f 100644
--- 
a/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
+++ 
b/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
@@ -1,3 +1,5 @@
+package org.junit.platform.surefire.provider;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -17,8 +19,6 @@
  * under the License.
  */
 
-package org.junit.platform.surefire.provider;
-
 import static 
org.junit.platform.engine.discovery.DiscoverySelectors.selectClass;
 import static 
org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder.request;
 
@@ -49,12 +49,17 @@ import org.junit.platform.launcher.core.LauncherFactory;
 /**
  * @since 1.0
  */
-public class JUnitPlatformProvider extends AbstractProvider {
+public class JUnitPlatformProvider
+extends AbstractProvider
+{
 
 // Parameter names processed to determine which @Tags should be executed.
 static final String EXCLUDE_GROUPS = "excludedGroups";
+
 static final String EXCLUDE_TAGS = "excludeTags";
+
 static final String INCLUDE_GROUPS = "groups";
+
 static final String INCLUDE_TAGS = "includeTags";
 
 static final String EXCEPTION_MESSAGE_BOTH_NOT_ALLOWED = "The " + 
INCLUDE_GROUPS + " and " + INCLUDE_TAGS
@@ -62,108 +67,130 @@ public class JUnitPlatformProvider extends 
AbstractProvider {
 + "only one of each is allowed (though neither is required).";
 
 private final ProviderParameters parameters;
+
 private final Launcher launcher;
+
 final Filter[] includeAndExcludeFilters;
 
-public JUnitPlatformProvider(ProviderParameters parameters) {
-this(parameters, LauncherFactory.create());
+public JUnitPlatformProvider( ProviderParameters parameters )
+{
+this( parameters, LauncherFactory.create() );
 }
 
-JUnitPlatformProvider(ProviderParameters parameters, Launcher launcher) {
+JUnitPlatformProvider( ProviderParameters parameters, Launcher launcher )
+{
 this.parameters = parameters;
 this.launcher = launcher;
 this.includeAndExcludeFilters = getIncludeAndExcludeFilters();
-Logger.getLogger("org.junit").setLevel(Level.WARNING);
+Logger.getLogger( "org.junit" ).setLevel( Level.WARNING );
 }
 
 @Override
-public Iterable getSuites() {
+public Iterable getSuites()
+{
 return scanClasspath();
 }
 
 @Override
-public RunResult invoke(Object forkTestSet)
-throws TestSetFailedException, ReporterException, 
InvocationTargetException {
-if (forkTestSet instanceof TestsToRun) {
-return invokeAllTests((TestsToRun) forkTestSet);
+public RunResult invoke( Object forkTestSet )
+throws TestSetFailedException, ReporterException, 
InvocationTargetException
+{
+if ( forkTestSet instanceof TestsToRun )
+{
+return invokeAllTests( (TestsToRun) forkTestSet );
 }
-else if (forkTestSet instanceof Class) {
-return 

[02/17] maven-surefire git commit: Convert spaces to tabs

2017-08-03 Thread tibordigana
Convert spaces to tabs


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

Branch: refs/heads/junit5
Commit: 68722a859522efbc9654a7dd6881108c86dafe1d
Parents: 91e6d96
Author: Benedikt Ritter 
Authored: Mon Feb 6 14:23:03 2017 +0100
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:33 2017 +0200

--
 .../provider/JUnitPlatformProvider.java | 236 ++--
 .../surefire/provider/RunListenerAdapter.java   | 164 
 .../provider/TestPlanScannerFilter.java |  38 +-
 .../provider/JUnitPlatformProviderTests.java| 382 +--
 .../provider/RunListenerAdapterTests.java   | 334 
 .../provider/TestPlanScannerFilterTests.java| 228 +--
 .../src/test/resources/log4j2-test.xml  |  26 +-
 7 files changed, 704 insertions(+), 704 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/68722a85/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
--
diff --git 
a/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
 
b/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
index 676d33f..99f0fd5 100644
--- 
a/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
+++ 
b/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
@@ -48,123 +48,123 @@ import org.junit.platform.launcher.core.LauncherFactory;
  */
 public class JUnitPlatformProvider extends AbstractProvider {
 
-   // Parameter names processed to determine which @Tags should be 
executed.
-   static final String EXCLUDE_GROUPS = "excludedGroups";
-   static final String EXCLUDE_TAGS = "excludeTags";
-   static final String INCLUDE_GROUPS = "groups";
-   static final String INCLUDE_TAGS = "includeTags";
-
-   static final String EXCEPTION_MESSAGE_BOTH_NOT_ALLOWED = "The " + 
INCLUDE_GROUPS + " and " + INCLUDE_TAGS
-   + " parameters (or the " + EXCLUDE_GROUPS + " and " + 
EXCLUDE_TAGS + " parameters) are synonyms - "
-   + "only one of each is allowed (though neither is 
required).";
-
-   private final ProviderParameters parameters;
-   private final Launcher launcher;
-   final Filter[] includeAndExcludeFilters;
-
-   public JUnitPlatformProvider(ProviderParameters parameters) {
-   this(parameters, LauncherFactory.create());
-   }
-
-   JUnitPlatformProvider(ProviderParameters parameters, Launcher launcher) 
{
-   this.parameters = parameters;
-   this.launcher = launcher;
-   this.includeAndExcludeFilters = getIncludeAndExcludeFilters();
-   Logger.getLogger("org.junit").setLevel(Level.WARNING);
-   }
-
-   @Override
-   public Iterable getSuites() {
-   return scanClasspath();
-   }
-
-   @Override
-   public RunResult invoke(Object forkTestSet)
-   throws TestSetFailedException, ReporterException, 
InvocationTargetException {
-   if (forkTestSet instanceof TestsToRun) {
-   return invokeAllTests((TestsToRun) forkTestSet);
-   }
-   else if (forkTestSet instanceof Class) {
-   return invokeAllTests(TestsToRun.fromClass((Class) 
forkTestSet));
-   }
-   else if (forkTestSet == null) {
-   return invokeAllTests(scanClasspath());
-   }
-   else {
-   throw new IllegalArgumentException("Unexpected value of 
forkTestSet: " + forkTestSet);
-   }
-   }
-
-   private TestsToRun scanClasspath() {
-   TestsToRun scannedClasses = 
parameters.getScanResult().applyFilter(
-   new TestPlanScannerFilter(launcher, 
includeAndExcludeFilters), parameters.getTestClassLoader());
-   return 
parameters.getRunOrderCalculator().orderTestClasses(scannedClasses);
-   }
-
-   private RunResult invokeAllTests(TestsToRun testsToRun) {
-   RunResult runResult;
-   ReporterFactory reporterFactory = 
parameters.getReporterFactory();
-   try {
-   RunListener runListener = 
reporterFactory.createReporter();
-  

[08/17] maven-surefire git commit: Move provider classes to maven surefire package

2017-08-03 Thread tibordigana
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4b8c1a47/surefire-providers/surefire-junit5/src/test/java/org/junit/platform/surefire/provider/TestPlanScannerFilterTests.java
--
diff --git 
a/surefire-providers/surefire-junit5/src/test/java/org/junit/platform/surefire/provider/TestPlanScannerFilterTests.java
 
b/surefire-providers/surefire-junit5/src/test/java/org/junit/platform/surefire/provider/TestPlanScannerFilterTests.java
deleted file mode 100644
index f9e9ca4..000
--- 
a/surefire-providers/surefire-junit5/src/test/java/org/junit/platform/surefire/provider/TestPlanScannerFilterTests.java
+++ /dev/null
@@ -1,190 +0,0 @@
-package org.junit.platform.surefire.provider;
-
-/*
- * 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.
- */
-
-import static java.util.Collections.emptyList;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-import java.util.List;
-import java.util.stream.Stream;
-
-import org.junit.jupiter.api.DynamicTest;
-import org.junit.jupiter.api.Nested;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.TestFactory;
-import org.junit.platform.engine.Filter;
-import org.junit.platform.launcher.core.LauncherFactory;
-
-/**
- * Unit tests for {@link TestPlanScannerFilter}.
- *
- * @since 1.0
- */
-public class TestPlanScannerFilterTests
-{
-
-@Test
-void emptyClassAccepted()
-{
-assertTrue( newFilter().accept( EmptyClass.class ), "accepts empty 
class because it is a container" );
-}
-
-@Test
-void classWithNoTestMethodsIsAccepted()
-{
-assertTrue( newFilter().accept( ClassWithMethods.class ),
-"accepts class with no @Test methods because it is a container" );
-}
-
-@Test
-void classWithTestMethodsIsAccepted()
-{
-assertTrue( newFilter().accept( ClassWithTestMethods.class ) );
-}
-
-@Test
-void classWithNestedTestClassIsAccepted()
-{
-assertTrue( newFilter().accept( ClassWithNestedTestClass.class ) );
-}
-
-@Test
-void classWithDeeplyNestedTestClassIsAccepted()
-{
-assertTrue( newFilter().accept( ClassWithDeeplyNestedTestClass.class ) 
);
-}
-
-@Test
-void classWithTestFactoryIsAccepted()
-{
-assertTrue( newFilter().accept( ClassWithTestFactory.class ) );
-}
-
-@Test
-void classWithNestedTestFactoryIsAccepted()
-{
-assertTrue( newFilter().accept( ClassWithNestedTestFactory.class ) );
-}
-
-private TestPlanScannerFilter newFilter()
-{
-return new TestPlanScannerFilter( LauncherFactory.create(), new 
Filter[0] );
-}
-
-private static class EmptyClass
-{
-}
-
-@SuppressWarnings("unused")
-private static class ClassWithMethods
-{
-
-void method1()
-{
-}
-
-void method2()
-{
-}
-}
-
-private static class ClassWithTestMethods
-{
-
-@Test
-void test1()
-{
-}
-
-@Test
-public void test2()
-{
-}
-}
-
-private static class ClassWithNestedTestClass
-{
-
-@SuppressWarnings("unused")
-void method()
-{
-}
-
-@Nested
-class TestClass
-{
-
-@Test
-void test1()
-{
-}
-}
-}
-
-private static class ClassWithDeeplyNestedTestClass
-{
-
-@Nested
-class Level1
-{
-
-@Nested
-class Level2
-{
-
-@Nested
-class TestClass
-{
-
-@Test
-void test1()
-{
-}
-}
-}
-}
-}
-
-private static class ClassWithTestFactory
-{
-
-@TestFactory
-Stream tests()
-{
-return Stream.empty();
-}
-}
-
-private static class ClassWithNestedTestFactory
-{
-
-@Nested
-class TestClass
-{
-
-@TestFactory
-List tests()
-{
-return emptyList();
-

[11/17] maven-surefire git commit: Remove usage of internal JUnit API

2017-08-03 Thread tibordigana
Remove usage of internal JUnit API


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

Branch: refs/heads/junit5
Commit: 78229d505cf515aa90652ab630bea11ae1c6ce69
Parents: 61dbc6c
Author: Benedikt Ritter 
Authored: Mon Feb 6 19:06:23 2017 +0100
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:35 2017 +0200

--
 surefire-providers/surefire-junit5/pom.xml  |  2 --
 .../provider/JUnitPlatformProvider.java | 28 +++-
 2 files changed, 15 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/78229d50/surefire-providers/surefire-junit5/pom.xml
--
diff --git a/surefire-providers/surefire-junit5/pom.xml 
b/surefire-providers/surefire-junit5/pom.xml
index 55099f5..cf25aa2 100644
--- a/surefire-providers/surefire-junit5/pom.xml
+++ b/surefire-providers/surefire-junit5/pom.xml
@@ -43,8 +43,6 @@
   junit-platform-launcher
   ${junit-platform.version}
 
-
 
   org.junit.platform
   junit-platform-engine

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/78229d50/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
--
diff --git 
a/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
 
b/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
index 066185f..3ee8acb 100644
--- 
a/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
+++ 
b/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
@@ -19,17 +19,6 @@ package org.junit.platform.surefire.provider;
  * under the License.
  */
 
-import static 
org.junit.platform.engine.discovery.DiscoverySelectors.selectClass;
-import static 
org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder.request;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Optional;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
 import org.apache.maven.surefire.providerapi.AbstractProvider;
 import org.apache.maven.surefire.providerapi.ProviderParameters;
 import org.apache.maven.surefire.report.ReporterException;
@@ -39,13 +28,23 @@ import org.apache.maven.surefire.report.SimpleReportEntry;
 import org.apache.maven.surefire.suite.RunResult;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 import org.apache.maven.surefire.util.TestsToRun;
-import org.junit.platform.commons.util.Preconditions;
 import org.junit.platform.engine.Filter;
 import org.junit.platform.launcher.Launcher;
 import org.junit.platform.launcher.LauncherDiscoveryRequest;
 import org.junit.platform.launcher.TagFilter;
 import org.junit.platform.launcher.core.LauncherFactory;
 
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Optional;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import static 
org.junit.platform.engine.discovery.DiscoverySelectors.selectClass;
+import static 
org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder.request;
+
 /**
  * @since 1.0
  */
@@ -183,7 +182,10 @@ public class JUnitPlatformProvider
 {
 Optional elements = Optional.empty();
 
-Preconditions.condition( !groups.isPresent() || !tags.isPresent(), 
EXCEPTION_MESSAGE_BOTH_NOT_ALLOWED );
+if ( groups.isPresent() && tags.isPresent() )
+{
+throw new IllegalStateException( 
EXCEPTION_MESSAGE_BOTH_NOT_ALLOWED );
+}
 
 if ( groups.isPresent() )
 {



[01/17] maven-surefire git commit: SUREFIRE-1330: Import code from https://issues.apache.org/jira/browse/SUREFIRE-1330 unchanged as provided

2017-08-03 Thread tibordigana
Repository: maven-surefire
Updated Branches:
  refs/heads/junit5 e4a5247a7 -> 9580f5ef2


SUREFIRE-1330: Import code from 
https://issues.apache.org/jira/browse/SUREFIRE-1330 unchanged as provided


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

Branch: refs/heads/junit5
Commit: 4bf43aab9726f387a35bff40ee0c872110e03d52
Parents: e4a5247
Author: Benedikt Ritter 
Authored: Mon Feb 6 14:02:48 2017 +0100
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:29 2017 +0200

--
 surefire-providers/surefire-junit5/LICENSE.md   | 194 +
 .../provider/JUnitPlatformProvider.java | 170 +++
 .../surefire/provider/RunListenerAdapter.java   | 124 
 .../provider/TestPlanScannerFilter.java |  56 
 .../surefire/provider/package-info.java |   5 +
 maven.surefire.providerapi.SurefireProvider |   1 +
 .../provider/JUnitPlatformProviderTests.java| 286 +++
 .../provider/RunListenerAdapterTests.java   | 219 ++
 .../provider/SurefireProviderTestSuite.java |  45 +++
 .../provider/TestPlanScannerFilterTests.java| 157 ++
 .../src/test/resources/log4j2-test.xml  |  15 +
 11 files changed, 1272 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4bf43aab/surefire-providers/surefire-junit5/LICENSE.md
--
diff --git a/surefire-providers/surefire-junit5/LICENSE.md 
b/surefire-providers/surefire-junit5/LICENSE.md
new file mode 100644
index 000..b62a9b5
--- /dev/null
+++ b/surefire-providers/surefire-junit5/LICENSE.md
@@ -0,0 +1,194 @@
+Apache License
+==
+
+_Version 2.0, January 2004_
+__
+
+### Terms and Conditions for use, reproduction, and distribution
+
+ 1. Definitions
+
+“License” shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.
+
+“Licensor” shall mean the copyright owner or entity authorized by the 
copyright
+owner that is granting the License.
+
+“Legal Entity” shall mean the union of the acting entity and all other 
entities
+that control, are controlled by, or are under common control with that entity.
+For the purposes of this definition, “control” means **(i)** the power, 
direct or
+indirect, to cause the direction or management of such entity, whether by
+contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of 
the
+outstanding shares, or **(iii)** beneficial ownership of such entity.
+
+“You” (or “Your”) shall mean an individual or Legal Entity exercising
+permissions granted by this License.
+
+“Source” form shall mean the preferred form for making modifications, 
including
+but not limited to software source code, documentation source, and 
configuration
+files.
+
+“Object” form shall mean any form resulting from mechanical transformation 
or
+translation of a Source form, including but not limited to compiled object 
code,
+generated documentation, and conversions to other media types.
+
+“Work” shall mean the work of authorship, whether in Source or Object 
form, made
+available under the License, as indicated by a copyright notice that is 
included
+in or attached to the work (an example is provided in the Appendix below).
+
+“Derivative Works” shall mean any work, whether in Source or Object form, 
that
+is based on (or derived from) the Work and for which the editorial revisions,
+annotations, elaborations, or other modifications represent, as a whole, an
+original work of authorship. For the purposes of this License, Derivative Works
+shall not include works that remain separable from, or merely link (or bind by
+name) to the interfaces of, the Work and Derivative Works thereof.
+
+“Contribution” shall mean any work of authorship, including the original 
version
+of the Work and any modifications or additions to that Work or Derivative Works
+thereof, that is intentionally submitted to Licensor for inclusion in the Work
+by the copyright owner or by an individual or Legal Entity authorized to submit
+on behalf of the copyright owner. For the purposes of this definition,
+“submitted” means any form of electronic, verbal, or written communication 
sent
+to the Licensor or its representatives, including but not limited to
+communication on electronic mailing lists, source code control systems, and
+issue tracking systems that are managed by, or on behalf of, the Licensor for
+the purpose of 

[05/17] maven-surefire git commit: Use Apache Software Foundation License header

2017-08-03 Thread tibordigana
Use Apache Software Foundation License header


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

Branch: refs/heads/junit5
Commit: 9ac9198760e0b7682534e84220d9210ca4b8a80a
Parents: 68722a8
Author: Benedikt Ritter 
Authored: Mon Feb 6 14:25:01 2017 +0100
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:18:34 2017 +0200

--
 .../provider/JUnitPlatformProvider.java | 25 +++-
 .../surefire/provider/RunListenerAdapter.java   | 25 +++-
 .../provider/TestPlanScannerFilter.java | 25 +++-
 .../surefire/provider/package-info.java | 19 ++-
 .../provider/JUnitPlatformProviderTests.java| 25 +++-
 .../provider/RunListenerAdapterTests.java   | 25 +++-
 .../provider/SurefireProviderTestSuite.java | 25 +++-
 .../provider/TestPlanScannerFilterTests.java| 25 +++-
 .../src/test/resources/log4j2-test.xml  | 18 ++
 9 files changed, 134 insertions(+), 78 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9ac91987/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
--
diff --git 
a/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
 
b/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
index 99f0fd5..ff55e0d 100644
--- 
a/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
+++ 
b/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/JUnitPlatformProvider.java
@@ -1,17 +1,20 @@
 /*
- * Copyright 2015-2017 the original author or authors.
+ * 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
  *
- * Licensed 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
  *
- * 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.
+ * 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.
  */
 
 package org.junit.platform.surefire.provider;

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/9ac91987/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/RunListenerAdapter.java
--
diff --git 
a/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/RunListenerAdapter.java
 
b/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/RunListenerAdapter.java
index ab79ddd..9c37a29 100644
--- 
a/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/RunListenerAdapter.java
+++ 
b/surefire-providers/surefire-junit5/src/main/java/org/junit/platform/surefire/provider/RunListenerAdapter.java
@@ -1,17 +1,20 @@
 /*
- * Copyright 2015-2017 the original author or authors.
+ * 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 

maven-surefire git commit: Revert junit-plattform provider code from 3.0-rc1 branch. This code will be moved to the junit5 branch. This commit reverts:

2017-08-03 Thread tibordigana
Repository: maven-surefire
Updated Branches:
  refs/heads/3.0-rc1 70c8843e9 -> 6636b0693


Revert junit-plattform provider code from 3.0-rc1 branch.
This code will be moved to the junit5 branch. This commit reverts:

- Commit 70c8843e935882b0a78916894cb9f042964f2717
  "SUREFIRE-1330: Fix module name in surefire-providers reactor"

- Commit c9a1f973e334b402d59f9944c5a58d1db9c8da45
  "Add contributors of the original provider implementation to pom.xml"

- Commit 6e83aa3808bcb4accce54a1b1c0ba91dd01a8812
  "Rename JUnit5 provider to JUnit Platform provider, as suggested by 
@marcphilipp"

- Commit ef6a391006ab1fa672dc26fc234b6411a7dfa888
  "Configure shade plugin so that is does not explode"

- Commit b08b1aeae4ad01582fd6264462a4a9345bfd065d
  "Make Checkstyle happy"

- Commit 97f97167ea0aa07bba4bd864b1f686c2f79ca33d
  "Remove engine declaration - this should be done automatically by surefire"

- Commit c197b926a5f02ab2a3842d4a8a736315c3c8eb33
  "Move provider classes to maven surefire package"

- Commit 30ee7b94c3421411aa6257e78f77fe8b88aa125e
  "Remove usage of internal JUnit API"

- Commit 43fb41e8d4115830fbeb6d29f1f17efe8e04de5f
  "Remove unused filed"

- Commit caceca16772c6d11302c2d8627c7f5b7d913878a
  "Add surefire-junit5 provider as module to the surefire build"

- Commit 9283dee30decf62e12edd5eaea08abd811ee811f
  "Adopt Apache Maven code style"

- Commit 62d00dca5709c0a089a65f810c1c66c2897b5003
  "Use Apache Software Foundation License header"

- Commit a0d0325db046f266abc401abe3e0047f6ce908c3
  "Convert spaces to tabs"

- Commit 0c329812e71f149bb7c92bfaa3fa37c6d2ec6eec
  "Remove LICENSE file, ALv2 will be part of the source distribution"

- Commit 73e09a8b2b245e76e072c1809e7fa50be02e95b6
  "SUREFIRE-1330: Import code from 
https://issues.apache.org/jira/browse/SUREFIRE-1330 unchanged as provided"


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

Branch: refs/heads/3.0-rc1
Commit: 6636b0693de852a029961bbe676a61c6edfd4293
Parents: 70c8843
Author: Benedikt Ritter 
Authored: Mon Jun 12 08:21:11 2017 +0200
Committer: Benedikt Ritter 
Committed: Mon Jun 12 08:25:00 2017 +0200

--
 surefire-providers/pom.xml  |   1 -
 .../surefire-junit-platform/pom.xml | 187 ---
 .../junitplatform/JUnitPlatformProvider.java| 202 
 .../junitplatform/RunListenerAdapter.java   | 150 -
 .../junitplatform/TestPlanScannerFilter.java|  64 
 maven.surefire.providerapi.SurefireProvider |   1 -
 .../JUnitPlatformProviderTests.java | 325 ---
 .../junitplatform/RunListenerAdapterTests.java  | 262 ---
 .../TestPlanScannerFilterTests.java | 190 ---
 9 files changed, 1382 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/6636b069/surefire-providers/pom.xml
--
diff --git a/surefire-providers/pom.xml b/surefire-providers/pom.xml
index 3641fd5..a90d50d 100644
--- a/surefire-providers/pom.xml
+++ b/surefire-providers/pom.xml
@@ -41,7 +41,6 @@
 surefire-junit3
 surefire-junit4
 surefire-junit47
-surefire-junit-platform
 surefire-testng-utils
 surefire-testng
   

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/6636b069/surefire-providers/surefire-junit-platform/pom.xml
--
diff --git a/surefire-providers/surefire-junit-platform/pom.xml 
b/surefire-providers/surefire-junit-platform/pom.xml
deleted file mode 100644
index a4287bf..000
--- a/surefire-providers/surefire-junit-platform/pom.xml
+++ /dev/null
@@ -1,187 +0,0 @@
-
-
-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/xsd/maven-4.0.0.xsd;>
-  4.0.0
-
-  
-org.apache.maven.surefire
-surefire-providers
-2.19.2-SNAPSHOT
-  
-
-  surefire-junit-platform
-
-  SureFire JUnit Platform Runner
-  SureFire JUnit Platform Runner
-
-  
-8
-1.0.0-M3
-5.0.0-M3
-  
-
-  
-
-  org.junit.platform
-  junit-platform-launcher
-  ${junit-platform.version}
-
-
-  org.junit.platform
-  junit-platform-engine
-  ${junit-platform.version}
-
-
-  org.apache.maven.surefire
-  common-java5
-  ${project.version}
-
-
-
-  org.junit.jupiter
-  junit-jupiter-api
-  ${junit-jupiter.version}
-  test
-
-
-  org.junit.jupiter
-  

maven-surefire git commit: [SUREFIRE-1400] Windows surefire boot directory should appear in system default temporary-directory [Forced Update!]

2017-08-03 Thread tibordigana
Repository: maven-surefire
Updated Branches:
  refs/heads/SUREFIRE-1400 e799e4bc4 -> 7a6f3e6c8 (forced update)


[SUREFIRE-1400] Windows surefire boot directory should appear in system default 
temporary-directory


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

Branch: refs/heads/SUREFIRE-1400
Commit: 7a6f3e6c829e86aba663de4f90963070666d2654
Parents: 26527d1
Author: Tibor17 
Authored: Tue Aug 1 09:37:48 2017 +0200
Committer: Tibor17 
Committed: Thu Aug 3 15:18:01 2017 +0200

--
 .../plugin/surefire/AbstractSurefireMojo.java   |  93 +++-
 .../surefire/AbstractSurefireMojoTest.java  | 111 +++
 .../apache/maven/surefire/JUnit4SuiteTest.java  |   4 +-
 .../maven/surefire/util/ReflectionUtils.java|  29 -
 .../surefire/util/ReflectionUtilsTest.java  |   6 +-
 surefire-integration-tests/pom.xml  |   2 +
 .../maven/surefire/its/LongWindowsPathIT.java   |  55 +
 .../surefire/its/fixture/HelperAssertions.java  |  13 +--
 .../test/resources/long-windows-path/pom.xml|  57 ++
 .../test/java/longwindowspath/BasicTest.java|  32 ++
 .../java/jiras/surefre855/bundle/FooIT.java |  31 +-
 .../test/java/jiras/surefire855/jar/FooIT.java  |  33 +-
 .../test/java/jiras/surefire855/war/FooIT.java  |  31 +-
 13 files changed, 393 insertions(+), 104 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/7a6f3e6c/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index b3df567..f2e5bfb 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -76,12 +76,14 @@ import org.apache.maven.surefire.testset.TestRequest;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 import org.apache.maven.surefire.util.DefaultScanResult;
 import org.apache.maven.surefire.util.RunOrder;
+import org.apache.maven.surefire.util.SurefireReflectionException;
 import org.apache.maven.toolchain.Toolchain;
 import org.apache.maven.toolchain.ToolchainManager;
 
 import javax.annotation.Nonnull;
 import java.io.File;
 import java.io.IOException;
+import java.lang.reflect.Array;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -98,12 +100,18 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
 import static java.lang.Thread.currentThread;
+import static org.apache.commons.lang3.JavaVersion.JAVA_1_7;
+import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS;
+import static org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast;
 import static org.apache.maven.shared.utils.StringUtils.capitalizeFirstLetter;
 import static org.apache.maven.shared.utils.StringUtils.isEmpty;
 import static org.apache.maven.shared.utils.StringUtils.isNotBlank;
 import static org.apache.maven.shared.utils.StringUtils.split;
 import static org.apache.maven.surefire.suite.RunResult.failure;
 import static org.apache.maven.surefire.suite.RunResult.noTestsRun;
+import static org.apache.maven.surefire.util.ReflectionUtils.invokeGetter;
+import static 
org.apache.maven.surefire.util.ReflectionUtils.invokeStaticMethod;
+import static org.apache.maven.surefire.util.ReflectionUtils.tryLoadClass;
 
 /**
  * Abstract base class for running tests using Surefire.
@@ -117,6 +125,8 @@ public abstract class AbstractSurefireMojo
 {
 private static final Platform PLATFORM = new Platform();
 
+private static final File SYSTEM_TMP_DIR = new File( System.getProperty( 
"java.io.tmpdir" ) );
+
 private final ProviderDetector providerDetector = new ProviderDetector();
 
 /**
@@ -342,7 +352,12 @@ public abstract class AbstractSurefireMojo
 private String forkMode;
 
 /**
- * Relative path to project.build.directory containing internal 
Surefire temporary files.
+ * Relative path to temporary-surefire-boot directory containing 
internal Surefire temporary files.
+ * 
+ * The temporary-surefire-boot directory is 
project.build.directory on most platforms or
+ * system default temporary-directory specified by the system 
property {@code java.io.tmpdir}
+ * on 

[1/3] maven-surefire git commit: [SUREFIRE-1222] ForkClient attempts to consume unrelated lines

2017-08-03 Thread tibordigana
Repository: maven-surefire
Updated Branches:
  refs/heads/SUREFIRE-1222 [created] 64ae8e88d


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/64ae8e88/surefire-api/src/test/java/org/apache/maven/surefire/booter/ForkedChannelEncoderTest.java
--
diff --git 
a/surefire-api/src/test/java/org/apache/maven/surefire/booter/ForkedChannelEncoderTest.java
 
b/surefire-api/src/test/java/org/apache/maven/surefire/booter/ForkedChannelEncoderTest.java
new file mode 100644
index 000..2552af1
--- /dev/null
+++ 
b/surefire-api/src/test/java/org/apache/maven/surefire/booter/ForkedChannelEncoderTest.java
@@ -0,0 +1,481 @@
+package org.apache.maven.surefire.booter;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.surefire.report.ReportEntry;
+import org.apache.maven.surefire.report.SafeThrowable;
+import org.apache.maven.surefire.report.StackTraceWriter;
+import org.junit.Test;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.LineNumberReader;
+import java.io.PrintStream;
+import java.io.StringReader;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.util.Arrays;
+
+import static java.nio.charset.Charset.defaultCharset;
+import static javax.xml.bind.DatatypeConverter.printBase64Binary;
+import static org.apache.maven.surefire.booter.ForkedChannelEncoder.encode;
+import static 
org.apache.maven.surefire.booter.ForkedChannelEncoder.encodeHeader;
+import static 
org.apache.maven.surefire.booter.ForkedChannelEncoder.encodeMessage;
+import static 
org.apache.maven.surefire.booter.ForkedChannelEncoder.encodeOpcode;
+import static org.apache.maven.surefire.booter.ForkedChannelEncoder.print;
+import static 
org.apache.maven.surefire.booter.ForkedProcessEvent.BOOTERCODE_SYSPROPS;
+import static org.apache.maven.surefire.booter.ForkedProcessEvent.MAGIC_NUMBER;
+import static org.apache.maven.surefire.report.RunMode.NORMAL_RUN;
+import static org.fest.assertions.Assertions.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author mailto:tibordig...@apache.org;>Tibor Digana (tibor17)
+ * @since 2.20.1
+ */
+public class ForkedChannelEncoderTest
+{
+
+@Test
+public void shouldBeFailSafe()
+{
+Charset encoding = Charset.defaultCharset();
+assertThat( ForkedChannelEncoder.toBase64( null, encoding ) 
).isEqualTo( "-" );
+assertThat( ForkedChannelEncoder.base64WithUtf8( null ) ).isEqualTo( 
"-" );
+StringBuilder builder = new StringBuilder();
+ForkedChannelEncoder.base64WithUtf8( builder, null );
+assertThat( builder.toString() ).isEqualTo( "-" );
+}
+
+@Test
+public void shouldHaveSystemProperty()
+{
+StringBuilder actualEncoded = encode( BOOTERCODE_SYSPROPS, NORMAL_RUN, 
"arg1", "arg2" );
+String expected = MAGIC_NUMBER + BOOTERCODE_SYSPROPS.getOpcode() + 
":normal-run:UTF-8:YXJnMQ==:YXJnMg==";
+
+assertThat( actualEncoded.toString() )
+.isEqualTo( expected );
+}
+
+@Test
+public void safeThrowableShouldBeEncoded()
+{
+final Charset utf8 = Charset.forName( "UTF-8" );
+
+final String exceptionMessage = "msg";
+final String encodedExceptionMsg = printBase64Binary( toArray( 
utf8.encode( exceptionMessage ) ) );
+
+final String smartStackTrace = "MyTest:86 >> Error";
+final String encodedSmartStackTrace = printBase64Binary( toArray( 
utf8.encode( smartStackTrace ) ) );
+
+final String stackTrace = "trace line 1\ntrace line 2";
+final String encodedStackTrace = printBase64Binary( toArray( 
utf8.encode( stackTrace ) ) );
+
+final String trimmedStackTrace = "trace line 1\ntrace line 2";
+final String encodedTrimmedStackTrace = printBase64Binary( toArray( 
utf8.encode( trimmedStackTrace ) ) );
+
+SafeThrowable safeThrowable = new SafeThrowable( new Exception( 
exceptionMessage ) );
+StackTraceWriter stackTraceWriter = mock( StackTraceWriter.class );
+when( stackTraceWriter.getThrowable() ).thenReturn( safeThrowable );
+when( 

[2/3] maven-surefire git commit: [SUREFIRE-1222] ForkClient attempts to consume unrelated lines

2017-08-03 Thread tibordigana
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/64ae8e88/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/output/ForkedChannelDecoderTest.java
--
diff --git 
a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/output/ForkedChannelDecoderTest.java
 
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/output/ForkedChannelDecoderTest.java
new file mode 100644
index 000..06849f0
--- /dev/null
+++ 
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/output/ForkedChannelDecoderTest.java
@@ -0,0 +1,666 @@
+package org.apache.maven.plugin.surefire.booterclient.output;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.surefire.booter.ForkedChannelEncoder;
+import org.apache.maven.surefire.report.ReportEntry;
+import org.apache.maven.surefire.report.RunMode;
+import org.apache.maven.surefire.report.SafeThrowable;
+import org.apache.maven.surefire.report.StackTraceWriter;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.runners.Enclosed;
+import org.junit.experimental.theories.DataPoints;
+import org.junit.experimental.theories.FromDataPoints;
+import org.junit.experimental.theories.Theories;
+import org.junit.experimental.theories.Theory;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.LineNumberReader;
+import java.io.PrintStream;
+import java.io.StringReader;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.util.Arrays;
+import java.util.Map;
+
+import static java.nio.charset.Charset.defaultCharset;
+import static javax.xml.bind.DatatypeConverter.printBase64Binary;
+import static 
org.apache.maven.plugin.surefire.booterclient.output.ForkedChannelDecoder.toReportEntry;
+import static org.apache.maven.surefire.report.RunMode.NORMAL_RUN;
+import static org.fest.assertions.Assertions.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.rules.ExpectedException.none;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+/**
+ * @author mailto:tibordig...@apache.org;>Tibor Digana (tibor17)
+ * @since 2.20.1
+ */
+@RunWith( Enclosed.class )
+public class ForkedChannelDecoderTest
+{
+public static class DecoderOperationsTest
+{
+@Rule
+public final ExpectedException rule = none();
+
+@Test
+public void shouldBeFailSafe()
+{
+Charset encoding = Charset.defaultCharset();
+assertThat( ForkedChannelDecoder.decode( null, encoding ) 
).isNull();
+assertThat( ForkedChannelDecoder.decode( "-", encoding ) 
).isNull();
+assertThat( ForkedChannelDecoder.decodeToInteger( null ) 
).isNull();
+assertThat( ForkedChannelDecoder.decodeToInteger( "-" ) ).isNull();
+assertThat( ForkedChannelDecoder.decodeToBytes( null ) ).isNull();
+assertThat( ForkedChannelDecoder.decodeToBytes( "-" ) ).isNull();
+}
+
+@Test
+public void shouldHaveSystemProperty() throws IOException
+{
+Stream out = Stream.newStream();
+ForkedChannelEncoder forkedChannelEncoder = new 
ForkedChannelEncoder( defaultCharset(), out );
+forkedChannelEncoder.sendSystemProperties();
+
+ForkedChannelDecoder decoder = new ForkedChannelDecoder();
+decoder.setSystemPropertiesListener( new 
PropertyEventAssertionListener( NORMAL_RUN ) );
+LineNumberReader reader = out.newReader( defaultCharset() );
+for ( String line; ( line = reader.readLine() ) != null; )
+{
+decoder.handleEvent( line, new AssertionErrorHandler() );
+}
+assertThat( reader.getLineNumber() ).isPositive();
+}
+
+@Test
+public void shouldRecognizeEmptyStream4ReportEntry()
+{
+ReportEntry reportEntry = toReportEntry( 

[3/3] maven-surefire git commit: [SUREFIRE-1222] ForkClient attempts to consume unrelated lines

2017-08-03 Thread tibordigana
[SUREFIRE-1222] ForkClient attempts to consume unrelated lines


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

Branch: refs/heads/SUREFIRE-1222
Commit: 64ae8e88d9e67b8eb7371b6ba94f060253db4465
Parents: e7bb6fc
Author: Tibor17 
Authored: Thu Aug 3 14:47:49 2017 +0200
Committer: Tibor17 
Committed: Thu Aug 3 14:47:49 2017 +0200

--
 .../plugin/surefire/AbstractSurefireMojo.java   |   5 +-
 .../surefire/booterclient/ForkStarter.java  |   9 +-
 .../booterclient/output/ErrorInFork.java|  68 ++
 .../booterclient/output/ForkClient.java | 451 ++---
 .../output/ForkedChannelDecoder.java| 346 ++
 .../ForkedChannelDecoderErrorHandler.java   |  29 +
 .../ForkedProcessBinaryEventListener.java   |  33 +
 .../output/ForkedProcessEventListener.java  |  31 +
 .../output/ForkedProcessExitErrorListener.java  |  29 +
 .../ForkedProcessPropertyEventListener.java |  31 +
 .../ForkedProcessReportEventListener.java   |  32 +
 .../ForkedProcessStackTraceEventListener.java   |  31 +
 .../ForkedProcessStringEventListener.java   |  29 +
 .../output/MultipleFailureException.java|   3 +-
 .../surefire/report/StatelessXmlReporter.java   |   5 +-
 .../surefire/report/TestSetRunListener.java |  22 +-
 .../Utf8RecodingDeferredFileOutputStream.java   |   6 +-
 .../surefire/report/WrappedReportEntry.java |   3 +-
 .../surefire/runorder/StatisticsReporter.java   |   4 +-
 .../maven/plugin/surefire/util/FileScanner.java |   6 +-
 .../booterclient/ForkingRunListenerTest.java|   7 +-
 .../booterclient/output/ForkClientTest.java |  38 ++
 .../output/ForkedChannelDecoderTest.java| 666 +++
 .../apache/maven/surefire/JUnit4SuiteTest.java  |   2 +
 surefire-api/pom.xml|   5 +
 .../surefire/booter/BaseProviderFactory.java|   3 +-
 .../surefire/booter/ForkedChannelEncoder.java   | 432 
 .../surefire/booter/ForkedProcessEvent.java | 123 
 .../surefire/booter/ForkingReporterFactory.java |  13 +-
 .../surefire/booter/ForkingRunListener.java |  27 +-
 .../maven/surefire/report/RunListener.java  |   9 +
 .../apache/maven/surefire/report/RunMode.java   |  60 ++
 .../surefire/testset/TestListResolver.java  |  14 +-
 .../surefire/util/internal/StringUtils.java | 217 --
 .../java/org/apache/maven/JUnit4SuiteTest.java  |   2 -
 .../booter/ForkedChannelEncoderTest.java| 481 ++
 .../surefire/booter/ForkingRunListenerTest.java |   2 +-
 .../surefire/util/internal/StringUtilsTest.java |  96 ---
 .../apache/maven/surefire/booter/Classpath.java |   2 +-
 .../maven/surefire/booter/ForkedBooter.java |  33 +-
 .../maven/surefire/booter/TypeEncodedValue.java |   4 +-
 .../surefire/its/fixture/SurefireLauncher.java  |   2 +-
 .../surefire/log/api/ConsoleLoggerUtils.java|   5 +
 .../surefire/common/junit48/RequestedTest.java  |   2 +-
 .../maven/surefire/junit/JUnitTestSetTest.java  |   6 +
 surefire-providers/surefire-junit47/pom.xml |   2 +-
 .../junitcore/ConcurrentRunListener.java|   6 +
 .../surefire/junitcore/JUnitCoreWrapper.java|   2 +-
 .../utils/GroupMatcherMethodSelector.java   |  14 +-
 49 files changed, 2823 insertions(+), 625 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/64ae8e88/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
--
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index 16c25ec..23c3642 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -232,6 +232,7 @@ public abstract class AbstractSurefireMojo
  * being tested. This directory is declared by the parameter 
testClassesDirectory which defaults
  * to the POM property ${project.build.testOutputDirectory}, 
typically src/test/java
  * unless overridden.
+ * //todo use regex for fully qualified class names and change the 
filtering abilities
  */
 @Parameter
 // TODO use regex for fully qualified class names in 3.0 and change the 
filtering abilities
@@ -1260,7 +1261,7 @@ public abstract class AbstractSurefireMojo
 
 protected boolean