[maven-surefire] branch windows created (now fb0cb53)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[maven-surefire] branch windows created (now fb0cb53)

Tibor Digana
This is an automated email from the ASF dual-hosted git repository.

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


      at fb0cb53  workspace in TMP for Windows builds

This branch includes the following new commits:

     new 0f24a5c  [maven-release-plugin] prepare for next development iteration
     new 5f87e5c  fixed test LongWindowsPathIT on Windows - canonical TEMP
     new 2e03508  dump error paths with the same root cause in Boot Manifest-JAR only once
     new fb0cb53  workspace in TMP for Windows builds

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Reply | Threaded
Open this post in threaded view
|

[maven-surefire] 01/04: [maven-release-plugin] prepare for next development iteration

Tibor Digana
This is an automated email from the ASF dual-hosted git repository.

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

commit 0f24a5c398e76e086f6c0abd9869035030c80d77
Author: Tibor17 <[hidden email]>
AuthorDate: Wed Dec 5 21:48:04 2018 +0100

    [maven-release-plugin] prepare for next development iteration
---
 maven-failsafe-plugin/pom.xml                      | 2 +-
 maven-surefire-common/pom.xml                      | 2 +-
 maven-surefire-plugin/pom.xml                      | 2 +-
 maven-surefire-report-plugin/pom.xml               | 2 +-
 pom.xml                                            | 4 ++--
 surefire-api/pom.xml                               | 2 +-
 surefire-booter/pom.xml                            | 2 +-
 surefire-grouper/pom.xml                           | 2 +-
 surefire-its/pom.xml                               | 2 +-
 surefire-logger-api/pom.xml                        | 2 +-
 surefire-providers/common-java5/pom.xml            | 2 +-
 surefire-providers/common-junit3/pom.xml           | 2 +-
 surefire-providers/common-junit4/pom.xml           | 2 +-
 surefire-providers/common-junit48/pom.xml          | 2 +-
 surefire-providers/pom.xml                         | 2 +-
 surefire-providers/surefire-junit-platform/pom.xml | 2 +-
 surefire-providers/surefire-junit3/pom.xml         | 2 +-
 surefire-providers/surefire-junit4/pom.xml         | 2 +-
 surefire-providers/surefire-junit47/pom.xml        | 2 +-
 surefire-providers/surefire-testng-utils/pom.xml   | 2 +-
 surefire-providers/surefire-testng/pom.xml         | 2 +-
 surefire-report-parser/pom.xml                     | 2 +-
 surefire-shadefire/pom.xml                         | 2 +-
 23 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/maven-failsafe-plugin/pom.xml b/maven-failsafe-plugin/pom.xml
index 10b95fc..706a3fd 100644
--- a/maven-failsafe-plugin/pom.xml
+++ b/maven-failsafe-plugin/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.maven.surefire</groupId>
         <artifactId>surefire</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-M3-SNAPSHOT</version>
     </parent>
 
     <groupId>org.apache.maven.plugins</groupId>
diff --git a/maven-surefire-common/pom.xml b/maven-surefire-common/pom.xml
index 7f3e671..b7c7fda 100644
--- a/maven-surefire-common/pom.xml
+++ b/maven-surefire-common/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.maven.surefire</groupId>
         <artifactId>surefire</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-M3-SNAPSHOT</version>
     </parent>
 
     <artifactId>maven-surefire-common</artifactId>
diff --git a/maven-surefire-plugin/pom.xml b/maven-surefire-plugin/pom.xml
index 2b68a6d..99a34dd 100644
--- a/maven-surefire-plugin/pom.xml
+++ b/maven-surefire-plugin/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.maven.surefire</groupId>
         <artifactId>surefire</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-M3-SNAPSHOT</version>
     </parent>
 
     <groupId>org.apache.maven.plugins</groupId>
diff --git a/maven-surefire-report-plugin/pom.xml b/maven-surefire-report-plugin/pom.xml
index 3edc01d..f633908 100644
--- a/maven-surefire-report-plugin/pom.xml
+++ b/maven-surefire-report-plugin/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.maven.surefire</groupId>
         <artifactId>surefire</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-M3-SNAPSHOT</version>
     </parent>
 
     <groupId>org.apache.maven.plugins</groupId>
diff --git a/pom.xml b/pom.xml
index c52e3b6..e9afe4d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
 
   <groupId>org.apache.maven.surefire</groupId>
   <artifactId>surefire</artifactId>
