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 2022/07/30 12:33:16 UTC

[maven-dependency-analyzer] 01/01: [MSHARED-1119] Cleanup IT tests

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

sjaranowski pushed a commit to branch MSHARED-1119
in repository https://gitbox.apache.org/repos/asf/maven-dependency-analyzer.git

commit 9bfbaa67633e080b199d1310d0f9a908ffbfba97
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Sat Jul 30 14:32:44 2022 +0200

    [MSHARED-1119] Cleanup IT tests
    
    - use Maven version form project
    - update dependencies in IT tests
---
 src/it/jarWithCompileScopedTestDependency/project2/pom.xml    | 2 +-
 src/it/jarWithCompileScopedTestDependency/verify.groovy       | 4 ++--
 src/it/jarWithRuntimeScopedTestDependency/project2/pom.xml    | 2 +-
 src/it/jarWithRuntimeScopedTestDependency/verify.groovy       | 2 +-
 src/it/jarWithTestDependency/project2/pom.xml                 | 2 +-
 src/it/jarWithTestDependency/verify.groovy                    | 2 +-
 src/it/java8methodRefs/pom.xml                                | 2 +-
 src/it/java8methodRefs/verify.groovy                          | 2 +-
 src/it/multimoduleProject/module1/pom.xml                     | 9 ++-------
 src/it/multimoduleProject/module1/src/main/java/foo/Main.java | 3 ---
 src/it/setup-mock-plugin/pom.xml                              | 8 ++++----
 src/site/site.xml                                             | 3 ++-
 12 files changed, 17 insertions(+), 24 deletions(-)

diff --git a/src/it/jarWithCompileScopedTestDependency/project2/pom.xml b/src/it/jarWithCompileScopedTestDependency/project2/pom.xml
index fe8d2f9..1c29918 100644
--- a/src/it/jarWithCompileScopedTestDependency/project2/pom.xml
+++ b/src/it/jarWithCompileScopedTestDependency/project2/pom.xml
@@ -41,7 +41,7 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>3.8.1</version>
+      <version>4.13.2</version>
     </dependency>
   </dependencies>
 
diff --git a/src/it/jarWithCompileScopedTestDependency/verify.groovy b/src/it/jarWithCompileScopedTestDependency/verify.groovy
index 86e0069..bb4c97e 100644
--- a/src/it/jarWithCompileScopedTestDependency/verify.groovy
+++ b/src/it/jarWithCompileScopedTestDependency/verify.groovy
@@ -22,14 +22,14 @@ def analysis = new File( basedir, 'project2/target/analysis.txt' ).text
 def expected = '''
 UsedDeclaredArtifacts:
  org.apache.maven.shared.dependency-analyzer.tests:jarWithCompileScopedTestDependency1:jar:1.0:test
- junit:junit:jar:3.8.1:compile
+ junit:junit:jar:4.13.2:compile
 
 UsedUndeclaredArtifactsWithClasses:
 
 UnusedDeclaredArtifacts:
 
 TestArtifactsWithNonTestScope:
- junit:junit:jar:3.8.1:compile
+ junit:junit:jar:4.13.2:compile
 '''
 
 assert analysis == expected
diff --git a/src/it/jarWithRuntimeScopedTestDependency/project2/pom.xml b/src/it/jarWithRuntimeScopedTestDependency/project2/pom.xml
index 04ca8aa..b90a312 100644
--- a/src/it/jarWithRuntimeScopedTestDependency/project2/pom.xml
+++ b/src/it/jarWithRuntimeScopedTestDependency/project2/pom.xml
@@ -41,7 +41,7 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>3.8.1</version>
+      <version>4.13.2</version>
       <scope>runtime</scope>
     </dependency>
   </dependencies>
diff --git a/src/it/jarWithRuntimeScopedTestDependency/verify.groovy b/src/it/jarWithRuntimeScopedTestDependency/verify.groovy
index 1144c86..aa6d0e2 100644
--- a/src/it/jarWithRuntimeScopedTestDependency/verify.groovy
+++ b/src/it/jarWithRuntimeScopedTestDependency/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:jarWithRuntimeScopedTestDependency1:jar:1.0:test
- junit:junit:jar:3.8.1:runtime
+ junit:junit:jar:4.13.2:runtime
 
 UsedUndeclaredArtifactsWithClasses:
 
