You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mt...@apache.org on 2020/09/23 11:56:51 UTC

[maven-integration-testing] branch mng-6118-submodule-invocation created (now b57beb4)

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

mthmulders pushed a change to branch mng-6118-submodule-invocation
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git.


      at b57beb4  Merge branch 'master' into mng-6118-submodule-invocation

This branch includes the following new commits:

     new 2bf1e26  [MNG-6118] Hopefully fixing the corrupt filesystem issues on GitHub Actions runners by copying the test resources at the start of every test instead of once in the constructor.
     new eab5bd1  Merge remote-tracking branch 'origin/master' into mng-6118-submodule-invocation
     new 36b7269  [MNG-6118] Override MAVEN_BASEDIR environment variable
     new b57beb4  Merge branch 'master' into mng-6118-submodule-invocation

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.



[maven-integration-testing] 01/04: [MNG-6118] Hopefully fixing the corrupt filesystem issues on GitHub Actions runners by copying the test resources at the start of every test instead of once in the constructor.

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

mthmulders pushed a commit to branch mng-6118-submodule-invocation
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git

commit 2bf1e26e3bb7b6c16ca24d3d16eae2e177c5e463
Author: Martin Kanters <ma...@apache.org>
AuthorDate: Wed Aug 5 21:40:27 2020 +0200

    [MNG-6118] Hopefully fixing the corrupt filesystem issues on GitHub Actions runners by copying the test resources at the start of every test instead of once in the constructor.
---
 .../it/MavenITmng6118SubmoduleInvocation.java      | 25 ++++++++++++++++------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6118SubmoduleInvocation.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6118SubmoduleInvocation.java
index 8b3724b..cbc8dd0 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6118SubmoduleInvocation.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6118SubmoduleInvocation.java
@@ -39,19 +39,20 @@ import java.io.IOException;
  */
 public class MavenITmng6118SubmoduleInvocation extends AbstractMavenIntegrationTestCase
 {
-    private final File testDir;
+    private static final String RESOURCE_PATH = "/mng-6118-submodule-invocation-full-reactor";
 
-    public MavenITmng6118SubmoduleInvocation() throws IOException, VerificationException
+    public MavenITmng6118SubmoduleInvocation()
     {
         super( "[3.7.0,)" );
-        this.testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-6118-submodule-invocation-full-reactor" );
     }
 
     /**
      * Performs a <code>cd app && mvn compile</code> invocation. Verifies that inter-module dependencies are resolved.
      */
-    public void testInSubModule() throws VerificationException
+    public void testInSubModule() throws IOException, VerificationException
     {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), RESOURCE_PATH );
+
         // Compile the whole project first.
         Verifier verifier = newVerifier( testDir.getAbsolutePath() );
         verifier.executeGoal( "compile" );
@@ -59,20 +60,24 @@ public class MavenITmng6118SubmoduleInvocation extends AbstractMavenIntegrationT
         final File submoduleDirectory = new File( testDir, "app" );
         verifier = newVerifier( submoduleDirectory.getAbsolutePath() );
         verifier.setAutoclean( false );
+        verifier.setLogFileName( "log-insubmodule.txt" );
         verifier.executeGoal( "compile" );
     }
 
     /**
      * Performs a <code>mvn -f app/pom.xml compile</code> invocation. Verifies that inter-module dependencies are resolved.
      */
-    public void testWithFile() throws VerificationException
+    public void testWithFile() throws IOException, VerificationException
     {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), RESOURCE_PATH );
+
         // Compile the whole project first.
         Verifier verifier = newVerifier( testDir.getAbsolutePath() );
         verifier.executeGoal( "compile" );
 
         verifier = newVerifier( testDir.getAbsolutePath() );
         verifier.setAutoclean( false );
+        verifier.setLogFileName( "log-withfile.txt" );
         verifier.addCliOption( "-f app/pom.xml" );
         verifier.executeGoal( "compile" );
     }
