You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2026/10/14 11:09:38 UTC

(maven-dependency-plugin) branch master updated: Serve the copy, unpack, properties and tree IT fixtures from the mock repository

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-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 4f4ae64f Serve the copy, unpack, properties and tree IT fixtures from the mock repository
4f4ae64f is described below

commit 4f4ae64f1c77b167723d9d166c9b15ff04c69dc0
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Tue Oct 13 21:06:06 2026 +0200

    Serve the copy, unpack, properties and tree IT fixtures from the mock repository
    
    These ITs need some artifact, not JUnit specifically. The unpack ITs now carry a root LICENSE.txt, so their *.txt exclude check can fail; JUnit's jar had no such file. The analyze ITs keep JUnit because they analyse a real test dependency.
---
 .../repository/unpack-fixture-1.0.jar/LICENSE.txt} | 16 +++----------
 .../unpack-fixture-1.0.jar/META-INF/MANIFEST.MF    |  1 +
 .../fixture/fixture.properties                     | 20 +++++++++++++++++
 .../maven/its/dependency/fixture/nested.txt}       | 16 +++----------
 .../unpack-fixture-1.0.jar/stylesheet.css}         | 16 +++----------
 src/it/mrm/repository/unpack-fixture-1.0.pom       | 26 ++++++++++++++++++++++
 .../pom.xml                                        | 12 +++++-----
 .../verify.groovy                                  |  6 ++---
 src/it/projects/dependency-properties/pom.xml      |  6 ++---
 .../projects/dependency-properties/verify.groovy   |  6 ++---
 src/it/projects/filterunpack/pom.xml               |  6 ++---
 src/it/projects/tree-verbose-small/expected.txt    |  4 ++--
 src/it/projects/tree-verbose-small/pom.xml         |  6 ++---
 .../unpack-dependencies-with-filemappers/pom.xml   |  6 ++---
 .../verify.groovy                                  |  6 ++---
 src/it/projects/unpack-dependencies/pom.xml        |  6 ++---
 src/it/projects/unpack-dependencies/verify.groovy  |  4 ++--
 17 files changed, 90 insertions(+), 73 deletions(-)

diff --git a/src/it/projects/unpack-dependencies/verify.groovy b/src/it/mrm/repository/unpack-fixture-1.0.jar/LICENSE.txt
similarity index 70%
copy from src/it/projects/unpack-dependencies/verify.groovy
copy to src/it/mrm/repository/unpack-fixture-1.0.jar/LICENSE.txt
index 6cd581f7..b8f1ea53 100644
--- a/src/it/projects/unpack-dependencies/verify.groovy
+++ b/src/it/mrm/repository/unpack-fixture-1.0.jar/LICENSE.txt
@@ -6,9 +6,9 @@
  * 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
@@ -17,14 +17,4 @@
  * under the License.
  */
 
-for ( item in ['org', 'junit'] )
-{
-    def file = new File( basedir, 'target/dependency/' + item )
-    assert file.exists() : "Missing " + file.name
-}
-
-for ( item in ['META-INF', 'LICENSE.TXT'] )
-{
-    def file = new File( basedir, 'target/dependency/' + item )
-    assert !file.exists() : "This file shouldn't be here: " + file.name
-}
+Root text file that the unpack ITs exclude with *.txt.
diff --git a/src/it/mrm/repository/unpack-fixture-1.0.jar/META-INF/MANIFEST.MF b/src/it/mrm/repository/unpack-fixture-1.0.jar/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..9d885be5
--- /dev/null
+++ b/src/it/mrm/repository/unpack-fixture-1.0.jar/META-INF/MANIFEST.MF
@@ -0,0 +1 @@
+Manifest-Version: 1.0
diff --git a/src/it/mrm/repository/unpack-fixture-1.0.jar/fixture/fixture.properties b/src/it/mrm/repository/unpack-fixture-1.0.jar/fixture/fixture.properties
new file mode 100644
index 00000000..3512cc57
--- /dev/null
+++ b/src/it/mrm/repository/unpack-fixture-1.0.jar/fixture/fixture.properties
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+fixture=true
diff --git a/src/it/projects/unpack-dependencies/verify.groovy b/src/it/mrm/repository/unpack-fixture-1.0.jar/org/apache/maven/its/dependency/fixture/nested.txt
similarity index 70%
copy from src/it/projects/unpack-dependencies/verify.groovy
copy to src/it/mrm/repository/unpack-fixture-1.0.jar/org/apache/maven/its/dependency/fixture/nested.txt
index 6cd581f7..1f45d71c 100644
--- a/src/it/projects/unpack-dependencies/verify.groovy
+++ b/src/it/mrm/repository/unpack-fixture-1.0.jar/org/apache/maven/its/dependency/fixture/nested.txt
@@ -6,9 +6,9 @@
  * 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
