How can I control the content of META-INF ?

Hi,

I have a simple java module (JSE, not JEE).
I'd like intellij to package it into a jar (using the menu option "Build" -> "Build Jars..").

However, i'd also like to control the content of META-INF (in my case i'm trying to add a "META-INF/persistence.xml" file, but it could be any other file).

Is there no way of doing it in intellij ?
I've tried looking through the module settings, and I've searched the web, but no luck.
Can anyone please tell how it's done?

Thanks.

2 comments
Comment actions Permalink

META-INF/persistence.xml should be under source root

solmyr72 wrote:

Hi,

I have a simple java module (JSE, not JEE).
I'd like intellij to package it into a jar (using the menu option "Build" -> "Build Jars..").

However, i'd also like to control the content of META-INF (in my case i'm trying to add a "META-INF/persistence.xml" file, but it could be any other file).

Is there no way of doing it in intellij ?
I've tried looking through the module settings, and I've searched the web, but no luck.
Can anyone please tell how it's done?

Thanks.



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

This worked :)
Thanks very much, I've been trying to figure it out for a while, and this really helped.

Just in case someone else runs into the same problem, i'll add a reminder to make sure the file extention (like "xml" ) appears in Settings->Compiler->Resource Pattterns.
Becaue it took me a while to figure out why "xml" file was packaged in my jar (because "xml" extention is there by default), but my custom manifest.mf wasn't (because "mf" extention is not there by default).

Thanks again.

0

Please sign in to leave a comment.