@@ -80,11 +85,14 @@ public class MavenITmng6118SubmoduleInvocation extends AbstractMavenIntegrationT
     /**
      * Performs a <code>mvn -f app/pom.xml -am compile</code> invocation. Verifies that dependent modules are also built.
      */
-    public void testWithFileAndAlsoMake() throws VerificationException
+    public void testWithFileAndAlsoMake() throws IOException, VerificationException
     {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), RESOURCE_PATH );
+
         Verifier verifier = newVerifier( testDir.getAbsolutePath() );
         verifier.addCliOption( "-am" );
         verifier.addCliOption( "-f app/pom.xml" );
+        verifier.setLogFileName( "log-withfilealsomake.txt" );
         verifier.executeGoal( "compile" );
         verifier.verifyTextInLog( "Building Maven Integration Test :: MNG-6118 :: Library 1.0" );
     }
@@ -92,11 +100,14 @@ public class MavenITmng6118SubmoduleInvocation extends AbstractMavenIntegrationT
     /**
      * Performs a <code>cd app && mvn compile -am</code> invocation. Verifies that dependent modules are also built.
      */
-    public void testInSubModuleWithAlsoMake() throws VerificationException
+    public void testInSubModuleWithAlsoMake() throws IOException, VerificationException
     {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), RESOURCE_PATH );
+
         File submoduleDirectory = new File( testDir, "app" );
         Verifier verifier = newVerifier( submoduleDirectory.getAbsolutePath() );
         verifier.addCliOption( "-am" );
+        verifier.setLogFileName( "log-insubmodulealsomake.txt" );
         verifier.executeGoal( "compile" );
         verifier.verifyTextInLog( "Building Maven Integration Test :: MNG-6118 :: Library 1.0" );
     }


[maven-integration-testing] 04/04: Merge branch 'master' into mng-6118-submodule-invocation

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

mthmulders pushed a commit to branch mng-6118-submodule-invocation
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git

commit b57beb421bc337c90898c0c605924d61ef4fb2d1
Merge: 36b7269 2dc4f0c
Author: Maarten Mulders <mt...@apache.org>
AuthorDate: Fri Sep 11 08:32:06 2020 +0200

    Merge branch 'master' into mng-6118-submodule-invocation

 .../org/apache/maven/it/IntegrationTestSuite.java  |  1 +
 ...mng6772NestedImportScopeRepositoryOverride.java | 95 ++++++++++++++++++++++
 .../pom-template.xml                               | 50 ++++++++++++
 .../org/apache/maven/its/mng6772/a/0.1/a-0.1.pom   | 41 ++++++++++
 .../org/apache/maven/its/mng6772/b/0.1/b-0.1.pom   | 39 +++++++++
 .../its/mng6772/dependency/0.1/dependency-0.1.pom  | 41 ++++++++++
 .../settings-override.xml                          | 23 ++++++
 .../mng-6772-override-in-project/pom-template.xml  | 53 ++++++++++++
 .../org/apache/maven/its/mng6772/a/0.1/a-0.1.pom   | 41 ++++++++++
 .../org/apache/maven/its/mng6772/b/0.1/b-0.1.pom   | 39 +++++++++
 .../settings-override.xml                          | 23 ++++++
 .../maven/it/AbstractMavenIntegrationTestCase.java | 38 ++++++++-
 pom.xml                                            |  2 +-
 13 files changed, 484 insertions(+), 2 deletions(-)

diff --cc core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
index 6f6e419,c717aca..50367ea
--- a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
@@@ -107,8 -107,8 +107,9 @@@ public class IntegrationTestSuit
          // -------------------------------------------------------------------------------------------------------------
          // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
  
 +        suite.addTestSuite( MavenITmng6118SubmoduleInvocation.class );
          suite.addTestSuite( MavenITmng6972AllowAccessToGraphPackageTest.class );
+         suite.addTestSuite( MavenITmng6772NestedImportScopeRepositoryOverride.class );
          suite.addTestSuite( MavenITmng6759TransitiveDependencyRepositoriesTest.class );
          suite.addTestSuite( MavenITmng6720FailFastTest.class );
          suite.addTestSuite( MavenITmng6656BuildConsumer.class );


