Gradle - 部署描述符中的 Web 模块
我正在尝试在 Ear 文件中添加一个 Web 模块。我使用 webModule(":wars/myweb","/mywebapp") 将其放入我的自定义部署描述符中。它不包括ear 文件中的war 文件。它只是在生成的 application.xml 中添加一个包含这些详细信息的条目。
您能否帮助使用自定义部署描述符在耳朵中包含一个 Web 模块?
我的耳朵任务在 build.gradle 中看起来像这样
ear {
libDirName ''
deploymentDescriptor {
// custom entries for application.xml:
// fileName = "application.xml" // same as the default value
version = "1.4" // same as the default value
applicationName = "myapp"
initializeInOrder = true
displayName = "myear" // defaults to project.name
description = "EAR for the basic package" // defaults to project.description
webModule(':wars/myweb','/mywebapp')
}
}
我的 settings.xml 与 build.gradle 位于同一目录中,看起来像这样
include "wars/myweb"
感谢您的帮助。
I am trying to add a web module in an Ear file. I put it in my customized deployment descriptor using webModule(":wars/myweb","/mywebapp"). It is not including the war file in the ear file. It is just adding a entry in the generated application.xml with these details.
Can you please help in including a web module in ear, using customized deployment descriptor?
My ear task looks like this in build.gradle
ear {
libDirName ''
deploymentDescriptor {
// custom entries for application.xml:
// fileName = "application.xml" // same as the default value
version = "1.4" // same as the default value
applicationName = "myapp"
initializeInOrder = true
displayName = "myear" // defaults to project.name
description = "EAR for the basic package" // defaults to project.description
webModule(':wars/myweb','/mywebapp')
}
}
My settings.xml in the same dir as build.gradle looks like this
include "wars/myweb"
Appreciate your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用这种方式将 war 依赖关系与 webModule 联系起来。 warMap 提供了工件 id 和上下文路径之间的连接:
I use this way to tie war dependencies to the webModules. The warMap provides a connection between the artifact id and the context path: