Gradle如何在添加战争之前修改文件路径?

时间:2017-06-29 17:20:23

标签: gradle war filepath

Gradle war插件:

如何在添加战争之前修改路径名?

war {
    from ("../common/conf") {
        include 'foo.xml'
        include 'bar.xml'

        eachFile {details ->
            details.path = 'META-INF/' + details.path
        }
        into 'WEB-INF/classes'
    }
}

应该是

WEB-INF/classes/META-INF/foo.xml
WEB-INF/classes/META-INF/bar.xml

但它是:

META-INF/WEB-INF/classes/foo.xml
META-INF/WEB-INF/classes/bar.xml

如何在eachFile之前执行into

0 个答案:

没有答案