You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2023/02/24 21:23:59 UTC
[maven-integration-testing] branch 5669-BF created (now 11cfbf792)
This is an automated email from the ASF dual-hosted git repository.
sjaranowski pushed a change to branch 5669-BF
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
at 11cfbf792 MavenITmng5669ReadPomsOnce and BF collector
This branch includes the following new commits:
new 11cfbf792 MavenITmng5669ReadPomsOnce and BF collector
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: MavenITmng5669ReadPomsOnce and BF collector
Posted by sj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sjaranowski pushed a commit to branch 5669-BF
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit 11cfbf792ce0b481ce83cb50826fdee80a96225e
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Fri Feb 24 22:22:43 2023 +0100
MavenITmng5669ReadPomsOnce and BF collector
---
.../maven/it/MavenITmng5669ReadPomsOnce.java | 37 ++++++++++++++++++----
run-its.sh | 2 +-
2 files changed, 32 insertions(+), 7 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 c07f1b0c1..9cd9a9e07 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
@@ -48,7 +48,30 @@ public class MavenITmng5669ReadPomsOnce
}
@Test
- public void testWithoutBuildConsumer()
+ public void testWithoutBuildConsumerDF() throws Exception
+ {
+ testWithoutBuildConsumer( "df" );
+ }
+
+ @Test
+ public void testWithoutBuildConsumerBF() throws Exception
+ {
+ testWithoutBuildConsumer( "bf" );
+ }
+
+ @Test
+ public void testWithBuildConsumerDF() throws Exception
+ {
+ testWithBuildConsumer( "df" );
+ }
+
+ @Test
+ public void testWithBuildConsumerBF() throws Exception
+ {
+ testWithBuildConsumer( "bf" );
+ }
+
+ public void testWithoutBuildConsumer(String dependencyCollector)
throws Exception
{
// prepare JavaAgent
@@ -59,15 +82,17 @@ public class MavenITmng5669ReadPomsOnce
verifier.getArtifactPath( "org.apache.maven.its", "core-it-javaagent", "2.1-SNAPSHOT", "jar" ) );
verifier.filterFile( ".mvn/jvm.config", ".mvn/jvm.config", null, filterProperties );
+ verifier.setLogFileName( dependencyCollector + "-log.txt" );
verifier.setForkJvm( true ); // pick up agent
verifier.setAutoclean( false );
verifier.addCliArgument( "-q" );
verifier.addCliArgument( "-U" );
+ verifier.addCliArgument( "-Daether.dependencyCollector.impl=" + dependencyCollector );
verifier.addCliArgument( "-Dmaven.experimental.buildconsumer=false" );
verifier.addCliArgument( "verify");
verifier.execute();
- List<String> logTxt = verifier.loadLines( "log.txt", "utf-8" );
+ List<String> logTxt = verifier.loadLines( dependencyCollector + "-log.txt", "utf-8" );
// count source items
Map<String, Long> sourceMap = logTxt.stream()
@@ -84,8 +109,7 @@ public class MavenITmng5669ReadPomsOnce
assertTrue("Duplicate items: " + String.join(System.lineSeparator(), duplicates), duplicates.isEmpty());
}
- @Test
- public void testWithBuildConsumer()
+ public void testWithBuildConsumer(String dependencyCollector)
throws Exception
{
// prepare JavaAgent
@@ -96,16 +120,17 @@ public class MavenITmng5669ReadPomsOnce
verifier.getArtifactPath( "org.apache.maven.its", "core-it-javaagent", "2.1-SNAPSHOT", "jar" ) );
verifier.filterFile( ".mvn/jvm.config", ".mvn/jvm.config", null, filterProperties );
- verifier.setLogFileName( "log-bc.txt" );
+ verifier.setLogFileName( dependencyCollector + "-log-bc.txt" );
verifier.setForkJvm( true ); // pick up agent
verifier.setAutoclean( false );
verifier.addCliArgument( "-q" );
verifier.addCliArgument( "-U" );
+ verifier.addCliArgument( "-Daether.dependencyCollector.impl=" + dependencyCollector );
verifier.addCliArgument( "-Dmaven.experimental.buildconsumer=true" );
verifier.addCliArgument( "verify" );
verifier.execute();
- List<String> logTxt = verifier.loadLines( "log-bc.txt", "utf-8" );
+ List<String> logTxt = verifier.loadLines( dependencyCollector + "-log-bc.txt", "utf-8" );
// count source items
Map<String, Long> sourceMap = logTxt.stream()
diff --git a/run-its.sh b/run-its.sh
index c438cbb5b..4e1bf3efc 100755
--- a/run-its.sh
+++ b/run-its.sh
@@ -25,7 +25,7 @@
# For Jdk 7 use with -Dhttps.protocols=TLSv1.2
# mvn clean install -Prun-its,embedded -Dmaven.repo.local=`pwd`/repo -Dhttps.protocols=TLSv1.2
-mvn clean install -Prun-its,embedded -Dmaven.repo.local=`pwd`/repo
+mvn clean install -Prun-its,embedded -Dmaven.repo.local=`pwd`/repo "$@"
# If behind a proxy try this