This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch MNG-6890 in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit c722fae60b586e16f82ce90a17890c9bacec39f9 Author: Michael Osipov <micha...@apache.org> AuthorDate: Sun Nov 8 19:42:30 2020 +0100 [MNG-6890] MavenITmng5669ReadPomsOnce is unreliable Add explicit plugin versions to solve instability. --- .../maven/it/MavenITmng5669ReadPomsOnce.java | 12 ++--- .../src/test/resources/bootstrap/group-10/pom.xml | 60 ++++++++++++++++++++++ .../src/test/resources/bootstrap/group-8/pom.xml | 5 ++ .../src/test/resources/bootstrap/group-9/pom.xml | 10 ++++ .../test/resources/mng-5669-read-poms-once/pom.xml | 27 ++++++++++ 5 files changed, 108 insertions(+), 6 deletions(-) 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 666b647..f3bb8e5 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(), 224, 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<>( 224 ); 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(), 223 /* is 224 minus superpom */ ); } public void testWithBuildConsumer() @@ -127,11 +127,11 @@ public class MavenITmng5669ReadPomsOnce break; } } - assertEquals( logTxt.toString(), 168 + 4 /* reactor poms are read twice: file + raw (=XMLFilters) */, + assertEquals( logTxt.toString(), 224 + 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<>( 224 ); final String buildSourceKey = "org.apache.maven.model.building.source="; final int keyLength = buildSourceKey.length(); for ( String line : logTxt ) @@ -149,7 +149,7 @@ public class MavenITmng5669ReadPomsOnce } uniqueBuildingSources.add( line.substring( start + keyLength, end ) ); } - assertEquals( uniqueBuildingSources.size(), 167 /* is 168 minus superpom */ ); + assertEquals( uniqueBuildingSources.size(), 223 /* is 224 minus superpom */ ); } } diff --git a/core-it-suite/src/test/resources/bootstrap/group-10/pom.xml b/core-it-suite/src/test/resources/bootstrap/group-10/pom.xml index 674e5dd..f728cdc 100644 --- a/core-it-suite/src/test/resources/bootstrap/group-10/pom.xml +++ b/core-it-suite/src/test/resources/bootstrap/group-10/pom.xml @@ -44,5 +44,65 @@ under the License. <artifactId>plexus-utils</artifactId> <version>1.5.1</version> </dependency> + <dependency> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>3.2.0</version> + </dependency> + <dependency> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.1</version> + </dependency> + <dependency> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>3.0.0-M5</version> + </dependency> + <dependency> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>3.2.0</version> + </dependency> + <dependency> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>3.3</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-io</artifactId> + <version>1.0</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-archiver</artifactId> + <version>1.0</version> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm</artifactId> + <version>7.2</version> + </dependency> + <dependency> + <groupId>org.apache.maven.shared</groupId> + <artifactId>maven-shared-utils</artifactId> + <version>3.3.3</version> + </dependency> + <dependency> + <groupId>com.thoughtworks.qdox</groupId> + <artifactId>qdox</artifactId> + <version>2.0-M9</version> + </dependency> + <dependency> + <groupId>org.apache.maven.shared</groupId> + <artifactId>maven-common-artifact-filters</artifactId> + <version>3.1.0</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-java</artifactId> + <version>1.0.5</version> + </dependency> </dependencies> </project> diff --git a/core-it-suite/src/test/resources/bootstrap/group-8/pom.xml b/core-it-suite/src/test/resources/bootstrap/group-8/pom.xml index bf8f15c..40048ca 100644 --- a/core-it-suite/src/test/resources/bootstrap/group-8/pom.xml +++ b/core-it-suite/src/test/resources/bootstrap/group-8/pom.xml @@ -104,5 +104,10 @@ under the License. <artifactId>plexus-container-default</artifactId> <version>1.5.5</version> </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm</artifactId> + <version>6.2</version> + </dependency> </dependencies> </project> diff --git a/core-it-suite/src/test/resources/bootstrap/group-9/pom.xml b/core-it-suite/src/test/resources/bootstrap/group-9/pom.xml index afdc953..ddd38a2 100644 --- a/core-it-suite/src/test/resources/bootstrap/group-9/pom.xml +++ b/core-it-suite/src/test/resources/bootstrap/group-9/pom.xml @@ -45,9 +45,19 @@ under the License. <version>1.1</version> </dependency> <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-java</artifactId> + <version>0.9.10</version> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm</artifactId> + <version>4.1</version> + </dependency> </dependencies> </project> 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 bf11d6b..6d1b543 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 @@ -33,4 +33,31 @@ under the License. <module>module3</module> </modules> + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>3.2.0</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.1</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>3.0.0-M5</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>3.2.0</version> + </plugin> + </plugins> + </pluginManagement> + </build> + </project> \ No newline at end of file