[maven-integration-testing] 02/04: Merge remote-tracking branch 'origin/master' into mng-6118-submodule-invocation

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

mthmulders pushed a commit to branch mng-6118-submodule-invocation
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git

commit eab5bd1017e7247a463c390b6ca4613c368833a1
Merge: 2bf1e26 59bcf77
Author: Martin Kanters <ma...@apache.org>
AuthorDate: Wed Aug 5 21:42:53 2020 +0200

    Merge remote-tracking branch 'origin/master' into mng-6118-submodule-invocation
    
    # Conflicts:
    #	core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java

 .../org/apache/maven/it/IntegrationTestSuite.java  | 15 ++---
 .../maven/it/MavenITmng5175WagonHttpTest.java      |  3 +-
 ...avenITmng6972AllowAccessToGraphPackageTest.java | 70 ++++++++++++++++++++++
 .../build-plugin/pom.xml                           | 67 +++++++++++++++++++++
 .../example/BuildExtensionUsingGraphPackage.java   | 44 ++++++++++++++
 .../using-module/pom.xml                           | 38 ++++++++++++
 6 files changed, 229 insertions(+), 8 deletions(-)

diff --cc core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
index d9f6f2d,ee41a83..6f6e419
--- a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
@@@ -107,16 -107,11 +107,12 @@@ public class IntegrationTestSuit
          // -------------------------------------------------------------------------------------------------------------
          // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
  
 +        suite.addTestSuite( MavenITmng6118SubmoduleInvocation.class );
-         suite.addTestSuite( MavenITmng5760ResumeFeatureTest.class );
-         suite.addTestSuite( MavenITmng6656BuildConsumer.class );
-         suite.addTestSuite( MavenITmng6562WarnDefaultBindings.class );
-         suite.addTestSuite( MavenITmng5868NoDuplicateAttachedArtifacts.class );
-         suite.addTestSuite( MavenITmng5937MavenWrapper.class );
-         suite.addTestSuite( MavenITmng4660ResumeFromTest.class );
-         suite.addTestSuite( MavenITmng4660OutdatedPackagedArtifact.class );
+         suite.addTestSuite( MavenITmng6972AllowAccessToGraphPackageTest.class );
          suite.addTestSuite( MavenITmng6759TransitiveDependencyRepositoriesTest.class );
          suite.addTestSuite( MavenITmng6720FailFastTest.class );
+         suite.addTestSuite( MavenITmng6656BuildConsumer.class );
+         suite.addTestSuite( MavenITmng6562WarnDefaultBindings.class );
          suite.addTestSuite( MavenITmng6558ToolchainsBuildingEventTest.class );
          suite.addTestSuite( MavenITmng6506PackageAnnotationTest.class );
          suite.addTestSuite( MavenITmng6391PrintVersionTest.class );


[maven-integration-testing] 03/04: [MNG-6118] Override MAVEN_BASEDIR environment variable

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

mthmulders pushed a commit to branch mng-6118-submodule-invocation
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git

commit 36b72690a315fd23c82b9eef3666e90e7a11dce4
Author: Maarten Mulders <mt...@apache.org>
AuthorDate: Wed Sep 9 13:54:57 2020 +0200

    [MNG-6118] Override MAVEN_BASEDIR environment variable
---
 .../it/MavenITmng6118SubmoduleInvocation.java      | 28 +++++++++++-----------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6118SubmoduleInvocation.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6118SubmoduleInvocation.java
