使用maven 为ADF 生成ear 文件...?

发布于 2024-09-02 00:48:32 字数 448 浏览 7 评论 0原文

我注意到 Oracle ADF 有它自己的 EAR 结构。在 EAR 内部有一个像这样创建的 adf 文件夹,以及 WAR 文件和标准 META-INF 目录就是这个“adf”目录:

adf
  /com
    /companypackagehere
      bc4j.xcfg
  /META-INF
    adf-config.xml
    connections.xml

我必须使用文件移动重新创建它吗?如何使用 Maven 创建符合 Oracle ADF 和 weblogic 的 EAR?

编辑:我注意到,当 JDeveloper 创建所述ear 文件时,源文件夹布局和 EAR 文件夹布局(如所述)几乎不相似。因此,它从不同的地方获取各种 xml 文件并将它们放置在所描述的布局中。我怎样才能在maven中实现这一点?我需要什么插件/技巧?

I am noticing that Oracle ADF has its own EAR structure. There is an adf folder created like so, inside the EAR, along with the WAR file and standard META-INF directory is this 'adf' directory:

adf
  /com
    /companypackagehere
      bc4j.xcfg
  /META-INF
    adf-config.xml
    connections.xml

Must I recreate this using file moves...? And how can I create an Oracle ADF and weblogic compliant EAR with maven?

edit: I noticed that when JDeveloper creates said ear file, the source folder layout and the EAR folder layout (as described) are hardly similar. So it is taking various xml files and from various places and placing them in the described layout. How can I achieve this in maven? What plugin(s)/tricks do I need?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

踏月而来 2024-09-09 00:48:32

我没有任何使用 Oracle ADF 的经验,但我认为您可以将 adf 目录放在您的 ${basedir}/src/main/application 目录中EAR 模块(这是 earSourceDirectory 属性,它指向一个用于在 EAR 中包含额外文件的目录)。

像这样的事情:

. 
|-- ear
|   |-- src
|   |   `-- main
|   |       `-- application
|   |           |-- META-INF
|   |           |   `-- application.xml
|   |           `-- adf
|   |               |-- com
|   |               |   `-- companypackagehere
|   |               |       `-- bc4j.xcfg
|   |               `-- META-INF
|   |                   |-- adf-config.xml
|   |                   `-- connections.xml
|   `-- pom.xml
|-- web
|   +-- src
|   `-- pom.xml
`-- pom.xml

打包这个项目将导致接近这个的结果(假设您没有 EJB 或其他库):

ear-1.0 
|-- META-INF
|   `-- application.xml
|-- adf
|   |-- com
|   |   `-- companypackagehere
|   |       `-- bc4j.xcfg
|   `-- META-INF
|       |-- adf-config.xml
|       `-- connections.xml
`-- web-1.0.war

I don't have any experience with Oracle ADF but I think that you could just put the adf directory in the ${basedir}/src/main/application directory of your EAR module (this is the default value of the earSourceDirectory property which points to a single directory for extra files to include in the EAR).

Something like this:

. 
|-- ear
|   |-- src
|   |   `-- main
|   |       `-- application
|   |           |-- META-INF
|   |           |   `-- application.xml
|   |           `-- adf
|   |               |-- com
|   |               |   `-- companypackagehere
|   |               |       `-- bc4j.xcfg
|   |               `-- META-INF
|   |                   |-- adf-config.xml
|   |                   `-- connections.xml
|   `-- pom.xml
|-- web
|   +-- src
|   `-- pom.xml
`-- pom.xml

And packaging this project would result in something approaching this (assuming you don't have EJBs or other libraries):

ear-1.0 
|-- META-INF
|   `-- application.xml
|-- adf
|   |-- com
|   |   `-- companypackagehere
|   |       `-- bc4j.xcfg
|   `-- META-INF
|       |-- adf-config.xml
|       `-- connections.xml
`-- web-1.0.war
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文