You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2020/06/06 16:34:45 UTC

[maven-integration-testing] branch master updated: [MNG-5937] improved check & msg for unconfigured wrapper properties

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

hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git


The following commit(s) were added to refs/heads/master by this push:
     new d8d5955  [MNG-5937] improved check & msg for unconfigured wrapper properties
d8d5955 is described below

commit d8d59559a8370a70b65d972c114ec1660fb19785
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sat Jun 6 18:34:41 2020 +0200

    [MNG-5937] improved check & msg for unconfigured wrapper properties
---
 .../java/org/apache/maven/it/MavenITmng5937MavenWrapper.java   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5937MavenWrapper.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5937MavenWrapper.java
index 915786c..5610f9b 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5937MavenWrapper.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5937MavenWrapper.java
@@ -23,7 +23,6 @@ import java.io.BufferedWriter;
 
 import java.io.File;
 import java.io.IOException;
-import java.io.OutputStream;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
@@ -33,6 +32,7 @@ import java.util.Map;
 
 import org.codehaus.plexus.archiver.zip.ZipUnArchiver;
 import org.codehaus.plexus.logging.console.ConsoleLogger;
+import org.codehaus.plexus.util.StringUtils;
 
 /**
  * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-5937">MNG-5937</a>.
@@ -54,9 +54,9 @@ public class MavenITmng5937MavenWrapper
         super( "[3.7.0,)" );
         
         String mavenDist = System.getProperty( "maven.distro" );
-        if ( mavenDist == null )
+        if ( StringUtils.isEmpty( mavenDist ) )
         {
-            throw new IllegalStateException( "Missing maven.distro to test maven-wrapper" );
+            throw new IllegalStateException( "Missing maven.distro=${mavenDistro} parameter to test maven-wrapper: see run ITs instructions" );
         }
         
         Verifier distInstaller = newVerifier( baseDir.toAbsolutePath().toFile().toString() );
@@ -69,9 +69,9 @@ public class MavenITmng5937MavenWrapper
         distInstaller.executeGoal( "org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file" );
         
         String distroValue = System.getProperty( "maven.wrapper.distrodir" );
-        if ( distroValue == null )
+        if ( StringUtils.isEmpty( distroValue ) )
         {
-            throw new IllegalStateException( "Missing maven.wrapper.distrodir to test maven-wrapper" );
+            throw new IllegalStateException( "Missing maven.wrapper.distrodir=${wrapperDistroDir} parameter to test maven-wrapper: see run ITs instructions" );
         }
         wrapperDistro = Paths.get( distroValue );