Configuring ejb modules

My project's directory structure is a little goofy (not my fault). We
have all our source in one directory, but separate directories (and
separate ejb-jar.xml files) for each ejb in another directory, like this:

root\
src\java\
conf\ejb\
SecurityManager\META-INF\
ejb-jar.xml
...
UserManager\META-INF\
ejb-jar.xml
...
...

So all the source code is in one place, but the ejb descriptors are in
separate files, in separate directories.

So the problem I'm running into is that each ejb module can only have a
single ejb-jar.xml, and no two modules can share the same content root. I
think I'd need to either create one ejb module per ejb-jar.xml (but the
content root would be "root\" for all of them), or have a single ejb
module that has multiple ejb-jar.xml files.

Anyone else running into this? Is there any way to configure this project
in IDEA without rearranging the project structure? I would think this is
a somewhat common configuration, since it allows us to deploy or not
deploy ejbs individually without having a huge directory structure.

Please sign in to leave a comment.