Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 0 additions & 2 deletions src/it/MWAR-129/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions src/it/MWAR-427_update-without-clean/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions src/it/MWAR-441/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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>
Expand Down
1 change: 0 additions & 1 deletion src/it/MWAR-62/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
14 changes: 11 additions & 3 deletions src/test/java/org/apache/maven/plugins/war/WarOverlaysTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +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"));

// index and login come from overlay1
assertOverlayedFile(webAppDirectory, "overlay-one", "index.jsp");
assertOverlayedFile(webAppDirectory, "overlay-one", "login.jsp");
Expand Down Expand Up @@ -533,9 +533,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);
}

Expand Down
Loading