-  <version>3.0.0-M2</version>
+  <version>3.0.0-M3-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Apache Maven Surefire</name>
@@ -66,7 +66,7 @@
     <connection>${maven.surefire.scm.devConnection}</connection>
     <developerConnection>${maven.surefire.scm.devConnection}</developerConnection>
     <url>https://github.com/apache/maven-surefire/tree/${project.scm.tag}</url>
-    <tag>surefire-3.0.0-M2_vote-1</tag>
+    <tag>HEAD</tag>
   </scm>
   <issueManagement>
     <system>jira</system>
diff --git a/surefire-api/pom.xml b/surefire-api/pom.xml
index 1d07f30..cce47ca 100644
--- a/surefire-api/pom.xml
+++ b/surefire-api/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.surefire</groupId>
     <artifactId>surefire</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-M3-SNAPSHOT</version>
   </parent>
 
   <artifactId>surefire-api</artifactId>
diff --git a/surefire-booter/pom.xml b/surefire-booter/pom.xml
index 9362c01..726dd8d 100644
--- a/surefire-booter/pom.xml
+++ b/surefire-booter/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.surefire</groupId>
     <artifactId>surefire</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-M3-SNAPSHOT</version>
   </parent>
 
   <artifactId>surefire-booter</artifactId>
diff --git a/surefire-grouper/pom.xml b/surefire-grouper/pom.xml
index 1283b59..ecb76ef 100644
--- a/surefire-grouper/pom.xml
+++ b/surefire-grouper/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.maven.surefire</groupId>
     <artifactId>surefire</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-M3-SNAPSHOT</version>
   </parent>
 
   <artifactId>surefire-grouper</artifactId>
diff --git a/surefire-its/pom.xml b/surefire-its/pom.xml
index a8d4559..a6f656c 100644
--- a/surefire-its/pom.xml
+++ b/surefire-its/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.maven.surefire</groupId>
         <artifactId>surefire</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-M3-SNAPSHOT</version>
     </parent>
 
     <artifactId>surefire-its</artifactId>
diff --git a/surefire-logger-api/pom.xml b/surefire-logger-api/pom.xml
index 8f947c5..fe341af 100644
--- a/surefire-logger-api/pom.xml
+++ b/surefire-logger-api/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.maven.surefire</groupId>
         <artifactId>surefire</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-M3-SNAPSHOT</version>
     </parent>
 
     <artifactId>surefire-logger-api</artifactId>
diff --git a/surefire-providers/common-java5/pom.xml b/surefire-providers/common-java5/pom.xml
index 4afa602..c7c1ab7 100644
--- a/surefire-providers/common-java5/pom.xml
+++ b/surefire-providers/common-java5/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.surefire</groupId>
     <artifactId>surefire-providers</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-M3-SNAPSHOT</version>
   </parent>
 
   <artifactId>common-java5</artifactId>
diff --git a/surefire-providers/common-junit3/pom.xml b/surefire-providers/common-junit3/pom.xml
index 01c56d7..d893497 100644
--- a/surefire-providers/common-junit3/pom.xml
+++ b/surefire-providers/common-junit3/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.surefire</groupId>
     <artifactId>surefire-providers</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-M3-SNAPSHOT</version>
   </parent>
 
   <artifactId>common-junit3</artifactId>
diff --git a/surefire-providers/common-junit4/pom.xml b/surefire-providers/common-junit4/pom.xml
index 60a5eb6..4fb849b 100644
--- a/surefire-providers/common-junit4/pom.xml
+++ b/surefire-providers/common-junit4/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.surefire</groupId>
     <artifactId>surefire-providers</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-M3-SNAPSHOT</version>
   </parent>
 
   <artifactId>common-junit4</artifactId>
diff --git a/surefire-providers/common-junit48/pom.xml b/surefire-providers/common-junit48/pom.xml
index d606466..f24d838 100644
--- a/surefire-providers/common-junit48/pom.xml
+++ b/surefire-providers/common-junit48/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.surefire</groupId>
     <artifactId>surefire-providers</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-M3-SNAPSHOT</version>
   </parent>
 
   <artifactId>common-junit48</artifactId>
diff --git a/surefire-providers/pom.xml b/surefire-providers/pom.xml
index 322c06a..6e429a3 100644
--- a/surefire-providers/pom.xml
+++ b/surefire-providers/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.maven.surefire</groupId>
     <artifactId>surefire</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-M3-SNAPSHOT</version>
   </parent>
 
   <artifactId>surefire-providers</artifactId>
