You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2020/05/27 19:11:19 UTC

[maven-integration-testing] branch MNG-6919 created (now 8e21091)

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

rfscholte pushed a change to branch MNG-6919
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git.


      at 8e21091  [MMNG-6919] test with spaced path

This branch includes the following new commits:

     new 8e21091  [MMNG-6919] test with spaced path

The 1 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.



[maven-integration-testing] 01/01: [MMNG-6919] test with spaced path

Posted by rf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8e21091139476f55fdec83c590802ebd988c4f2a
Author: rfscholte <rf...@apache.org>
AuthorDate: Wed May 27 21:11:04 2020 +0200

    [MMNG-6919] test with spaced path
---
 .../maven/it/MavenITmng5937MavenWrapper.java       | 37 +++++++++++++++++++++-
 .../script => mng-5937 wrapper/bin}/pom.xml        |  5 +--
 .../bin => mng-5937 wrapper/properties}/pom.xml    |  4 +--
 .../source => mng-5937 wrapper/script}/pom.xml     |  5 +--
 .../bin => mng-5937 wrapper/source}/pom.xml        |  5 +--
 5 files changed, 41 insertions(+), 15 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 3beb03c..915786c 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
@@ -1,5 +1,7 @@
 package org.apache.maven.it;
 
+import java.io.BufferedWriter;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -21,8 +23,11 @@ package org.apache.maven.it;
 
 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;
+import java.nio.file.StandardOpenOption;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -40,7 +45,7 @@ public class MavenITmng5937MavenWrapper
     
     private final Map<String,String> envVars;
     
-    private final Path baseDir = Paths.get( "target/test-classes/mng-5937-wrapper" );
+    private final Path baseDir = Paths.get( "target/test-classes/mng-5937 wrapper" );
     
     private ZipUnArchiver zipUnArchiver = new ZipUnArchiver();
     
@@ -135,6 +140,36 @@ public class MavenITmng5937MavenWrapper
         verifier.resetStreams();
     }
 
+    public void testitMNG5937WrapperProperties()
+                    throws Exception
+    {
+        final File testDir = baseDir.resolve( "properties" ).toFile();
+        
+        unpack( testDir.toPath(), "bin" );
+        
+        Path p = baseDir.resolve( "properties/.mvn/wrapper/maven-wrapper.properties" );
+        try ( BufferedWriter out = Files.newBufferedWriter( p, StandardOpenOption.TRUNCATE_EXISTING ) )
+        {
+            String localRepo = System.getProperty("maven.repo.local");
+            out.append( "distributionUrl = " + Paths.get( localRepo ).toUri().toURL().toString() )
+               .append( "org/apache/maven/apache-maven/")
+               .append( getMavenVersion().toString() )
+               .append( "/apache-maven-")
+               .append( getMavenVersion().toString() )
+               .append( "-bin.zip" );
+        }
+
+        envVars.remove( "MVNW_REPOURL" );
+        envVars.put( "MAVEN_BASEDIR", testDir.getAbsolutePath() );
+
+        Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+        verifier.setAutoclean( false );
+        verifier.setDebug( true );
+        verifier.executeGoal( "validate", envVars );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+    }
+
     private void unpack( Path target, String classifier ) throws IOException
     {
         Path distro = wrapperDistro.resolve( "apache-maven-wrapper-" + getMavenVersion() + '-' + classifier + ".zip" );
diff --git a/core-it-suite/src/test/resources/mng-5937-wrapper/script/pom.xml b/core-it-suite/src/test/resources/mng-5937 wrapper/bin/pom.xml
similarity index 89%
rename from core-it-suite/src/test/resources/mng-5937-wrapper/script/pom.xml
rename to core-it-suite/src/test/resources/mng-5937 wrapper/bin/pom.xml
index 5ceadeb..05b46fa 100644
--- a/core-it-suite/src/test/resources/mng-5937-wrapper/script/pom.xml
+++ b/core-it-suite/src/test/resources/mng-5937 wrapper/bin/pom.xml	
@@ -22,10 +22,7 @@ under the License.
 <project>
   <modelVersion>4.0.0</modelVersion>
 
-  <groupId>org.apache.maven.its.mng5936</groupId>
+  <groupId>org.apache.maven.its.mng5937</groupId>
   <artifactId>test</artifactId>
   <version>1</version>
-
-  <name>Maven Integration Test :: MNG-5979</name> 
-
 </project>
diff --git a/core-it-suite/src/test/resources/mng-5937-wrapper/bin/pom.xml b/core-it-suite/src/test/resources/mng-5937 wrapper/properties/pom.xml
similarity index 90%
copy from core-it-suite/src/test/resources/mng-5937-wrapper/bin/pom.xml
copy to core-it-suite/src/test/resources/mng-5937 wrapper/properties/pom.xml
index 5ceadeb..195a849 100644
--- a/core-it-suite/src/test/resources/mng-5937-wrapper/bin/pom.xml
+++ b/core-it-suite/src/test/resources/mng-5937 wrapper/properties/pom.xml	
@@ -22,10 +22,10 @@ under the License.
 <project>
   <modelVersion>4.0.0</modelVersion>
 
-  <groupId>org.apache.maven.its.mng5936</groupId>
+  <groupId>org.apache.maven.its.mng5937</groupId>
   <artifactId>test</artifactId>
   <version>1</version>
 
-  <name>Maven Integration Test :: MNG-5979</name> 
+  <name>Maven Integration Test :: MNG-5937</name> 
 
 </project>
diff --git a/core-it-suite/src/test/resources/mng-5937-wrapper/source/pom.xml b/core-it-suite/src/test/resources/mng-5937 wrapper/script/pom.xml
similarity index 89%
rename from core-it-suite/src/test/resources/mng-5937-wrapper/source/pom.xml
rename to core-it-suite/src/test/resources/mng-5937 wrapper/script/pom.xml
index 5ceadeb..05b46fa 100644
--- a/core-it-suite/src/test/resources/mng-5937-wrapper/source/pom.xml
+++ b/core-it-suite/src/test/resources/mng-5937 wrapper/script/pom.xml	
@@ -22,10 +22,7 @@ under the License.
 <project>
   <modelVersion>4.0.0</modelVersion>
 
-  <groupId>org.apache.maven.its.mng5936</groupId>
+  <groupId>org.apache.maven.its.mng5937</groupId>
   <artifactId>test</artifactId>
   <version>1</version>
-
-  <name>Maven Integration Test :: MNG-5979</name> 
-
 </project>
diff --git a/core-it-suite/src/test/resources/mng-5937-wrapper/bin/pom.xml b/core-it-suite/src/test/resources/mng-5937 wrapper/source/pom.xml
similarity index 89%
rename from core-it-suite/src/test/resources/mng-5937-wrapper/bin/pom.xml
rename to core-it-suite/src/test/resources/mng-5937 wrapper/source/pom.xml
index 5ceadeb..05b46fa 100644
--- a/core-it-suite/src/test/resources/mng-5937-wrapper/bin/pom.xml
+++ b/core-it-suite/src/test/resources/mng-5937 wrapper/source/pom.xml	
@@ -22,10 +22,7 @@ under the License.
 <project>
   <modelVersion>4.0.0</modelVersion>
 
-  <groupId>org.apache.maven.its.mng5936</groupId>
+  <groupId>org.apache.maven.its.mng5937</groupId>
   <artifactId>test</artifactId>
   <version>1</version>
-
-  <name>Maven Integration Test :: MNG-5979</name> 
-
 </project>