How to Exclude directory and its contents in gradle war

前端 未结 4 1013
醉话见心
醉话见心 2021-01-15 03:43

I am using gradle war plugin, I am trying to exclude some directories inside WEB-INF directory while packing a war, but the excludes don\'t seem to

4条回答
  •  滥情空心
    2021-01-15 04:04

    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/**'
        }
    }
    }
    

提交回复
热议问题