diff --git a/src/it/jarWithTestDependency/project2/pom.xml b/src/it/jarWithTestDependency/project2/pom.xml
index 82b7d2a..ada683b 100644
--- a/src/it/jarWithTestDependency/project2/pom.xml
+++ b/src/it/jarWithTestDependency/project2/pom.xml
@@ -41,7 +41,7 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>3.8.1</version>
+      <version>4.13.2</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
diff --git a/src/it/jarWithTestDependency/verify.groovy b/src/it/jarWithTestDependency/verify.groovy
index 18b3be2..070a6bc 100644
--- a/src/it/jarWithTestDependency/verify.groovy
+++ b/src/it/jarWithTestDependency/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:jarWithTestDependency1:jar:1.0:test
- junit:junit:jar:3.8.1:test
+ junit:junit:jar:4.13.2:test
 
 UsedUndeclaredArtifactsWithClasses:
 
diff --git a/src/it/java8methodRefs/pom.xml b/src/it/java8methodRefs/pom.xml
index b8df6a7..5a2b98c 100644
--- a/src/it/java8methodRefs/pom.xml
+++ b/src/it/java8methodRefs/pom.xml
@@ -35,7 +35,7 @@
     <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
-      <version>2.4</version>
+      <version>2.11.0</version>
     </dependency>
     <dependency>
       <groupId>commons-lang</groupId>
diff --git a/src/it/java8methodRefs/verify.groovy b/src/it/java8methodRefs/verify.groovy
index 8fcd177..72d74d6 100644
--- a/src/it/java8methodRefs/verify.groovy
+++ b/src/it/java8methodRefs/verify.groovy
@@ -21,7 +21,7 @@ def analysis = new File( basedir, 'target/analysis.txt' ).text
 
 def expected = '''
 UsedDeclaredArtifacts:
- commons-io:commons-io:jar:2.4:compile
+ commons-io:commons-io:jar:2.11.0:compile
  commons-lang:commons-lang:jar:2.6:compile
 
 UsedUndeclaredArtifactsWithClasses:
diff --git a/src/it/multimoduleProject/module1/pom.xml b/src/it/multimoduleProject/module1/pom.xml
index 279c95a..0818547 100644
--- a/src/it/multimoduleProject/module1/pom.xml
+++ b/src/it/multimoduleProject/module1/pom.xml
@@ -32,20 +32,15 @@
   <artifactId>test-module1</artifactId>
 
   <dependencies>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-project</artifactId>
-      <version>2.0.6</version>
-    </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-artifact</artifactId>
-      <version>2.0.6</version>
+      <version>@mavenVersion@</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-model</artifactId>
-      <version>2.0.6</version>
+      <version>@mavenVersion@</version>
     </dependency>
   </dependencies>
 </project>
diff --git a/src/it/multimoduleProject/module1/src/main/java/foo/Main.java b/src/it/multimoduleProject/module1/src/main/java/foo/Main.java
index 7ca91f7..a333a53 100644
--- a/src/it/multimoduleProject/module1/src/main/java/foo/Main.java
+++ b/src/it/multimoduleProject/module1/src/main/java/foo/Main.java
@@ -19,7 +19,6 @@
 package foo;
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.repository.metadata.Metadata;
 import org.apache.maven.model.Model;
 
 public class Main
@@ -27,6 +26,4 @@ public class Main
     public static final String SCOPE_COMPILE = Artifact.SCOPE_COMPILE;
 
     public Model model = null;
-
-    public Metadata metadata = null;
 }
diff --git a/src/it/setup-mock-plugin/pom.xml b/src/it/setup-mock-plugin/pom.xml
index f5e3241..509185e 100644
--- a/src/it/setup-mock-plugin/pom.xml
+++ b/src/it/setup-mock-plugin/pom.xml
@@ -37,19 +37,19 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-core</artifactId>
-      <version>3.2.5</version>
+      <version>@mavenVersion@</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
-      <version>3.2.5</version>
+      <version>@mavenVersion@</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-tools-annotations</artifactId>
-      <version>3.6.4</version>
+      <version>@maven.plugin.tools.version@</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
@@ -65,7 +65,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-plugin-plugin</artifactId>
-          <version>3.6.4</version>
+          <version>@maven.plugin.tools.version@</version>
         </plugin>
       </plugins>
     </pluginManagement>
diff --git a/src/site/site.xml b/src/site/site.xml
index 45215f4..2a9880f 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -19,7 +19,8 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<project xmlns="http://maven.apache.org/DECORATION/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
+<project xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 http://maven.apache.org/xsd/decoration-1.8.0.xsd">
   <body>
     <menu name="Overview">
       <item name="Introduction" href="index.html"/>