I realise there's an outstanding bug for this
(http://jira.codehaus.org/browse/GRADLE-1050) but was wondering to what
degree we will be able to alter the behavior when duplicate files are in the
from clauses.

I have a jar task that creates a properties jar to be included in a server
.ear. I want default property files to be included, but if I put files with
the same name in a special override directory, I want these copied instead.
E.g. :

task jarServerConf(type: Jar, dependsOn: processResources) {
    baseName = "myjar"
    classifier = 'server-conf'

    from ('src/conf/server')
    {
        // will pick up:
        // ehcache-config.xml
        // jndi.properties
    }    
    
    from ('override/conf/server')
    {
        // should pick up and override above IF present:
        // ehcache-config.xml
        // jndi.properties
    }
}


So will this behavior be possible with the solution to GRADLE-1050? I'm not
entirely sure what to do at this point, since I have quite a few of these
property files (my example shows 2 files for brevity), and I'm not keen on
having to create some relatively complicated logic to get the overriding
behaviour (i.e. for each file in override, add an exclude for that file in
the default from clause) - any suggestions for a workaround  are most
welcome :)

Thanks!
Chris.
-- 
View this message in context: 
http://gradle.1045684.n5.nabble.com/Duplicate-files-in-archives-tp3272391p3272391.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to