我的构建文件中有一些 gradle 战争任务,我想更改webAppDirName
每个战争任务。我试过这个:
task myWarTask(type: War) {
ext.webAppDirName = 'src/anotherfolder/webapp' // also tried just webAppDirName
version ""
destinationDir = file("$buildDir/libs")
baseName = 'myWarName'
classpath = configurations.myWarConfiguration
}
但这仍然是在拉取内容src/main/webapp
而不是src/anotherfolder/webapp
我可以webAppDirName
像这样在每个war文件的基础上配置吗?