This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dependency-analyzer.git
The following commit(s) were added to refs/heads/master by this push:
new fbfbbd6 Simplify jarWithCompileDependency IT
fbfbbd6 is described below
commit fbfbbd68b6224336242f370dadd2429472fc808c
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Tue Nov 10 17:12:32 2026 +0100
Simplify jarWithCompileDependency IT
Replace guava with javax.inject:1 to avoid volatile external dependency
bumps and drop the unused test source from the integration test.
---
src/it/jarWithCompileDependency/project2/pom.xml | 6 ++---
.../project2/Project2.java | 4 +--
.../project2/Project2Test.java | 31 ----------------------
src/it/jarWithCompileDependency/verify.groovy | 2 +-
4 files changed, 6 insertions(+), 37 deletions(-)
diff --git a/src/it/jarWithCompileDependency/project2/pom.xml
b/src/it/jarWithCompileDependency/project2/pom.xml
index e1eb889..abe8368 100644
--- a/src/it/jarWithCompileDependency/project2/pom.xml
+++ b/src/it/jarWithCompileDependency/project2/pom.xml
@@ -37,9 +37,9 @@
<version>1.0</version>
</dependency>
<dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>32.0.0-android</version>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ <version>1</version>
</dependency>
</dependencies>
diff --git
a/src/it/jarWithCompileDependency/project2/src/main/java/jarWithCompileDependency/project2/Project2.java
b/src/it/jarWithCompileDependency/project2/src/main/java/jarWithCompileDependency/project2/Project2.java
index c634c86..354d627 100644
---
a/src/it/jarWithCompileDependency/project2/src/main/java/jarWithCompileDependency/project2/Project2.java
+++
b/src/it/jarWithCompileDependency/project2/src/main/java/jarWithCompileDependency/project2/Project2.java
@@ -20,7 +20,7 @@ package jarWithCompileDependency.project2;
*/
import jarWithCompileDependency.project1.Project1;
-import com.google.common.base.Strings;
+import javax.inject.Inject;
/**
*
@@ -32,6 +32,6 @@ public class Project2
public Project2()
{
Project1 project = new Project1();
- System.out.println(Strings.emptyToNull("this"));
+ System.out.println(Inject.class.getName());
}
}
diff --git
a/src/it/jarWithCompileDependency/project2/src/test/java/jarWithCompileDependency/project2/Project2Test.java
b/src/it/jarWithCompileDependency/project2/src/test/java/jarWithCompileDependency/project2/Project2Test.java
deleted file mode 100644
index ea8eb88..0000000
---
a/src/it/jarWithCompileDependency/project2/src/test/java/jarWithCompileDependency/project2/Project2Test.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package jarWithCompileDependency.project2;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import jarWithCompileDependency.project1.Project1;
-import com.google.common.base.Preconditions;
-
-public class Project2Test
-{
- public Project2Test()
- {
- Preconditions.checkNotNull("");
- }
-}
diff --git a/src/it/jarWithCompileDependency/verify.groovy
b/src/it/jarWithCompileDependency/verify.groovy
index 7b84572..6637c85 100644
--- a/src/it/jarWithCompileDependency/verify.groovy
+++ b/src/it/jarWithCompileDependency/verify.groovy
@@ -22,7 +22,7 @@ def analysis = new File( basedir,
'project2/target/analysis.txt' ).text
def expected = '''
UsedDeclaredArtifacts:
org.apache.maven.shared.dependency-analyzer.tests:jarWithCompileDependency1:jar:1.0:compile
- com.google.guava:guava:jar:32.0.0-android:compile
+ javax.inject:javax.inject:jar:1:compile
UsedUndeclaredArtifactsWithClasses: