You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2021/01/01 19:30:56 UTC

[maven-integration-testing] branch MNG-7020 updated (1d3fa1a -> 0c899ec)

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

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


    omit 1d3fa1a  [MNG-7020] Remove Maven 2 WagonExcluder backward compat code
     add 7dffabb  [MNG-7046] Revert MNG-5639 and make repo config static only
     add 5a8858f  [MNG-4660] Increase usefulness of logging
     new 0c899ec  [MNG-7020] Remove Maven 2 WagonExcluder backward compat code

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (1d3fa1a)
            \
             N -- N -- N   refs/heads/MNG-7020 (0c899ec)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 .../it/MavenITmng4660OutdatedPackagedArtifact.java | 66 +++++++++++++++++++---
 ...MavenITmng5639ImportScopePomResolutionTest.java |  2 +-
 2 files changed, 60 insertions(+), 8 deletions(-)


[maven-integration-testing] 01/01: [MNG-7020] Remove Maven 2 WagonExcluder backward compat code

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

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

commit 0c899ece85f500204a23f211cb2a5fedd6983e64
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Fri Nov 13 23:29:19 2020 +0100

    [MNG-7020] Remove Maven 2 WagonExcluder backward compat code
    
    * Disable unused tests
    * Update Maven 2 plugins to Maven 3 to avoid conflicts with old Maven
      and Wagon 1
    
    This closes #78
---
 core-it-suite/pom.xml                              |  2 +-
 .../it/MavenITmng3652UserAgentHeaderTest.java      | 63 ++++------------------
 ...528ExcludeWagonsFromMavenCoreArtifactsTest.java |  2 +-
 .../maven/it/MavenITmng5669ReadPomsOnce.java       | 12 ++---
 .../test/resources/mng-3652/test-plugin/pom.xml    | 12 ++---
 .../test/resources/mng-3652/test-project/pom.xml   |  2 +-
 .../test/resources/mng-5669-read-poms-once/pom.xml | 10 ++--
 7 files changed, 30 insertions(+), 73 deletions(-)

diff --git a/core-it-suite/pom.xml b/core-it-suite/pom.xml
index f6e3a10..1d051fb 100644
--- a/core-it-suite/pom.xml
+++ b/core-it-suite/pom.xml
@@ -257,7 +257,7 @@ under the License.
         <dependency>
           <groupId>org.apache.maven.wagon</groupId>
           <artifactId>wagon-webdav-jackrabbit</artifactId>
-          <version>2.0</version>
+          <version>3.0.0</version>
           <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3652UserAgentHeaderTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3652UserAgentHeaderTest.java
index d5f392b..5ca50ea 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3652UserAgentHeaderTest.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3652UserAgentHeaderTest.java
@@ -50,7 +50,7 @@ public class MavenITmng3652UserAgentHeaderTest
 
     public MavenITmng3652UserAgentHeaderTest()
     {
-        super( "[2.1.0-M1,3.0-alpha-1),[3.0-beta-3,)" ); // 2.1.0-M1+
+        super( "[3.0-beta-3,)" );
     }
 
     @Override
@@ -139,21 +139,13 @@ public class MavenITmng3652UserAgentHeaderTest
         // NOTE: system property for maven.version may not exist if you use -Dtest
         // surefire parameter to run this single test. Therefore, the plugin writes
         // the maven version into the check file.
-        String mavenVersion = getMavenUAVersion( lines.get( 0 ) );
+        String mavenVersion = lines.get( 0 );
         String javaVersion = lines.get( 1 );
         String os = lines.get( 2 ) + " " + lines.get( 3 );
         String artifactVersion = lines.get( 4 );
 
-        if ( matchesVersionRange( "(,3.0-beta-3)" ) )
-        {
-            assertEquals( "Comparing User-Agent '" + userAgent + "'", "Apache-Maven/" + mavenVersion + " (Java "
-                + javaVersion + "; " + os + ")" + " maven-artifact/" + artifactVersion, userAgent );
-        }
-        else
-        {
-            assertEquals( "Comparing User-Agent '" + userAgent + "'", "Apache-Maven/" + mavenVersion + " (Java "
-                + javaVersion + "; " + os + ")", userAgent );
-        }
+        assertEquals( "Comparing User-Agent '" + userAgent + "'", "Apache-Maven/" + mavenVersion + " (Java "
+            + javaVersion + "; " + os + ")", userAgent );
     }
 
     public void testmng3652_UnConfiguredDAV()
@@ -188,7 +180,7 @@ public class MavenITmng3652UserAgentHeaderTest
         // NOTE: system property for maven.version may not exist if you use -Dtest
         // surefire parameter to run this single test. Therefore, the plugin writes
         // the maven version into the check file.
-        String mavenVersion = getMavenUAVersion( lines.get( 0 ) );
+        String mavenVersion = lines.get( 0 );
         String javaVersion = lines.get( 1 );
         String os = lines.get( 2 ) + " " + lines.get( 3 );
         String artifactVersion = lines.get( 4 );
