2013-05-16 102 views

回答

0

see this post and comments

war { 
// remove classes from the classpath <<<<<<< 
classpath = configurations.runtime 

// add them in explicitly, with the filtering applied 
webInf { 
    into('classes') { 
     from sourceSets.main.classes 
     exclude 'org/gradle/sample/excludeme/**' 
    } 
} 
} 
1

排除包含在WEB-INF名爲metadata文件夾使用下面的代碼在你的build.gradle文件:

war.rootSpec.exclude("**/WEB-INF/metadata/") 

或根據您的編碼風格,你也可以使用:

war 
{ 
    rootSpec.exclude("**/WEB-INF/metadata/") 
} 

This link on the gradle discussion forum may also be of help

相關問題