From 61b59a942d8456a69706710fe99d8e671e1be92f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20B=C3=BCnger?= Date: Sun, 17 May 2026 16:45:15 +0200 Subject: [PATCH 1/3] Maven 3.9.15, use version properties and fix WarOverlaysTest on Windows --- 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 - .../apache/maven/plugins/war/WarOverlaysTest.java | 13 +++++++++++-- 6 files changed, 19 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index ff0688ed..6dde59e0 100644 --- a/pom.xml +++ b/pom.xml @@ -77,11 +77,12 @@ 3.6.6 3.5.0 - 3.9.11 + 3.9.15 8 - - 3.9.1 + 2.1.1 + 2.4.21 + 2025-11-24T07:29:33Z diff --git a/src/it/MWAR-129/pom.xml b/src/it/MWAR-129/pom.xml index 279a8489..d839cb1a 100644 --- a/src/it/MWAR-129/pom.xml +++ b/src/it/MWAR-129/pom.xml @@ -68,8 +68,6 @@ under the License. maven-war-plugin - - @pom.version@ src/main/webapp diff --git a/src/it/MWAR-427_update-without-clean/pom.xml b/src/it/MWAR-427_update-without-clean/pom.xml index 55663939..49faa634 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. org.codehaus.gmaven groovy-maven-plugin - 2.1.1 + @version.groovy-maven-plugin@ def fileToModify = new File(project.basedir, 'pom.xml') @@ -62,7 +62,7 @@ under the License. org.codehaus.groovy groovy-all - 2.4.21 + @version.groovy-all@ diff --git a/src/it/MWAR-441/pom.xml b/src/it/MWAR-441/pom.xml index 127c5db1..0a30854f 100644 --- a/src/it/MWAR-441/pom.xml +++ b/src/it/MWAR-441/pom.xml @@ -45,7 +45,7 @@ under the License. org.codehaus.gmaven groovy-maven-plugin - 2.1.1 + @version.groovy-maven-plugin@ def fileToModify = new File(project.basedir, 'pom.xml') @@ -63,7 +63,7 @@ under the License. org.codehaus.groovy groovy-all - 2.4.21 + @version.groovy-all@ diff --git a/src/it/MWAR-62/pom.xml b/src/it/MWAR-62/pom.xml index 9c97e29b..dee133f5 100644 --- a/src/it/MWAR-62/pom.xml +++ b/src/it/MWAR-62/pom.xml @@ -37,7 +37,6 @@ under the License. maven-war-plugin - @pom.version@ ${project.build.directory}/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 7cb6163b..314a8258 100644 --- a/src/test/java/org/apache/maven/plugins/war/WarOverlaysTest.java +++ b/src/test/java/org/apache/maven/plugins/war/WarOverlaysTest.java @@ -145,6 +145,7 @@ public void testDefaultOverlays(WarExplodedMojo mojo) throws Exception { assertedFiles.addAll(assertCustomContent( webAppDirectory, new String[] {"index.jsp", "login.jsp", "admin.jsp"}, "overlay file not found")); + System.out.println("---------testdefaultoverlayNow"); // index and login come from overlay1 assertOverlayedFile(webAppDirectory, "overlay-one", "index.jsp"); assertOverlayedFile(webAppDirectory, "overlay-one", "login.jsp"); @@ -533,9 +534,17 @@ private MavenProjectArtifactsStub createProjectWithOverlays(ArtifactStub... arti 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); } From e87387a85a08bb44a5a98b4a8b3853f54ed759d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20B=C3=BCnger?= Date: Mon, 18 May 2026 05:26:34 +0200 Subject: [PATCH 2/3] 3.9.16 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6dde59e0..2d8e478c 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ 3.6.6 3.5.0 - 3.9.15 + 3.9.16 8 2.1.1 From 27b00182889ca951ec6ebd95489ee2f111dd2dc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20B=C3=BCnger?= Date: Tue, 19 May 2026 21:39:04 +0200 Subject: [PATCH 3/3] Maven 3.9.15 and fix WarOverlaysTest on Windows --- .../java/org/apache/maven/plugins/war/WarOverlaysTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 314a8258..a5f4783c 100644 --- a/src/test/java/org/apache/maven/plugins/war/WarOverlaysTest.java +++ b/src/test/java/org/apache/maven/plugins/war/WarOverlaysTest.java @@ -144,8 +144,7 @@ public void testDefaultOverlays(WarExplodedMojo mojo) throws Exception { assertedFiles.addAll(assertWebXml(webAppDirectory)); assertedFiles.addAll(assertCustomContent( webAppDirectory, new String[] {"index.jsp", "login.jsp", "admin.jsp"}, "overlay file not found")); - - System.out.println("---------testdefaultoverlayNow"); + // index and login come from overlay1 assertOverlayedFile(webAppDirectory, "overlay-one", "index.jsp"); assertOverlayedFile(webAppDirectory, "overlay-one", "login.jsp");