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 2c7a339 Maven 3.9.16, use version properties and fix WarOverlaysTest
on Windows (#613)
2c7a339 is described below
commit 2c7a33949c0f5c57342ed7618c851ed42050ecc7
Author: Matthias Bünger <[email protected]>
AuthorDate: Tue May 19 21:40:14 2026 +0200
Maven 3.9.16, use version properties and fix WarOverlaysTest on Windows
(#613)
---
pom.xml | 7 ++++---
src/it/MWAR-129/pom.xml | 2 --
src/it/MWAR-427_update-without-clean/pom.xml | 4 ++--
src/it/MWAR-441/pom.xml | 4 ++--
src/it/MWAR-62/pom.xml | 1 -
.../java/org/apache/maven/plugins/war/WarOverlaysTest.java | 14 +++++++++++---
6 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/pom.xml b/pom.xml
index ff0688e..2d8e478 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,11 +77,12 @@
<properties>
<mavenArchiverVersion>3.6.6</mavenArchiverVersion>
<mavenFilteringVersion>3.5.0</mavenFilteringVersion>
- <mavenVersion>3.9.11</mavenVersion>
+ <mavenVersion>3.9.16</mavenVersion>
<javaVersion>8</javaVersion>
- <!-- TODO remove with next parent version bump -->
- <version.maven-invoker-plugin>3.9.1</version.maven-invoker-plugin>
+ <version.groovy-maven-plugin>2.1.1</version.groovy-maven-plugin>
+ <version.groovy-all>2.4.21</version.groovy-all>
+
<project.build.outputTimestamp>2025-11-24T07:29:33Z</project.build.outputTimestamp>
</properties>
diff --git a/src/it/MWAR-129/pom.xml b/src/it/MWAR-129/pom.xml
index 279a848..d839cb1 100644
--- a/src/it/MWAR-129/pom.xml
+++ b/src/it/MWAR-129/pom.xml
@@ -68,8 +68,6 @@ under the License.
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
- <!--version>2.0.2</version-->
- <!--version>2.1-alpha-2-SNAPSHOT</version-->
<version>@pom.version@</version>
<configuration>
<warSourceDirectory>src/main/webapp</warSourceDirectory>
diff --git a/src/it/MWAR-427_update-without-clean/pom.xml
b/src/it/MWAR-427_update-without-clean/pom.xml
index 5566393..49faa63 100644
--- a/src/it/MWAR-427_update-without-clean/pom.xml
+++ b/src/it/MWAR-427_update-without-clean/pom.xml
@@ -44,7 +44,7 @@ under the License.
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
- <version>2.1.1</version>
+ <version>@version.groovy-maven-plugin@</version>
<configuration>
<source>
def fileToModify = new File(project.basedir, 'pom.xml')
@@ -62,7 +62,7 @@ under the License.
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>2.4.21</version>
+ <version>@version.groovy-all@</version>
</dependency>
</dependencies>
</plugin>
diff --git a/src/it/MWAR-441/pom.xml b/src/it/MWAR-441/pom.xml
index 127c5db..0a30854 100644
--- a/src/it/MWAR-441/pom.xml
+++ b/src/it/MWAR-441/pom.xml
@@ -45,7 +45,7 @@ under the License.
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
- <version>2.1.1</version>
+ <version>@version.groovy-maven-plugin@</version>
<configuration>
<source>
def fileToModify = new File(project.basedir, 'pom.xml')
@@ -63,7 +63,7 @@ under the License.
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>2.4.21</version>
+ <version>@version.groovy-all@</version>
</dependency>
</dependencies>
</plugin>
diff --git a/src/it/MWAR-62/pom.xml b/src/it/MWAR-62/pom.xml
index 9c97e29..dee133f 100644
--- a/src/it/MWAR-62/pom.xml
+++ b/src/it/MWAR-62/pom.xml
@@ -37,7 +37,6 @@ under the License.
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
- <!--version>2.0.2</version-->
<version>@pom.version@</version>
<configuration>
<webappDirectory>${project.build.directory}/webAppDirectory</webappDirectory>
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 7cb6163..a5f4783 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");
@@ -533,9 +533,17 @@ public class WarOverlaysTest {
private void assertOverlayedFile(File webAppDirectory, String overlayId,
String filePath) throws IOException {
final File webAppFile = new File(webAppDirectory, filePath);
final File overlayFile = getOverlayFile(overlayId, filePath);
+
+ // The predefined files contain only "new line" file endings.
+ // This tests fail on Windows as the new created files also contain
"carriage return".
+ final String webAppFileWithReplacedLineEndings =
+ FileUtils.fileRead(webAppFile).replaceAll("\\r\\n", "\n");
+ final String overlayFileWithReplacedLineEndings =
+ FileUtils.fileRead(overlayFile).replaceAll("\\r\\n", "\n");
+
assertEquals(
- FileUtils.fileRead(overlayFile),
- FileUtils.fileRead(webAppFile),
+ overlayFileWithReplacedLineEndings,
+ webAppFileWithReplacedLineEndings,
"Wrong content for overlayed file " + filePath);
}