Package arbitrary files inside an EAR

How can I tell IDEA to package arbitrary files/folders inside a
generated EAR? I need some files to be present at the EAR top level, and
it's not a J2EE module nor a library file. Shouldn't be hard to do, right?

-- Marcus

2 comments
Comment actions Permalink

You can mis-use the deployment descriptor configuration for that.
The file selection dialog for a descriptor is not constrained to XML files, so you can package arbitrary files.

Marcus Brito wrote:

How can I tell IDEA to package arbitrary files/folders inside a
generated EAR? I need some files to be present at the EAR top level, and
it's not a J2EE module nor a library file. Shouldn't be hard to do, right?

-- Marcus

0
Comment actions Permalink

Stephen Friedrich wrote:

You can mis-use the deployment descriptor configuration for that.
The file selection dialog for a descriptor is not constrained to XML
files, so you can package arbitrary files.


Misuse indeed. This hack would be enough for me now, given that I only
need to package two extra files. But what if I needed to package a whole
directory?

Thanks for the info, Stephan. I hope JetBrains considers implementing a
more straightforward way to do this.

-- Marcus

0

Please sign in to leave a comment.