diff --git a/surefire-providers/surefire-junit-platform/pom.xml b/surefire-providers/surefire-junit-platform/pom.xml
index a7fa47a..d17be2f 100644
--- a/surefire-providers/surefire-junit-platform/pom.xml
+++ b/surefire-providers/surefire-junit-platform/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.maven.surefire</groupId>
         <artifactId>surefire-providers</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-M3-SNAPSHOT</version>
     </parent>
 
     <artifactId>surefire-junit-platform</artifactId>
diff --git a/surefire-providers/surefire-junit3/pom.xml b/surefire-providers/surefire-junit3/pom.xml
index a6b127f..ca6d38e 100644
--- a/surefire-providers/surefire-junit3/pom.xml
+++ b/surefire-providers/surefire-junit3/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.surefire</groupId>
     <artifactId>surefire-providers</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-M3-SNAPSHOT</version>
   </parent>
 
   <artifactId>surefire-junit3</artifactId>
diff --git a/surefire-providers/surefire-junit4/pom.xml b/surefire-providers/surefire-junit4/pom.xml
index cafb439..390763c 100644
--- a/surefire-providers/surefire-junit4/pom.xml
+++ b/surefire-providers/surefire-junit4/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.surefire</groupId>
     <artifactId>surefire-providers</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-M3-SNAPSHOT</version>
   </parent>
 
   <artifactId>surefire-junit4</artifactId>
diff --git a/surefire-providers/surefire-junit47/pom.xml b/surefire-providers/surefire-junit47/pom.xml
index 72d84ca..fbf2673 100644
--- a/surefire-providers/surefire-junit47/pom.xml
+++ b/surefire-providers/surefire-junit47/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.maven.surefire</groupId>
         <artifactId>surefire-providers</artifactId>
-        <version>3.0.0-M2</version>
+        <version>3.0.0-M3-SNAPSHOT</version>
     </parent>
 
     <artifactId>surefire-junit47</artifactId>
diff --git a/surefire-providers/surefire-testng-utils/pom.xml b/surefire-providers/surefire-testng-utils/pom.xml
index 869593a..1751bdf 100644
--- a/surefire-providers/surefire-testng-utils/pom.xml
+++ b/surefire-providers/surefire-testng-utils/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.surefire</groupId>
     <artifactId>surefire-providers</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-M3-SNAPSHOT</version>
   </parent>
 
   <artifactId>surefire-testng-utils</artifactId>
diff --git a/surefire-providers/surefire-testng/pom.xml b/surefire-providers/surefire-testng/pom.xml
index 6128be9..08e6f2f 100644
--- a/surefire-providers/surefire-testng/pom.xml
+++ b/surefire-providers/surefire-testng/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.surefire</groupId>
     <artifactId>surefire-providers</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-M3-SNAPSHOT</version>
   </parent>
 
   <artifactId>surefire-testng</artifactId>
diff --git a/surefire-report-parser/pom.xml b/surefire-report-parser/pom.xml
index 9f644cf..65df7c8 100644
--- a/surefire-report-parser/pom.xml
+++ b/surefire-report-parser/pom.xml
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.maven.surefire</groupId>
     <artifactId>surefire</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-M3-SNAPSHOT</version>
   </parent>
 
   <artifactId>surefire-report-parser</artifactId>
diff --git a/surefire-shadefire/pom.xml b/surefire-shadefire/pom.xml
index 37348f0..24ce8e2 100644
--- a/surefire-shadefire/pom.xml
+++ b/surefire-shadefire/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.maven.surefire</groupId>
     <artifactId>surefire</artifactId>
-    <version>3.0.0-M2</version>
+    <version>3.0.0-M3-SNAPSHOT</version>
   </parent>
 
   <artifactId>surefire-shadefire</artifactId>

Reply | Threaded
Open this post in threaded view
|

[maven-surefire] 02/04: fixed test LongWindowsPathIT on Windows - canonical TEMP

Tibor Digana
In reply to this post by Tibor Digana
This is an automated email from the ASF dual-hosted git repository.

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

commit 5f87e5c88f844a7c3267938271998ac27de5a5c3
Author: Tibor17 <[hidden email]>
AuthorDate: Thu Dec 6 23:51:12 2018 +0100

    fixed test LongWindowsPathIT on Windows - canonical TEMP
