freefair / gradle-plugins

Gradle Plugin Collection
https://docs.freefair.io/gradle-plugins/current/reference/
MIT License
215 stars 32 forks source link

overlay plugin is not copying the overlay files into the final war #1161

Closed ppazos closed 1 month ago

ppazos commented 1 month ago

I see the files of the overlay in build/overlays/war/fhirOverlay but those are not included in the final war.

This is my config:

plugins {
    id 'java-library'
    id 'maven-publish'
    id 'war'
    id 'io.freefair.war-overlay' version "8.6"
    // id 'io.freefair.war-attach-classes' version "8.6"
}
...
war {
    archiveName = 'cabolabs-fhir-server.war'
    overlays {
        fhirOverlay {
            from "ca.uhn.hapi.fhir:hapi-fhir-testpage-overlay:7.0.2@war"
            enabled = true
            into "path/"
            enableCompilation = true
            provided = true
        }
    }
    duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
}
larsgrefer commented 1 month ago

Setting "provided = true" prevents the files from beeing included. Just remove this line and it should work.

ppazos commented 1 month ago

Thanks @larsgrefer I did the Gradle automatic migration from Maven and it seems that dep was 'provided' in the Maven POM. This worked.