@@ -196,16 +188,8 @@ public class MavenITmng3652UserAgentHeaderTest
         String userAgent = this.userAgent;
         assertNotNull( userAgent );
 
-        if ( matchesVersionRange( "(,3.0-beta-3)" ) )
-        {
-            assertEquals( "Comparing User-Agent '" + userAgent + "'", "Apache-Maven/" + mavenVersion + " (Java "
-                + javaVersion + "; " + os + ")" + " maven-artifact/" + artifactVersion, userAgent );
-        }
-        else
-        {
-            assertEquals( "Comparing User-Agent '" + userAgent + "'", "Apache-Maven/" + mavenVersion + " (Java "
-                + javaVersion + "; " + os + ")", userAgent );
-        }
+        assertEquals( "Comparing User-Agent '" + userAgent + "'", "Apache-Maven/" + mavenVersion + " (Java "
+            + javaVersion + "; " + os + ")", userAgent );
     }
 
     public void testmng3652_ConfigurationInSettingsWithoutUserAgent()
@@ -242,7 +226,7 @@ public class MavenITmng3652UserAgentHeaderTest
         // NOTE: system property for maven.version may not exist if you use -Dtest
         // surefire parameter to run this single test. Therefore, the plugin writes
         // the maven version into the check file.
-        String mavenVersion = getMavenUAVersion( lines.get( 0 ) );
+        String mavenVersion = lines.get( 0 );
         String javaVersion = lines.get( 1 );
         String os = lines.get( 2 ) + " " + lines.get( 3 );
         String artifactVersion = lines.get( 4 );
@@ -250,25 +234,13 @@ public class MavenITmng3652UserAgentHeaderTest
         String userAgent = this.userAgent;
         assertNotNull( userAgent );
 
-        if ( matchesVersionRange( "(,3.0-beta-3)" ) )
-        {
-            assertEquals( "Comparing User-Agent '" + userAgent + "'", "Apache-Maven/" + mavenVersion + " (Java "
-                + javaVersion + "; " + os + ")" + " maven-artifact/" + artifactVersion, userAgent );
-        }
-        else
-        {
-            assertEquals( "Comparing User-Agent '" + userAgent + "'", "Apache-Maven/" + mavenVersion + " (Java "
-                + javaVersion + "; " + os + ")", userAgent );
-        }
+        assertEquals( "Comparing User-Agent '" + userAgent + "'", "Apache-Maven/" + mavenVersion + " (Java "
+            + javaVersion + "; " + os + ")", userAgent );
     }
 
     public void testmng3652_UserAgentConfiguredInSettings()
         throws Exception
     {
-        // customizing version not supported in Maven 3
-        //requiresMavenVersion( "(,3.0-beta-3)" );
-        requiresMavenVersion("[2.1.0-M1,3.0-alpha-1),[3.0-beta-3,)");
-
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3652" );
         File pluginDir = new File( testDir, "test-plugin" );
         File projectDir = new File( testDir, "test-project" );
@@ -302,9 +274,6 @@ public class MavenITmng3652UserAgentHeaderTest
     public void testmng3652_AdditionnalHttpHeaderConfiguredInSettings()
         throws Exception
     {
-        // customizing version not supported in Maven 3
-        requiresMavenVersion("[2.1.0-M1,3.0-alpha-1),[3.0-beta-3,)");
-
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3652" );
         File pluginDir = new File( testDir, "test-plugin" );
         File projectDir = new File( testDir, "test-project" );
@@ -335,16 +304,4 @@ public class MavenITmng3652UserAgentHeaderTest
         assertEquals( "My wonderful header", customHeader );
     }
 
-    private String getMavenUAVersion( String mavenVersion )
-    {
-        if ( matchesVersionRange( "(,3.0-beta-3)" ) )
-        {
-            return mavenVersion.substring( 0, 3 );
-        }
-        else
-        {
-            // Maven 3 returns the whole version
-            return mavenVersion;
-        }
-    }
 }
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4528ExcludeWagonsFromMavenCoreArtifactsTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4528ExcludeWagonsFromMavenCoreArtifactsTest.java
index 2732863..162a2d1 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4528ExcludeWagonsFromMavenCoreArtifactsTest.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4528ExcludeWagonsFromMavenCoreArtifactsTest.java
@@ -36,7 +36,7 @@ public class MavenITmng4528ExcludeWagonsFromMavenCoreArtifactsTest
 
     public MavenITmng4528ExcludeWagonsFromMavenCoreArtifactsTest()
     {
-        super( "[2.0.5,3.0-alpha-1),[3.0-alpha-7,)" );
+        super( "[2.0.5,3.0-alpha-1),[3.0-alpha-7,4.0.0-alpha-1)" );
     }
 
     /**
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java
index de432d5..117a9fb 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java
@@ -74,10 +74,10 @@ public class MavenITmng5669ReadPomsOnce
                 break;
             }
         }
-        assertEquals( logTxt.toString(), 168, logTxt.size() );
+        assertEquals( logTxt.toString(), 239, logTxt.size() );
 
         // analyze lines. It is a Hashmap, so we can't rely on the order
-        Set<String> uniqueBuildingSources = new HashSet<>( 168 );
+        Set<String> uniqueBuildingSources = new HashSet<>( 239 );
         final String buildSourceKey = "org.apache.maven.model.building.source=";
         final int keyLength = buildSourceKey.length();
         for ( String line : logTxt )
@@ -95,7 +95,7 @@ public class MavenITmng5669ReadPomsOnce
             }
             uniqueBuildingSources.add( line.substring( start + keyLength, end ) );
         }
-        assertEquals( uniqueBuildingSources.size(), 167 /* is 168 minus superpom */ );
+        assertEquals( uniqueBuildingSources.size(), 238 /* is 239 minus superpom */ );
     }
 
     public void testWithBuildConsumer()
@@ -128,11 +128,11 @@ public class MavenITmng5669ReadPomsOnce
                 break;
             }
         }
-        assertEquals( logTxt.toString(), 168 + 4 /* reactor poms are read twice: file + raw (=XMLFilters) */,
+        assertEquals( logTxt.toString(), 239 + 4 /* reactor poms are read twice: file + raw (=XMLFilters) */,
                       logTxt.size() );
 
         // analyze lines. It is a Hashmap, so we can't rely on the order
-        Set<String> uniqueBuildingSources = new HashSet<>( 168 );
+        Set<String> uniqueBuildingSources = new HashSet<>( 239 );
         final String buildSourceKey = "org.apache.maven.model.building.source=";
         final int keyLength = buildSourceKey.length();
         for ( String line : logTxt )
@@ -150,7 +150,7 @@ public class MavenITmng5669ReadPomsOnce
             }
             uniqueBuildingSources.add( line.substring( start + keyLength, end ) );
         }
-        assertEquals( uniqueBuildingSources.size(), 167 /* is 168 minus superpom */ );
+        assertEquals( uniqueBuildingSources.size(), 238 /* is 239 minus superpom */ );
     }
 
 }
diff --git a/core-it-suite/src/test/resources/mng-3652/test-plugin/pom.xml b/core-it-suite/src/test/resources/mng-3652/test-plugin/pom.xml
index 76bda67..3206281 100644
--- a/core-it-suite/src/test/resources/mng-3652/test-plugin/pom.xml
+++ b/core-it-suite/src/test/resources/mng-3652/test-plugin/pom.xml
@@ -10,13 +10,13 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.maven</groupId>
-      <artifactId>maven-artifact-manager</artifactId>
-      <version>2.0.9</version>
+      <artifactId>maven-compat</artifactId>
+      <version>3.0-beta-3</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
-      <version>2.0</version>
+      <version>3.0-beta-3</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
@@ -25,9 +25,9 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-    	<groupId>org.apache.maven</groupId>
-    	<artifactId>maven-core</artifactId>
-    	<version>2.0.9</version>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>3.0-beta-3</version>
     </dependency>
   </dependencies>
 </project>
diff --git a/core-it-suite/src/test/resources/mng-3652/test-project/pom.xml b/core-it-suite/src/test/resources/mng-3652/test-project/pom.xml
index f07a5dd..6e5ded4 100644
--- a/core-it-suite/src/test/resources/mng-3652/test-project/pom.xml
+++ b/core-it-suite/src/test/resources/mng-3652/test-project/pom.xml
@@ -25,7 +25,7 @@
       <extension>
         <groupId>org.apache.maven.wagon</groupId>
         <artifactId>wagon-webdav-jackrabbit</artifactId>
-        <version>2.0</version>
+        <version>3.0.0</version>
       </extension>
     </extensions>
   </build>
diff --git a/core-it-suite/src/test/resources/mng-5669-read-poms-once/pom.xml b/core-it-suite/src/test/resources/mng-5669-read-poms-once/pom.xml
index 7701325..ef6b140 100644
--- a/core-it-suite/src/test/resources/mng-5669-read-poms-once/pom.xml
+++ b/core-it-suite/src/test/resources/mng-5669-read-poms-once/pom.xml
@@ -39,25 +39,25 @@ under the License.
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-resources-plugin</artifactId>
-          <version>2.6</version>
+          <version>3.2.0</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
-          <version>3.1</version>
+          <version>3.8.1</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.12.4</version>
+          <version>3.0.0-M5</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-jar-plugin</artifactId>
-          <version>2.4</version>
+          <version>3.2.0</version>
         </plugin>
       </plugins>
     </pluginManagement>
   </build>
 
-</project>
\ No newline at end of file
+</project>