---
 .../src/test/java/org/apache/maven/surefire/its/LongWindowsPathIT.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/LongWindowsPathIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/LongWindowsPathIT.java
index 6280835..551c18b 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/LongWindowsPathIT.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/LongWindowsPathIT.java
@@ -76,7 +76,7 @@ public class LongWindowsPathIT
             else if ( line.contains( "SUREFIRE-1400 surefire.real.class.path=" ) )
             {
                 assertThat( line )
-                        .contains( System.getProperty( "java.io.tmpdir" ) );
+                        .contains( new File( System.getProperty( "java.io.tmpdir" ) ).getCanonicalPath() );
             }
         }
     }

Reply | Threaded
Open this post in threaded view
|

[maven-surefire] 03/04: dump error paths with the same root cause in Boot Manifest-JAR only once

Tibor Digana
In reply to this post by Tibor Digana
This is an automated email from the ASF dual-hosted git repository.

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

commit 2e03508dbf8c4a2a3a49a84b3a64c360adf62f54
Author: Tibor17 <[hidden email]>
AuthorDate: Fri Dec 7 01:23:34 2018 +0100

    dump error paths with the same root cause in Boot Manifest-JAR only once
---
 .../booterclient/JarManifestForkConfiguration.java | 53 +++++++++++++++++-----
 .../JarManifestForkConfigurationTest.java          | 26 ++++++-----
 2 files changed, 56 insertions(+), 23 deletions(-)

diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java
index 79db5c6..62fa4c1 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfiguration.java
@@ -45,6 +45,7 @@ import java.util.jar.Manifest;
 
 import static java.nio.file.Files.isDirectory;
 import static org.apache.maven.plugin.surefire.SurefireHelper.escapeToPlatformPath;