@@ -17,14 +17,4 @@
  * under the License.
  */
 
-for ( item in ['org', 'junit'] )
-{
-    def file = new File( basedir, 'target/dependency/' + item )
-    assert file.exists() : "Missing " + file.name
-}
-
-for ( item in ['META-INF', 'LICENSE.TXT'] )
-{
-    def file = new File( basedir, 'target/dependency/' + item )
-    assert !file.exists() : "This file shouldn't be here: " + file.name
-}
+Text file below the root, which *.txt does not exclude.
diff --git a/src/it/projects/unpack-dependencies/verify.groovy b/src/it/mrm/repository/unpack-fixture-1.0.jar/stylesheet.css
similarity index 70%
copy from src/it/projects/unpack-dependencies/verify.groovy
copy to src/it/mrm/repository/unpack-fixture-1.0.jar/stylesheet.css
index 6cd581f7..085799dc 100644
--- a/src/it/projects/unpack-dependencies/verify.groovy
+++ b/src/it/mrm/repository/unpack-fixture-1.0.jar/stylesheet.css
@@ -6,9 +6,9 @@
  * 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
@@ -17,14 +17,4 @@
  * under the License.
  */
 
-for ( item in ['org', 'junit'] )
-{
-    def file = new File( basedir, 'target/dependency/' + item )
-    assert file.exists() : "Missing " + file.name
-}
-
-for ( item in ['META-INF', 'LICENSE.TXT'] )
-{
-    def file = new File( basedir, 'target/dependency/' + item )
-    assert !file.exists() : "This file shouldn't be here: " + file.name
-}
+body {}
diff --git a/src/it/mrm/repository/unpack-fixture-1.0.pom b/src/it/mrm/repository/unpack-fixture-1.0.pom
new file mode 100644
index 00000000..e1cbe041
--- /dev/null
+++ b/src/it/mrm/repository/unpack-fixture-1.0.pom
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.its.dependency</groupId>
+  <artifactId>unpack-fixture</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+</project>
diff --git a/src/it/projects/copy-and-unpack-with-alternate-local-repo/pom.xml b/src/it/projects/copy-and-unpack-with-alternate-local-repo/pom.xml
index b39dec31..33daba16 100644
--- a/src/it/projects/copy-and-unpack-with-alternate-local-repo/pom.xml
+++ b/src/it/projects/copy-and-unpack-with-alternate-local-repo/pom.xml
@@ -53,9 +53,9 @@
               <localRepositoryDirectory>${project.build.directory}/repo</localRepositoryDirectory>
               <artifactItems>
                 <artifactItem>
-                  <groupId>junit</groupId>
-                  <artifactId>junit</artifactId>
-                  <version>3.8.1</version>
+                  <groupId>org.apache.maven.its.dependency</groupId>
+                  <artifactId>unpack-fixture</artifactId>
+                  <version>1.0</version>
                 </artifactItem>
               </artifactItems>
             </configuration>
@@ -69,9 +69,9 @@
               <localRepositoryDirectory>${project.build.directory}/repo</localRepositoryDirectory>
               <artifactItems>
                 <artifactItem>
-                  <groupId>junit</groupId>
-                  <artifactId>junit</artifactId>
-                  <version>3.8.1</version>
+                  <groupId>org.apache.maven.its.dependency</groupId>
+                  <artifactId>unpack-fixture</artifactId>
+                  <version>1.0</version>
                 </artifactItem>
               </artifactItems>
             </configuration>
diff --git a/src/it/projects/copy-and-unpack-with-alternate-local-repo/verify.groovy b/src/it/projects/copy-and-unpack-with-alternate-local-repo/verify.groovy
index c88f5873..1968fbbc 100644
--- a/src/it/projects/copy-and-unpack-with-alternate-local-repo/verify.groovy
+++ b/src/it/projects/copy-and-unpack-with-alternate-local-repo/verify.groovy
@@ -20,14 +20,14 @@
 import java.io.*;
 
 
-File file = new File( basedir, "target/dependency/junit-3.8.1.jar" );
+File file = new File( basedir, "target/dependency/unpack-fixture-1.0.jar" );
 
 assert file.isFile() : "Missing " + file;
 
-file = new File( basedir, "target/dependency/junit" );
+file = new File( basedir, "target/dependency/fixture" );
 assert file.isDirectory() : "Missing " + file;
 
-file = new File( basedir, "target/repo/junit/junit/3.8.1/junit-3.8.1.jar" );
+file = new File( basedir, "target/repo/org/apache/maven/its/dependency/unpack-fixture/1.0/unpack-fixture-1.0.jar" );
 assert file.isFile() : "Missing " + file;
 
 return true;
diff --git a/src/it/projects/dependency-properties/pom.xml b/src/it/projects/dependency-properties/pom.xml
index af48e5a5..246859ef 100644
--- a/src/it/projects/dependency-properties/pom.xml
+++ b/src/it/projects/dependency-properties/pom.xml
@@ -79,9 +79,9 @@
       <version>2.0.9</version>
     </dependency>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.13.2</version>
+      <groupId>org.apache.maven.its.dependency</groupId>
+      <artifactId>unpack-fixture</artifactId>
+      <version>1.0</version>
     </dependency>
   </dependencies>
 
diff --git a/src/it/projects/dependency-properties/verify.groovy b/src/it/projects/dependency-properties/verify.groovy
index cb58a61d..88081094 100644
--- a/src/it/projects/dependency-properties/verify.groovy
+++ b/src/it/projects/dependency-properties/verify.groovy
@@ -24,9 +24,9 @@ File projectProperties = new File( basedir, "target/project.properties" );
 Properties props = new Properties();
 props.load( new FileInputStream( projectProperties ) );
 
-String junitJarPath = props.getProperty( "junit:junit:jar" );
-assert junitJarPath != null : "junit:junit:jar is null";
-assert (new File( junitJarPath )).isFile() : "junit jar is not a file: " + junitJarPath;
+String fixtureJarPath = props.getProperty( "org.apache.maven.its.dependency:unpack-fixture:jar" );
+assert fixtureJarPath != null : "org.apache.maven.its.dependency:unpack-fixture:jar is null";
+assert (new File( fixtureJarPath )).isFile() : "unpack-fixture jar is not a file: " + fixtureJarPath;
 
 String mavenArtifactPath = props.getProperty( "org.apache.maven:maven-artifact:jar" );
 assert mavenArtifactPath != null : "org.apache.maven:maven-artifact:jar is null";
diff --git a/src/it/projects/filterunpack/pom.xml b/src/it/projects/filterunpack/pom.xml
index 0494d84c..edac2ea5 100644
--- a/src/it/projects/filterunpack/pom.xml
+++ b/src/it/projects/filterunpack/pom.xml
@@ -30,9 +30,9 @@
 
     <dependencies>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>3.8.2</version>
+            <groupId>org.apache.maven.its.dependency</groupId>
+            <artifactId>unpack-fixture</artifactId>
+            <version>1.0</version>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/src/it/projects/tree-verbose-small/expected.txt b/src/it/projects/tree-verbose-small/expected.txt
index 611614c1..96751215 100644
--- a/src/it/projects/tree-verbose-small/expected.txt
+++ b/src/it/projects/tree-verbose-small/expected.txt
@@ -1,4 +1,4 @@
 org.apache.maven.its.dependency:tree-verbose2:jar:1.0-SNAPSHOT
 +- commons-logging:commons-logging:jar:1.2:compile
