diff --git a/CHANGELOG.md b/CHANGELOG.md index 96e39153..5c528e28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ * [#201](https://github.com/xenit-eu/alfresco-docker-gradle-plugin/issues/201) - Make it possible to disable rewriting log4j.properties +### Fixed + +* [#229](https://github.com/xenit-eu/alfresco-docker-gradle-plugin/issues/229) - Overwriting files in WAR with AMP broken since v5.3.0 + ## Version 5.3.0 - 2021-04-21 **This release drops support for Gradle versions before 5.6** diff --git a/src/integrationTest/java/eu/xenit/gradle/testrunner/Reproductions.java b/src/integrationTest/java/eu/xenit/gradle/testrunner/Reproductions.java index 96367721..4ad2acb4 100644 --- a/src/integrationTest/java/eu/xenit/gradle/testrunner/Reproductions.java +++ b/src/integrationTest/java/eu/xenit/gradle/testrunner/Reproductions.java @@ -177,4 +177,9 @@ public void testIssue176Mitigation() throws IOException { public void testIssue191() throws IOException { getGradleRunner(REPRODUCTIONS.resolve("issue-191"), ":check").buildAndFail(); } + + @Test + public void testIssue229() throws IOException { + testProjectFolder(REPRODUCTIONS.resolve("issue-229"), ":integrationTest"); + } } diff --git a/src/integrationTest/reproductions/issue-229/build.gradle b/src/integrationTest/reproductions/issue-229/build.gradle new file mode 100644 index 00000000..bc2be124 --- /dev/null +++ b/src/integrationTest/reproductions/issue-229/build.gradle @@ -0,0 +1,37 @@ +plugins { + id "base" + id "eu.xenit.docker-alfresco" + id "eu.xenit.alfresco" version "1.1.0" +} + +repositories { + mavenCentral() + alfrescoPublic() +} + +dependencies { + baseAlfrescoWar "org.alfresco:content-services-community:6.1.2-ga@war" + alfrescoAmp 'eu.xenit.alfresco:alfresco-hotfix-MNT-20557:1.0.2@amp' +} + +task integrationTest { + dependsOn(tasks.alfrescoWar.archiveFile, configurations.alfrescoAmp) + doFirst { + java.io.File alfrescoJsrApiFile = project.zipTree(tasks.alfrescoWar.archiveFile) + .matching { + include("WEB-INF/lib/jsr250-api-1.0.jar") + } + .singleFile + + java.io.File ampJsrApiFile = project.zipTree(configurations.alfrescoAmp.singleFile) + .matching { + include "lib/jsr250-api-1.0.jar" + } + .singleFile + + println "Alfresco jsr250-api: ${alfrescoJsrApiFile}" + println "AMP jsr250-api: ${ampJsrApiFile}" + + assert alfrescoJsrApiFile.bytes == ampJsrApiFile.bytes + } +} \ No newline at end of file