+import static org.apache.maven.surefire.util.internal.StringUtils.NL;
 
 /**
  * @author <a href="mailto:[hidden email]">Tibor Digana (tibor17)</a>
@@ -113,15 +114,20 @@ public final class JarManifestForkConfiguration
 
             Manifest man = new Manifest();
 
+            boolean dumpError = true;
+
             // we can't use StringUtils.join here since we need to add a '/' to
             // the end of directory entries - otherwise the jvm will ignore them.
             StringBuilder cp = new StringBuilder();
             for ( Iterator<String> it = classPath.iterator(); it.hasNext(); )
             {
                 Path classPathElement = Paths.get( it.next() );
-                String uri = toClasspathElementUri( parent, classPathElement, dumpLogDirectory );
-                cp.append( uri );
-                if ( isDirectory( classPathElement ) && !uri.endsWith( "/" ) )
+                ClasspathElementUri classpathElementUri =
+                        toClasspathElementUri( parent, classPathElement, dumpLogDirectory, dumpError );
+                // too many errors in dump file with the same root cause may slow down the Boot Manifest-JAR startup
+                dumpError &= !classpathElementUri.absolute;
+                cp.append( classpathElementUri.uri );
+                if ( isDirectory( classPathElement ) && !classpathElementUri.uri.endsWith( "/" ) )
                 {
                     cp.append( '/' );
                 }
@@ -158,9 +164,10 @@ public final class JarManifestForkConfiguration
                 .toASCIIString();
     }
 
-    static String toClasspathElementUri( @Nonnull Path parent,
+    static ClasspathElementUri toClasspathElementUri( @Nonnull Path parent,
                                          @Nonnull Path classPathElement,
-                                         @Nonnull File dumpLogDirectory )
+                                         @Nonnull File dumpLogDirectory,
+                                         boolean dumpError )
             throws IOException
     {
         try
@@ -168,16 +175,22 @@ public final class JarManifestForkConfiguration
             String relativeUriPath = relativize( parent, classPathElement )
                     .replace( '\\', '/' );
 
-            return new URI( null, relativeUriPath, null )
-                    .toASCIIString();
+            return new ClasspathElementUri( new URI( null, relativeUriPath, null ) );
         }
         catch ( IllegalArgumentException e )
         {
-            String error = "Boot Manifest-JAR contains absolute paths in classpath " + classPathElement;
-            InPluginProcessDumpSingleton.getSingleton()
-                    .dumpException( e, error, dumpLogDirectory );
+            if ( dumpError )
+            {
+                String error = "Boot Manifest-JAR contains absolute paths in classpath '"
+                        + classPathElement
+                        + "'"
+                        + NL
+                        + "Hint: <argLine>-Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>";
+                InPluginProcessDumpSingleton.getSingleton()
+                        .dumpStreamText( error, dumpLogDirectory );
+            }
 
-            return toAbsoluteUri( classPathElement );
+            return new ClasspathElementUri( toAbsoluteUri( classPathElement ) );
         }
         catch ( URISyntaxException e )
         {
@@ -188,4 +201,22 @@ public final class JarManifestForkConfiguration
                     + parent, e );
         }
     }
+
+    static final class ClasspathElementUri
+    {
+        final String uri;
+        final boolean absolute;
+
+        ClasspathElementUri( String uri )
+        {
+            this.uri = uri;
+            absolute = true;
+        }
+
+        ClasspathElementUri( URI uri )
+        {
+            this.uri = uri.toASCIIString();
+            absolute = false;
+        }
+    }
 }
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfigurationTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfigurationTest.java
index 18b205a..5e71238 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfigurationTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/JarManifestForkConfigurationTest.java
@@ -24,6 +24,7 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.nio.file.Path;
 
+import org.apache.maven.plugin.surefire.booterclient.JarManifestForkConfiguration.ClasspathElementUri;
 import org.apache.maven.plugin.surefire.booterclient.output.InPluginProcessDumpSingleton;
 
 import static org.apache.maven.plugin.surefire.booterclient.JarManifestForkConfiguration.relativize;
@@ -38,6 +39,7 @@ import org.junit.runner.RunWith;
 
 import static org.fest.util.Files.delete;
 import static org.fest.util.Files.newTemporaryFolder;
+import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.same;
 import static org.powermock.api.mockito.PowerMockito.mock;
 import static org.powermock.api.mockito.PowerMockito.mockStatic;
@@ -84,9 +86,9 @@ public class JarManifestForkConfigurationTest
         when( classPathElement.toString() ).thenReturn( "/home/me/.m2/repository/grp/art/1.0/art-1.0.jar" );
         when( relativize( parent, classPathElement ) )
                 .thenReturn( "../../../.m2/repository/grp/art/1.0/art-1.0.jar" );
-        when( toClasspathElementUri( same( parent ), same( classPathElement ), same( dumpDirectory ) ) )
+        when( toClasspathElementUri( same( parent ), same( classPathElement ), same( dumpDirectory ), anyBoolean() ) )
                 .thenCallRealMethod();
-        assertThat( toClasspathElementUri( parent, classPathElement, dumpDirectory ) )
+        assertThat( toClasspathElementUri( parent, classPathElement, dumpDirectory, true ).uri )
                 .isEqualTo( "../../../.m2/repository/grp/art/1.0/art-1.0.jar" );
     }
 
@@ -101,9 +103,9 @@ public class JarManifestForkConfigurationTest
         when( classPathElement.toString() ).thenReturn( "/the Maven repo/grp/art/1.0/art-1.0.jar" );
         when( relativize( parent, classPathElement ) )
                 .thenReturn( "../../../../../the Maven repo/grp/art/1.0/art-1.0.jar" );
-        when( toClasspathElementUri( same( parent ), same( classPathElement ), same( dumpDirectory ) ) )
+        when( toClasspathElementUri( same( parent ), same( classPathElement ), same( dumpDirectory ), anyBoolean() ) )
                 .thenCallRealMethod();
-        assertThat( toClasspathElementUri( parent, classPathElement, dumpDirectory ) )
+        assertThat( toClasspathElementUri( parent, classPathElement, dumpDirectory, true ).uri )
                 .isEqualTo( "../../../../../the%20Maven%20repo/grp/art/1.0/art-1.0.jar" );
     }
 
@@ -118,9 +120,9 @@ public class JarManifestForkConfigurationTest
         when( classPathElement.toString() ).thenReturn( "C:\\Users\\me\\.m2\\repository\\grp\\art\\1.0\\art-1.0.jar" );
         when( relativize( parent, classPathElement ) )
                 .thenReturn( "..\\..\\..\\Users\\me\\.m2\\repository\\grp\\art\\1.0\\art-1.0.jar" );
-        when( toClasspathElementUri( same( parent ), same( classPathElement ), same( dumpDirectory ) ) )
+        when( toClasspathElementUri( same( parent ), same( classPathElement ), same( dumpDirectory ), anyBoolean() ) )
                 .thenCallRealMethod();
-        assertThat( toClasspathElementUri( parent, classPathElement, dumpDirectory ) )
+        assertThat( toClasspathElementUri( parent, classPathElement, dumpDirectory, true ).uri )
                 .isEqualTo( "../../../Users/me/.m2/repository/grp/art/1.0/art-1.0.jar" );
     }
 
@@ -135,9 +137,9 @@ public class JarManifestForkConfigurationTest
         when( classPathElement.toString() ).thenReturn( "C:\\Test User\\me\\.m2\\repository\\grp\\art\\1.0\\art-1.0.jar" );
         when( relativize( parent, classPathElement ) )
                 .thenReturn( "..\\..\\..\\Test User\\me\\.m2\\repository\\grp\\art\\1.0\\art-1.0.jar" );
-        when( toClasspathElementUri( same( parent ), same( classPathElement ), same( dumpDirectory ) ) )
+        when( toClasspathElementUri( same( parent ), same( classPathElement ), same( dumpDirectory ), anyBoolean() ) )
                 .thenCallRealMethod();
-        assertThat( toClasspathElementUri( parent, classPathElement, dumpDirectory ) )
+        assertThat( toClasspathElementUri( parent, classPathElement, dumpDirectory, true ).uri )
                 .isEqualTo( "../../../Test%20User/me/.m2/repository/grp/art/1.0/art-1.0.jar" );
     }
 
@@ -164,11 +166,11 @@ public class JarManifestForkConfigurationTest
                 } );
         when( relativize( same( parent ), same( classPathElement ) ) )
                 .thenThrow( new IllegalArgumentException() );
-        when( toClasspathElementUri( same( parent ), same( classPathElement ), same( dumpDirectory ) ) )
+        when( toClasspathElementUri( same( parent ), same( classPathElement ), same( dumpDirectory ), anyBoolean() ) )
                 .thenCallRealMethod();
         when( toAbsoluteUri( same( classPathElement ) ) )
                 .thenCallRealMethod();
-        assertThat( toClasspathElementUri( parent, classPathElement, dumpDirectory ) )
+        assertThat( toClasspathElementUri( parent, classPathElement, dumpDirectory, true ).uri )
                 .isEqualTo( "file:///X:/Users/me/.m2/repository/grp/art/1.0/art-1.0.jar" );
     }
 
@@ -213,9 +215,9 @@ public class JarManifestForkConfigurationTest
         Path testDir = new File( TMP, "@3 test with white spaces" )
                 .toPath();
 
-        String testDirUriPath = toClasspathElementUri( parentDir, testDir, dumpDirectory );
+        ClasspathElementUri testDirUriPath = toClasspathElementUri( parentDir, testDir, dumpDirectory, true );
 
-        assertThat( testDirUriPath )
+        assertThat( testDirUriPath.uri )
                 .isEqualTo( "../@3%20test%20with%20white%20spaces" );
     }
 }

Reply | Threaded
Open this post in threaded view
|

[maven-surefire] 04/04: workspace in TMP for Windows builds

Tibor Digana
In reply to this post by Tibor Digana
This is an automated email from the ASF dual-hosted git repository.

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

commit fb0cb53f5f2e858d9b327e3db70f091810d2b044
Author: Tibor17 <[hidden email]>
AuthorDate: Fri Dec 7 01:24:26 2018 +0100

    workspace in TMP for Windows builds
---
 Jenkinsfile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 365035b..e1af6c2 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -66,7 +66,9 @@ oses.eachWithIndex { osMapping, indexOfOs ->
                         def boolean makeReports = indexOfOs == 0 && indexOfMaven == 0 && indexOfJdk == 0
                         def failsafeItPort = 8000 + 100 * indexOfMaven + 10 * indexOfJdk
                         def allOptions = options + ["-Dfailsafe-integration-test-port=${failsafeItPort}", "-Dfailsafe-integration-test-stop-port=${1 + failsafeItPort}"]
-                        buildProcess(stageKey, jdkName, jdkTestName, mvnName, goals, allOptions, mavenOpts, makeReports)
+                        ws(dir: "${os == 'windows' ? "${TEMP}/${BUILD_TAG}" : pwd()}") {
+                            buildProcess(stageKey, jdkName, jdkTestName, mvnName, goals, allOptions, mavenOpts, makeReports)
+                        }
                     }
                 }
             }