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

Bukama pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-war-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new c943f1b  Use property for Plexus Utils version in ITs (#615)
c943f1b is described below

commit c943f1b81194c9a882870d5eb84391cf64c23b38
Author: Matthias Bünger <[email protected]>
AuthorDate: Sun May 24 18:47:40 2026 +0200

    Use property for Plexus Utils version in ITs (#615)
---
 pom.xml                                                    |  5 +++++
 src/it/MWAR-133/pom.xml                                    |  2 +-
 src/it/MWAR-427_update-without-clean/pom.xml               | 14 +++++++++-----
 src/it/MWAR-427_update-without-clean/verify.groovy         |  2 +-
 src/it/MWAR-441/pom.xml                                    |  7 +++++--
 src/it/MWAR-441/verify.groovy                              |  2 +-
 src/it/scoped-dependency-same-artifact/pom.xml             |  4 ++--
 src/it/scoped-dependency-same-artifact/verify.bsh          |  8 ++++----
 src/it/simple-war-no-webxml/pom.xml                        |  2 +-
 src/it/simple-war-no-webxml/verify.bsh                     |  4 ++--
 src/it/simple-war-project/pom.xml                          |  2 +-
 src/it/simple-war-project/verify.bsh                       |  4 ++--
 .../java/org/apache/maven/plugins/war/WarOverlaysTest.java |  2 +-
 13 files changed, 35 insertions(+), 23 deletions(-)

diff --git a/pom.xml b/pom.xml
index 2d8e478..53fcf32 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,6 +80,8 @@
     <mavenVersion>3.9.16</mavenVersion>
     <javaVersion>8</javaVersion>
 
+    <!-- Used in IT-->
+    <plexusUtilVersion>${version.plexus-utils}</plexusUtilVersion>
     <version.groovy-maven-plugin>2.1.1</version.groovy-maven-plugin>
     <version.groovy-all>2.4.21</version.groovy-all>
 
@@ -279,6 +281,9 @@
                 <goal>clean</goal>
                 <goal>package</goal>
               </goals>
+              <scriptVariables>
+                <plexusUtilVersion>${version.plexus-utils}</plexusUtilVersion>
+              </scriptVariables>
             </configuration>
           </plugin>
         </plugins>
diff --git a/src/it/MWAR-133/pom.xml b/src/it/MWAR-133/pom.xml
index e48ecc7..37d2c68 100644
--- a/src/it/MWAR-133/pom.xml
+++ b/src/it/MWAR-133/pom.xml
@@ -52,7 +52,7 @@ under the License.
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-      <version>3.0.24</version>
+      <version>@plexusUtilVersion@</version>
     </dependency>
   </dependencies>
 </project>
diff --git a/src/it/MWAR-427_update-without-clean/pom.xml 
b/src/it/MWAR-427_update-without-clean/pom.xml
index 49faa63..401a4f3 100644
--- a/src/it/MWAR-427_update-without-clean/pom.xml
+++ b/src/it/MWAR-427_update-without-clean/pom.xml
@@ -29,6 +29,8 @@ under the License.
 
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <!-- Pass the variable into the test project to be able to read them -->
+    <testPlexusUtilVersion>@plexusUtilVersion@</testPlexusUtilVersion>
   </properties>
 
   <build>
@@ -44,17 +46,18 @@ under the License.
       <plugin>
         <groupId>org.codehaus.gmaven</groupId>
         <artifactId>groovy-maven-plugin</artifactId>
-        <version>@version.groovy-maven-plugin@</version>
+        <version>2.1.1</version>
         <configuration>
           <source>
+            def plexusUtilVersion = project.properties['testPlexusUtilVersion']
             def fileToModify = new File(project.basedir, 'pom.xml')
             processFileInplace(fileToModify) { text ->
-              text.replaceAll(/3.0.24/,'3.0.23')
+              text.replaceAll(plexusUtilVersion,'3.0.23')
             }
             def processFileInplace(file, Closure processText) {
               file.write(processText(file.text))
             }
-            
+
             new File('src/main/webapp/root.html').renameTo 
'src/main/webapp/index.html'
           </source>
         </configuration>
@@ -62,10 +65,11 @@ under the License.
           <dependency>
             <groupId>org.codehaus.groovy</groupId>
             <artifactId>groovy-all</artifactId>
-            <version>@version.groovy-all@</version>
+            <version>2.4.21</version>
           </dependency>
         </dependencies>
       </plugin>
+
     </plugins>
   </build>
 
@@ -79,7 +83,7 @@ under the License.
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-      <version>3.0.24</version>
+      <version>@plexusUtilVersion@</version>
     </dependency>
   </dependencies>
   
diff --git a/src/it/MWAR-427_update-without-clean/verify.groovy 
b/src/it/MWAR-427_update-without-clean/verify.groovy
index cde566e..7577a60 100644
--- a/src/it/MWAR-427_update-without-clean/verify.groovy
+++ b/src/it/MWAR-427_update-without-clean/verify.groovy
@@ -22,5 +22,5 @@ assert 
warFile.getEntry('WEB-INF/lib/plexus-utils-3.0.23.jar') != null
 assert warFile.getEntry('WEB-INF/lib/mwar427-1.0-SNAPSHOT.jar') != null
 assert warFile.getEntry('index.html') != null
 
-assert warFile.getEntry('WEB-INF/lib/plexus-utils-3.0.24.jar') == null
+assert warFile.getEntry("WEB-INF/lib/plexus-utils-" + plexusUtilVersion + 
".jar") == null
 assert warFile.getEntry('root.html') != null // after MWAR-433, only 
WEB-INF/lib/ content is checked, other resources may be generated outside 
m-war-p
\ No newline at end of file
diff --git a/src/it/MWAR-441/pom.xml b/src/it/MWAR-441/pom.xml
index 0a30854..b1726bb 100644
--- a/src/it/MWAR-441/pom.xml
+++ b/src/it/MWAR-441/pom.xml
@@ -29,6 +29,8 @@ under the License.
 
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <!-- Pass the variable into the test project to be able to read them -->
+    <testPlexusUtilVersion>@plexusUtilVersion@</testPlexusUtilVersion>
   </properties>
 
   <build>
@@ -48,9 +50,10 @@ under the License.
         <version>@version.groovy-maven-plugin@</version>
         <configuration>
           <source>
+            def plexusUtilVersion = project.properties['testPlexusUtilVersion']
             def fileToModify = new File(project.basedir, 'pom.xml')
             processFileInplace(fileToModify) { text ->
-              text.replaceAll(/3.0.24/,'3.0.23')
+              text.replaceAll(plexusUtilVersion,'3.0.23')
             }
             def processFileInplace(file, Closure processText) {
               file.write(processText(file.text))
@@ -80,7 +83,7 @@ under the License.
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-      <version>3.0.24</version>
+      <version>@plexusUtilVersion@</version>
     </dependency>
   </dependencies>
   
diff --git a/src/it/MWAR-441/verify.groovy b/src/it/MWAR-441/verify.groovy
index 60fed72..148011e 100644
--- a/src/it/MWAR-441/verify.groovy
+++ b/src/it/MWAR-441/verify.groovy
@@ -22,5 +22,5 @@ assert 
warFile.getEntry('WEB-INF/lib/plexus-utils-3.0.23.jar') != null
 assert warFile.getEntry('WEB-INF/lib/mwar427-1.0-SNAPSHOT.jar') != null
 assert warFile.getEntry('index.html') != null
 
-assert warFile.getEntry('WEB-INF/lib/plexus-utils-3.0.24.jar') == null
+assert warFile.getEntry("WEB-INF/lib/plexus-utils-" + plexusUtilVersion + 
".jar") == null
 assert warFile.getEntry('root.html') == null // after MWAR-441, this path is 
also removed as outdated (with the '/' config in the pom).
diff --git a/src/it/scoped-dependency-same-artifact/pom.xml 
b/src/it/scoped-dependency-same-artifact/pom.xml
index ca657c1..bacebc3 100644
--- a/src/it/scoped-dependency-same-artifact/pom.xml
+++ b/src/it/scoped-dependency-same-artifact/pom.xml
@@ -41,13 +41,13 @@
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-      <version>3.0.24</version>
+      <version>@plexusUtilVersion@</version>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
       <classifier>sources</classifier>
-      <version>3.0.24</version>
+      <version>@plexusUtilVersion@</version>
     </dependency>
   </dependencies>
 </project>
\ No newline at end of file
diff --git a/src/it/scoped-dependency-same-artifact/verify.bsh 
b/src/it/scoped-dependency-same-artifact/verify.bsh
index 73333ee..923de9a 100644
--- a/src/it/scoped-dependency-same-artifact/verify.bsh
+++ b/src/it/scoped-dependency-same-artifact/verify.bsh
@@ -66,16 +66,16 @@ try
         return false;
     }
 
-    File plexusUtilsDependency = new File( libDir, "plexus-utils-3.0.24.jar" );
+    File plexusUtilsDependency = new File( libDir, "plexus-utils-" + 
plexusUtilVersion + ".jar" );
     if ( !plexusUtilsDependency.exists() || 
plexusUtilsDependency.isDirectory() )
     {
-        System.err.println( "plexus-utils-3.0.24.jar is missing or a 
directory." );
+        System.err.println( "plexus-utils-" + plexusUtilVersion + ".jar is 
missing or a directory." );
         return false;
     }
-    File plexusUtilsSourceDependency = new File( libDir, 
"plexus-utils-3.0.24-sources.jar" );
+    File plexusUtilsSourceDependency = new File( libDir, "plexus-utils-" + 
plexusUtilVersion + "-sources.jar" );
     if ( !plexusUtilsSourceDependency.exists() || 
plexusUtilsSourceDependency.isDirectory() )
     {
-        System.err.println( "plexus-utils-3.0.24-sources.jar is missing or a 
directory." );
+        System.err.println( "plexus-utils-" + plexusUtilVersion + 
"-sources.jar is missing or a directory." );
         return false;
     }
 }
diff --git a/src/it/simple-war-no-webxml/pom.xml 
b/src/it/simple-war-no-webxml/pom.xml
index 769e2c7..a5fe1d5 100644
--- a/src/it/simple-war-no-webxml/pom.xml
+++ b/src/it/simple-war-no-webxml/pom.xml
@@ -41,7 +41,7 @@
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-      <version>3.0.24</version>
+      <version>@plexusUtilVersion@</version>
     </dependency>
   </dependencies>
 </project>
\ No newline at end of file
diff --git a/src/it/simple-war-no-webxml/verify.bsh 
b/src/it/simple-war-no-webxml/verify.bsh
index d40331e..332353d 100644
--- a/src/it/simple-war-no-webxml/verify.bsh
+++ b/src/it/simple-war-no-webxml/verify.bsh
@@ -66,10 +66,10 @@ try
         return false;
     }
 
-    File plexusUtilsDependency = new File( libDir, "plexus-utils-3.0.24.jar" );
+    File plexusUtilsDependency = new File( libDir, "plexus-utils-" + 
plexusUtilVersion + ".jar" );
     if ( !plexusUtilsDependency.exists() || 
plexusUtilsDependency.isDirectory() )
     {
-        System.err.println( "plexus-utils-3.0.24.jar is missing or a 
directory." );
+        System.err.println( "plexus-utils-" + plexusUtilVersion + ".jar is 
missing or a directory." );
         return false;
     }
 }
diff --git a/src/it/simple-war-project/pom.xml 
b/src/it/simple-war-project/pom.xml
index 1911068..b51a947 100644
--- a/src/it/simple-war-project/pom.xml
+++ b/src/it/simple-war-project/pom.xml
@@ -48,7 +48,7 @@
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-      <version>3.0.24</version>
+      <version>@plexusUtilVersion@</version>
     </dependency>
   </dependencies>
 </project>
\ No newline at end of file
diff --git a/src/it/simple-war-project/verify.bsh 
b/src/it/simple-war-project/verify.bsh
index db51158..2792d53 100644
--- a/src/it/simple-war-project/verify.bsh
+++ b/src/it/simple-war-project/verify.bsh
@@ -80,10 +80,10 @@ try
         return false;
     }
 
-    File plexusUtilsDependency = new File( libDir, "plexus-utils-3.0.24.jar" );
+    File plexusUtilsDependency = new File( libDir, "plexus-utils-" + 
plexusUtilVersion + ".jar" );
     if ( !plexusUtilsDependency.exists() || 
plexusUtilsDependency.isDirectory() )
     {
-        System.err.println( "plexus-utils-1.4.6.jar is missing or a 
directory." );
+        System.err.println( "plexus-utils-" + plexusUtilVersion + ".jar is 
missing or a directory." );
         return false;
     }
 }
diff --git a/src/test/java/org/apache/maven/plugins/war/WarOverlaysTest.java 
b/src/test/java/org/apache/maven/plugins/war/WarOverlaysTest.java
index a5f4783..db41a7f 100644
--- a/src/test/java/org/apache/maven/plugins/war/WarOverlaysTest.java
+++ b/src/test/java/org/apache/maven/plugins/war/WarOverlaysTest.java
@@ -144,7 +144,7 @@ public class WarOverlaysTest {
         assertedFiles.addAll(assertWebXml(webAppDirectory));
         assertedFiles.addAll(assertCustomContent(
                 webAppDirectory, new String[] {"index.jsp", "login.jsp", 
"admin.jsp"}, "overlay file not found"));
-        
+
         // index and login come from overlay1
         assertOverlayedFile(webAppDirectory, "overlay-one", "index.jsp");
         assertOverlayedFile(webAppDirectory, "overlay-one", "login.jsp");

Reply via email to