Zombies
Zombies

Reputation: 25872

Using maven to generate an ear file for ADF...?

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?

Upvotes: 1

Views: 2459

Answers (1)

Pascal Thivent
Pascal Thivent

Reputation: 570385

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

Upvotes: 1

Related Questions