This is an automated email from the ASF dual-hosted git repository.
cstamas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
The following commit(s) were added to refs/heads/master by this push:
new 96c6121a2 [MNG-8347] Additional tests (#398)
96c6121a2 is described below
commit 96c6121a22ffd9f267b5f278b885b897b986c240
Author: Tamas Cservenak <[email protected]>
AuthorDate: Tue Oct 29 10:00:06 2024 +0100
[MNG-8347] Additional tests (#398)
Add additional cases as original test is not the full story.
Make sure tree is same even if pushed down a level (in Maven3 is not)
---
https://issues.apache.org/jira/browse/MNG-8347
---
...enITmng8347TransitiveDependencyManagerTest.java | 52 ++++++++++++++++++++++
.../src/test/resources/mng-8347-bnd-plugin/pom.xml | 17 +++++++
.../mng-8347-quarkus-tls-registry/pom.xml | 17 +++++++
3 files changed, 86 insertions(+)
diff --git
a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8347TransitiveDependencyManagerTest.java
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8347TransitiveDependencyManagerTest.java
index 875627f3f..82df4b8fd 100644
---
a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8347TransitiveDependencyManagerTest.java
+++
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8347TransitiveDependencyManagerTest.java
@@ -86,6 +86,58 @@ class MavenITmng8347TransitiveDependencyManagerTest extends
AbstractMavenIntegra
}
}
+ /**
+ * Mimic bnd-maven-plugin:7.0.0: have direct dependency on
plexus-build-api:0.0.7 and observe plexus-utils.
+ * Beta-5 makes it 1.5.5 while correct version is 1.5.8.
+ */
+ @Test
+ void useCaseBndPlugin() throws Exception {
+ File testDir = ResourceExtractor.simpleExtractResources(getClass(),
"/mng-8347-bnd-plugin");
+
+ Verifier verifier = new Verifier(testDir.getAbsolutePath());
+ verifier.addCliArgument("-V");
+ verifier.addCliArgument("dependency:3.8.0:tree");
+ verifier.addCliArgument("-Dmaven.repo.local.tail=" + testDir +
"/local-repo");
+ verifier.addCliArgument("-Dmaven.repo.local.tail.ignoreAvailability");
+ verifier.execute();
+ verifier.verifyErrorFreeLog();
+
+ List<String> l = verifier.loadLines(verifier.getLogFileName(),
"UTF-8");
+ if (matchesVersionRange("[4.0.0-beta-5]")) {
+ a(l, "[INFO] org.apache.maven.it.mresolver614:root:jar:1.0.0");
+ a(l, "[INFO] \\-
org.sonatype.plexus:plexus-build-api:jar:0.0.7:compile");
+ a(l, "[INFO] \\-
org.codehaus.plexus:plexus-utils:jar:1.5.5:compile");
+ } else {
+ a(l, "[INFO] org.apache.maven.it.mresolver614:root:jar:1.0.0");
+ a(l, "[INFO] \\-
org.sonatype.plexus:plexus-build-api:jar:0.0.7:compile");
+ a(l, "[INFO] \\-
org.codehaus.plexus:plexus-utils:jar:1.5.8:compile");
+ }
+ }
+
+ /**
+ * Make Quarkus TLS Registry first level dependency and make sure expected
stuff are present.
+ */
+ @Test
+ void useCaseQuarkusTlsRegistry() throws Exception {
+ File testDir = ResourceExtractor.simpleExtractResources(getClass(),
"/mng-8347-quarkus-tls-registry");
+
+ Verifier verifier = new Verifier(testDir.getAbsolutePath());
+ verifier.addCliArgument("-V");
+ verifier.addCliArgument("dependency:3.8.0:tree");
+ verifier.addCliArgument("-Dmaven.repo.local.tail=" + testDir +
"/local-repo");
+ verifier.addCliArgument("-Dmaven.repo.local.tail.ignoreAvailability");
+ verifier.execute();
+ verifier.verifyErrorFreeLog();
+
+ // this really boils down to "transitive" vs "non-transitive"
+ List<String> l = verifier.loadLines(verifier.getLogFileName(),
"UTF-8");
+ if (matchesVersionRange("[,4.0.0-alpha-11)")) {
+ a(l, "[INFO] | | | \\-
com.fasterxml.jackson.core:jackson-core:jar:2.16.1:compile");
+ } else {
+ a(l, "[INFO] | | | \\-
com.fasterxml.jackson.core:jackson-core:jar:2.17.2:compile");
+ }
+ }
+
/**
* Assert true, log lines contains string...
*/
diff --git a/core-it-suite/src/test/resources/mng-8347-bnd-plugin/pom.xml
b/core-it-suite/src/test/resources/mng-8347-bnd-plugin/pom.xml
new file mode 100644
index 000000000..c2c2620ce
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-8347-bnd-plugin/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.it.mresolver614</groupId>
+ <artifactId>root</artifactId>
+ <version>1.0.0</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-build-api</artifactId>
+ <version>0.0.7</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git
a/core-it-suite/src/test/resources/mng-8347-quarkus-tls-registry/pom.xml
b/core-it-suite/src/test/resources/mng-8347-quarkus-tls-registry/pom.xml
new file mode 100644
index 000000000..1234fed8f
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-8347-quarkus-tls-registry/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.it.mresolver614</groupId>
+ <artifactId>root</artifactId>
+ <version>1.0.0</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-tls-registry</artifactId>
+ <version>3.15.1</version>
+ </dependency>
+ </dependencies>
+</project>