java 我将 weblogic-application.xml 放在我的 Maven 2 项目中的什么位置?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3612610/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 02:39:31  来源:igfitidea点击:

Where do I put weblogic-application.xml in my Maven 2 project?

javamaven-2jakarta-eeweblogicear

提问by Derek Mahar

Where do I put weblogic-application.xmlin my Maven 2 project so that Maven places it in META_INFin the target EAR artifact?

我应该把weblogic-application.xml我的 Maven 2 项目放在哪里,以便 Maven 将它放在META_INF目标 EAR 工件中?

回答by Pascal Thivent

The weblogic-application.xmlshould be packaged in the META-INFdirectory of your final EAR (next to the standard application.xml).

weblogic-application.xml应打包在META-INF最终EAR的目录下(旁标准application.xml)。

With the Maven EAR Plugin, the default location for extra files to include in the EAR(that you can control with the earSourceDirectoryparameter) is src/main/application. So the following would work (using the defaults):

使用Maven EAR Plugin包含在 EAR 中的额外文件的默认位置(您可以使用earSourceDirectory参数控制)是src/main/application. 因此,以下将起作用(使用默认值):

myear
|-- src
|   `-- main
|       `-- application
|           `-- META-INF
|               `-- weblogic-application.xml
`-- pom.xml