Building EARs: How to include xml file?

I'd like to deploy my datasource configuration as part of the application,
packaged in an ear file.
After all the datasource should not be accesible to other applications
running on the same server.
JBoss handles this quite nicely:
1) I add my oracle-ds.xml to the top level of the ear file.
2) I add this entry in application.xml
oracle-ds.xml ]]>

Big question:
How to do "1)" when building with Idea?


2 comments

Hello Stephen,

You can click the "Add..." button in Module Settings | "Java EE Application
Module Settings" tab | "Deployment descriptors" group, specify path to your
oracle-ds.xml, clear the "Directory path relative to deployment root" field,
click "OK" and ignore an error message about empty name.

I'd like to deploy my datasource configuration as part of the
application,
packaged in an ear file.
After all the datasource should not be accesible to other applications
running on the same server.
JBoss handles this quite nicely:
1) I add my oracle-ds.xml to the top level of the ear file.
2) I add this entry in application.xml
<module id="oracle-ds">
<java>oracle-ds.xml</java>
</module>
Big question:
How to do "1)" when building with Idea?

---
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Thanks a lot! Nice trick. A more obvious way would be nice...

Nikolay Chashnikov (JetBrains) wrote:

Hello Stephen,

You can click the "Add..." button in Module Settings | "Java EE
Application Module Settings" tab | "Deployment descriptors" group,
specify path to your oracle-ds.xml, clear the "Directory path relative
to deployment root" field, click "OK" and ignore an error message about
empty name.

0

Please sign in to leave a comment.