我必须将ant项目转换为gradle项目。这里当我运行gradle构建时,它会创建war文件,当它部署在服务器上时,爆炸的war文件夹有两个文件夹META-INF和WEB-INF,我的要求是 的 1。将web.xml从配置文件夹(如图像中所示)复制到WEB-INF文件夹 和 jsp文件夹,如图像中的爆炸文件夹
答案 0 :(得分:2)
apply plugin: 'war'
....
war {
from 'jsp' // adds a file-set to the root of the archive
webXml = file('config/web.xml') // copies a file to WEB-INF/web.xml
}