-\- junit:junit:jar:4.13.2:test
-   \- org.hamcrest:hamcrest-core:jar:1.3:test
+\- org.apache.maven.its.dependency:b-with-dep:jar:1.0.0:test
+   \- org.apache.maven.its.dependency:c-without-dep:jar:1.0.0:test
diff --git a/src/it/projects/tree-verbose-small/pom.xml b/src/it/projects/tree-verbose-small/pom.xml
index 10487939..2531a92d 100644
--- a/src/it/projects/tree-verbose-small/pom.xml
+++ b/src/it/projects/tree-verbose-small/pom.xml
@@ -43,9 +43,9 @@
       <version>1.2</version>
     </dependency>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.13.2</version>
+      <groupId>org.apache.maven.its.dependency</groupId>
+      <artifactId>b-with-dep</artifactId>
+      <version>1.0.0</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
diff --git a/src/it/projects/unpack-dependencies-with-filemappers/pom.xml b/src/it/projects/unpack-dependencies-with-filemappers/pom.xml
index 90a7d060..4bde45f5 100644
--- a/src/it/projects/unpack-dependencies-with-filemappers/pom.xml
+++ b/src/it/projects/unpack-dependencies-with-filemappers/pom.xml
@@ -40,9 +40,9 @@
 
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.13.2</version>
+      <groupId>org.apache.maven.its.dependency</groupId>
+      <artifactId>unpack-fixture</artifactId>
+      <version>1.0</version>
     </dependency>
   </dependencies>
 
diff --git a/src/it/projects/unpack-dependencies-with-filemappers/verify.groovy b/src/it/projects/unpack-dependencies-with-filemappers/verify.groovy
index f5a21691..07f3838a 100644
--- a/src/it/projects/unpack-dependencies-with-filemappers/verify.groovy
+++ b/src/it/projects/unpack-dependencies-with-filemappers/verify.groovy
@@ -17,14 +17,14 @@
  * under the License.
  */
 
-for ( item in ['org', 'junit'] )
+for ( item in ['org', 'fixture', 'org/apache/maven/its/dependency/fixture/nested.txt'] )
 {
     def file = new File( basedir, 'target/dependency/mapped/' + item )
     assert file.exists() : "Missing " + file.name
 }
 
-for ( item in ['META-INF', 'LICENSE.TXT'] )
+for ( item in ['META-INF', 'LICENSE.txt'] )
 {
-    def file = new File( basedir, 'target/dependency/' + item )
+    def file = new File( basedir, 'target/dependency/mapped/' + item )
     assert !file.exists() : "This file shouldn't be here: " + file.name
 }
diff --git a/src/it/projects/unpack-dependencies/pom.xml b/src/it/projects/unpack-dependencies/pom.xml
index 216e4edf..9f676b0a 100644
--- a/src/it/projects/unpack-dependencies/pom.xml
+++ b/src/it/projects/unpack-dependencies/pom.xml
@@ -40,9 +40,9 @@
 
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.13.2</version>
+      <groupId>org.apache.maven.its.dependency</groupId>
+      <artifactId>unpack-fixture</artifactId>
+      <version>1.0</version>
     </dependency>
   </dependencies>
 
diff --git a/src/it/projects/unpack-dependencies/verify.groovy b/src/it/projects/unpack-dependencies/verify.groovy
index 6cd581f7..8e0f7f43 100644
--- a/src/it/projects/unpack-dependencies/verify.groovy
+++ b/src/it/projects/unpack-dependencies/verify.groovy
@@ -17,13 +17,13 @@
  * under the License.
  */
 
-for ( item in ['org', 'junit'] )
+for ( item in ['org', 'fixture', 'org/apache/maven/its/dependency/fixture/nested.txt'] )
 {
     def file = new File( basedir, 'target/dependency/' + item )
     assert file.exists() : "Missing " + file.name
 }
 
-for ( item in ['META-INF', 'LICENSE.TXT'] )
+for ( item in ['META-INF', 'LICENSE.txt'] )
 {
     def file = new File( basedir, 'target/dependency/' + item )
     assert !file.exists() : "This file shouldn't be here: " + file.name