maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tibordig...@apache.org
Subject [maven-surefire] 01/01: [SUREFIRE-1600] Surefire Project using surefire:2.12.4 is not fully able to work with JDK 10+ on internal build system. Therefore surefire-shadefire should go with Surefire:3.0.0-M1.
Date Sun, 18 Nov 2018 10:16:27 GMT
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch SUREFIRE-1600
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 91c236cfe24d68572d6293702d427d7edfe24a16
Author: Tibor17 <tibordigana@apache.org>
AuthorDate: Sun Nov 18 10:46:27 2018 +0100

    [SUREFIRE-1600] Surefire Project using surefire:2.12.4 is not fully able to work with
JDK 10+ on internal build system. Therefore surefire-shadefire should go with Surefire:3.0.0-M1.
---
 .../apache/maven/plugin/surefire/util/Relocator.java   |  2 +-
 .../booterclient/DefaultForkConfigurationTest.java     |  4 ++--
 .../org/apache/maven/surefire/util/RelocatorTest.java  |  4 ++--
 .../maven/surefire/booter/StartupConfiguration.java    |  2 +-
 surefire-shadefire/pom.xml                             | 18 +++++++-----------
 ....apache.maven.surefire.providerapi.SurefireProvider |  2 +-
 6 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/Relocator.java
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/Relocator.java
index 9d7706b..fe07169 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/Relocator.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/util/Relocator.java
@@ -29,7 +29,7 @@ import javax.annotation.Nonnull;
  */
 public final class Relocator
 {
-    private static final String RELOCATION_BASE = "org.apache.maven.surefire.";
+    private static final String RELOCATION_BASE = "org.apache.maven.";
     private static final String PACKAGE_DELIMITER = "shadefire";
 
     private Relocator()
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java
index b974187..6bedab9 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java
@@ -304,7 +304,7 @@ public class DefaultForkConfigurationTest
         ClassLoaderConfiguration clc = new ClassLoaderConfiguration( true, true );
         ClasspathConfiguration cc = new ClasspathConfiguration( true, true );
         StartupConfiguration conf =
-                new StartupConfiguration( "org.apache.maven.surefire.shadefire.MyProvider",
cc, clc, false, false );
+                new StartupConfiguration( "org.apache.maven.shadefire.surefire.MyProvider",
cc, clc, false, false );
         StartupConfiguration confMock = spy( conf );
         mockStatic( Relocator.class );
         when( Relocator.relocate( anyString() ) ).thenCallRealMethod();
@@ -315,7 +315,7 @@ public class DefaultForkConfigurationTest
         verifyStatic( Relocator.class, times( 1 ) );
         Relocator.relocate( eq( ForkedBooter.class.getName() ) );
 
-        assertThat( cls ).isEqualTo( "org.apache.maven.surefire.shadefire.booter.ForkedBooter"
);
+        assertThat( cls ).isEqualTo( "org.apache.maven.shadefire.surefire.booter.ForkedBooter"
);
         assertThat( confMock.isShadefire() ).isTrue();
     }
 
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/surefire/util/RelocatorTest.java
b/maven-surefire-common/src/test/java/org/apache/maven/surefire/util/RelocatorTest.java
index 4d5951a..3482777 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/surefire/util/RelocatorTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/surefire/util/RelocatorTest.java
@@ -33,12 +33,12 @@ public class RelocatorTest
     public void testFoo()
     {
         String cn = "org.apache.maven.surefire.report.ForkingConsoleReporter";
-        assertEquals( "org.apache.maven.surefire.shadefire.report.ForkingConsoleReporter",
Relocator.relocate( cn ) );
+        assertEquals( "org.apache.maven.shadefire.surefire.report.ForkingConsoleReporter",
Relocator.relocate( cn ) );
     }
 
     public void testRelocation()
     {
         String org1 = "org.apache.maven.surefire.fooz.Baz";
-        assertEquals( "org.apache.maven.surefire.shadefire.fooz.Baz", Relocator.relocate(
org1 ) );
+        assertEquals( "org.apache.maven.shadefire.surefire.fooz.Baz", Relocator.relocate(
org1 ) );
     }
 }
diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/StartupConfiguration.java
b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/StartupConfiguration.java
index f98df90..870f81d 100644
--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/StartupConfiguration.java
+++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/StartupConfiguration.java
@@ -130,7 +130,7 @@ public class StartupConfiguration
 
     public boolean isShadefire()
     {
-        return providerClassName.startsWith( "org.apache.maven.surefire.shadefire" );
+        return providerClassName.startsWith( "org.apache.maven.shadefire.surefire" );
     }
 
     public void writeSurefireTestClasspathProperty()
diff --git a/surefire-shadefire/pom.xml b/surefire-shadefire/pom.xml
index 0d95ca2..ba40b76 100644
--- a/surefire-shadefire/pom.xml
+++ b/surefire-shadefire/pom.xml
@@ -46,17 +46,17 @@
     <dependency>
       <groupId>org.apache.maven.surefire</groupId>
       <artifactId>surefire-junit3</artifactId>
-      <version>2.12.4</version> <!-- ${shadedVersion}, but resolved due to
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+      <version>3.0.0-M1</version> <!-- ${shadedVersion}, but resolved due
to https://issues.apache.org/jira/browse/MRELEASE-799 -->
     </dependency>
     <dependency>
       <groupId>org.apache.maven.surefire</groupId>
       <artifactId>surefire-api</artifactId>
-      <version>2.12.4</version> <!-- ${shadedVersion}, but resolved due to
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+      <version>3.0.0-M1</version> <!-- ${shadedVersion}, but resolved due
to https://issues.apache.org/jira/browse/MRELEASE-799 -->
     </dependency>
     <dependency>
       <groupId>org.apache.maven.surefire</groupId>
       <artifactId>surefire-booter</artifactId>
-      <version>2.12.4</version> <!-- ${shadedVersion}, but resolved due to
https://issues.apache.org/jira/browse/MRELEASE-799 -->
+      <version>3.0.0-M1</version> <!-- ${shadedVersion}, but resolved due
to https://issues.apache.org/jira/browse/MRELEASE-799 -->
     </dependency>
   </dependencies>
 
@@ -73,15 +73,17 @@
             <configuration>
               <artifactSet>
                 <includes>
+                  <include>org.apache.maven.surefire:surefire-logger-api</include>
                   <include>org.apache.maven.surefire:surefire-api</include>
                   <include>org.apache.maven.surefire:surefire-booter</include>
+                  <include>org.apache.maven.surefire:common-junit3</include>
                   <include>org.apache.maven.surefire:surefire-junit3</include>
                 </includes>
               </artifactSet>
               <relocations>
                 <relocation>
-                  <pattern>org.apache.maven.surefire</pattern>
-                  <shadedPattern>org.apache.maven.surefire.shadefire</shadedPattern>
+                  <pattern>org.apache.maven</pattern>
+                  <shadedPattern>org.apache.maven.shadefire</shadedPattern>
                 </relocation>
               </relocations>
             </configuration>
@@ -95,12 +97,6 @@
           <skip>true</skip>
         </configuration>
       </plugin>
-      <plugin>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 
diff --git a/surefire-shadefire/src/main/resources/META-INF/services/org.apache.maven.surefire.providerapi.SurefireProvider
b/surefire-shadefire/src/main/resources/META-INF/services/org.apache.maven.surefire.providerapi.SurefireProvider
index 61bb1a4..1445853 100644
--- a/surefire-shadefire/src/main/resources/META-INF/services/org.apache.maven.surefire.providerapi.SurefireProvider
+++ b/surefire-shadefire/src/main/resources/META-INF/services/org.apache.maven.surefire.providerapi.SurefireProvider
@@ -16,4 +16,4 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-org.apache.maven.surefire.shadefire.junit.JUnit3Provider
+org.apache.maven.shadefire.surefire.junit.JUnit3Provider


Mime
View raw message