index cbc8dd0..6726056 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6118SubmoduleInvocation.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6118SubmoduleInvocation.java
@@ -23,6 +23,8 @@ import org.apache.maven.it.util.ResourceExtractor;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * This is a collection of test cases for <a href="https://issues.apache.org/jira/browse/MNG-6118">MNG-6118</a>,
@@ -40,10 +42,16 @@ import java.io.IOException;
 public class MavenITmng6118SubmoduleInvocation extends AbstractMavenIntegrationTestCase
 {
     private static final String RESOURCE_PATH = "/mng-6118-submodule-invocation-full-reactor";
+    private final File testDir;
+    private final Map<String, String> envVars = new HashMap<>();
 
-    public MavenITmng6118SubmoduleInvocation()
+    public MavenITmng6118SubmoduleInvocation() throws IOException
     {
         super( "[3.7.0,)" );
+        testDir = ResourceExtractor.simpleExtractResources( getClass(), RESOURCE_PATH );
+        // It seems MAVEN_BASEDIR isn't always properly set, so make sure to have the right value here
+        // as it is determined by the mvn script.
+        envVars.put( "MAVEN_BASEDIR", testDir.getAbsolutePath() );
     }
 
     /**
@@ -51,17 +59,15 @@ public class MavenITmng6118SubmoduleInvocation extends AbstractMavenIntegrationT
      */
     public void testInSubModule() throws IOException, VerificationException
     {
-        File testDir = ResourceExtractor.simpleExtractResources( getClass(), RESOURCE_PATH );
-
         // Compile the whole project first.
         Verifier verifier = newVerifier( testDir.getAbsolutePath() );
-        verifier.executeGoal( "compile" );
+        verifier.executeGoal( "compile", envVars );
 
         final File submoduleDirectory = new File( testDir, "app" );
         verifier = newVerifier( submoduleDirectory.getAbsolutePath() );
         verifier.setAutoclean( false );
         verifier.setLogFileName( "log-insubmodule.txt" );
-        verifier.executeGoal( "compile" );
+        verifier.executeGoal( "compile", envVars );
     }
 
     /**
@@ -69,8 +75,6 @@ public class MavenITmng6118SubmoduleInvocation extends AbstractMavenIntegrationT
      */
     public void testWithFile() throws IOException, VerificationException
     {
-        File testDir = ResourceExtractor.simpleExtractResources( getClass(), RESOURCE_PATH );
-
         // Compile the whole project first.
         Verifier verifier = newVerifier( testDir.getAbsolutePath() );
         verifier.executeGoal( "compile" );
@@ -79,7 +83,7 @@ public class MavenITmng6118SubmoduleInvocation extends AbstractMavenIntegrationT
         verifier.setAutoclean( false );
         verifier.setLogFileName( "log-withfile.txt" );
         verifier.addCliOption( "-f app/pom.xml" );
-        verifier.executeGoal( "compile" );
+        verifier.executeGoal( "compile", envVars );
     }
 
     /**
@@ -87,13 +91,11 @@ public class MavenITmng6118SubmoduleInvocation extends AbstractMavenIntegrationT
      */
     public void testWithFileAndAlsoMake() throws IOException, VerificationException
     {
-        File testDir = ResourceExtractor.simpleExtractResources( getClass(), RESOURCE_PATH );
-
         Verifier verifier = newVerifier( testDir.getAbsolutePath() );
         verifier.addCliOption( "-am" );
         verifier.addCliOption( "-f app/pom.xml" );
         verifier.setLogFileName( "log-withfilealsomake.txt" );
-        verifier.executeGoal( "compile" );
+        verifier.executeGoal( "compile", envVars );
         verifier.verifyTextInLog( "Building Maven Integration Test :: MNG-6118 :: Library 1.0" );
     }
 
@@ -102,13 +104,11 @@ public class MavenITmng6118SubmoduleInvocation extends AbstractMavenIntegrationT
      */
     public void testInSubModuleWithAlsoMake() throws IOException, VerificationException
     {
-        File testDir = ResourceExtractor.simpleExtractResources( getClass(), RESOURCE_PATH );
-
         File submoduleDirectory = new File( testDir, "app" );
         Verifier verifier = newVerifier( submoduleDirectory.getAbsolutePath() );
         verifier.addCliOption( "-am" );
         verifier.setLogFileName( "log-insubmodulealsomake.txt" );
-        verifier.executeGoal( "compile" );
+        verifier.executeGoal( "compile", envVars );
         verifier.verifyTextInLog( "Building Maven Integration Test :: MNG-6118 :: Library 1.0" );
     }
 }