Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwriting files in WAR with AMP broken since v5.3.0 - required for e.g. applying hotfixes #229

Closed
todorinskiz opened this issue Aug 26, 2021 · 1 comment · Fixed by #238
Labels
bug Something isn't working has-jira-ticket Corresponding ticket has been opened in the Xenit Jira for planning
Milestone

Comments

@todorinskiz
Copy link
Member

Caused by: https://github.com/xenit-eu/alfresco-docker-gradle-plugin/pull/204/files#diff-e388b16e7e9b41aaf276a70a19a4d9b82478b1ad1ffb1e48922accfd30926942R28

Reproducer build.gradle:

plugins {
    id "base"
    id "eu.xenit.docker-alfresco" version "5.3.0"
}

dependencies {
    baseAlfrescoWar "org.alfresco:content-services:6.1.1@war"
    alfrescoAmp 'eu.xenit.alfresco:alfresco-hotfix-MNT-20557:1.0.2@amp'
}

task alfrescoWar_patched(type: eu.xenit.gradle.docker.alfresco.tasks.MergeWarsTask) {
    group "alfresco"
////  WONT WORK
//    duplicatesStrategy = DuplicatesStrategy.
    addInputWar(tasks.applyAlfrescoAmp)
    addInputWar(tasks.applyAlfrescoDE)
    addInputWar(tasks.applyAlfrescoSM)

//  Adding the base war last ensures that the files applied with the previous tasks are not overwritten
//  by the base war.
    addInputWar(project.provider({project.configurations.baseAlfrescoWar.singleFile}))
}

dockerAlfresco {
    baseImage = "docker.io/xenit/alfresco-repository-skeleton:6.1.1"
    dockerBuild {
        repository = 'hub.xenit.eu/alfresco-docker-gradle-plugin-reproducer/alfresco'
    }
}

createDockerFile {
    group 'docker'
}

repositories {
    mavenCentral()
    maven {
        url 'https://artifactory.xenit.eu/artifactory/libs-release'
        credentials {
            username property("eu.xenit.artifactory.username")
            password property("eu.xenit.artifactory.password")
        }
    }
}```
@todorinskiz todorinskiz added the bug Something isn't working label Aug 31, 2021
@vierbergenlars vierbergenlars added the has-jira-ticket Corresponding ticket has been opened in the Xenit Jira for planning label Sep 6, 2021
vierbergenlars added a commit that referenced this issue Oct 22, 2021
Overwriting files in an alfresco WAR with an AMP should work, also when
using the `alfrescoWar` task.
It appears that this issue was already fixed as a side-effect of
f493862 (PR #220), where duplicates strategy was
changed from EXCLUDE to INCLUDE.
@vierbergenlars vierbergenlars added this to the 5.3.1 milestone Oct 22, 2021
@vierbergenlars
Copy link
Member

Well, it appears that this issue is already fixed in master, but I added an integration test anyways (and tested that it fails with 5.3.0)

@vierbergenlars vierbergenlars changed the title Overwriting files broken since v5.3.0 - required for e.g. applying hotfixes Overwriting files in WAR with AMP broken since v5.3.0 - required for e.g. applying hotfixes Oct 22, 2021
vierbergenlars added a commit that referenced this issue Oct 22, 2021
Overwriting files in an alfresco WAR with an AMP should work, also when
using the `alfrescoWar` task.
It appears that this issue was already fixed as a side-effect of
f493862 (PR #220), where duplicates strategy was
changed from EXCLUDE to INCLUDE.
vierbergenlars added a commit that referenced this issue Oct 25, 2021
Overwriting files in an alfresco WAR with an AMP should work, also when
using the `alfrescoWar` task.
It appears that this issue was already fixed as a side-effect of
f493862 (PR #220), where duplicates strategy was
changed from EXCLUDE to INCLUDE.
vierbergenlars added a commit that referenced this issue Oct 25, 2021
Overwriting files in an alfresco WAR with an AMP should work, also when
using the `alfrescoWar` task.
It appears that this issue was already fixed as a side-effect of
f493862 (PR #220), where duplicates strategy was
changed from EXCLUDE to INCLUDE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has-jira-ticket Corresponding ticket has been opened in the Xenit Jira for planning
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants