Java EE - application.xml sometimes not generated

I have a project built from Maven. I've noticed that sometimes, when I do a Maven clean, and then rebuild project through IntelliJ, application.xml is not generated. Sometimes it's generated but with empty "application" element. How does IntellIJ generate application.xml? Are there any steps I can make to manually regenerate the file? (other than re-opening the project's main pom.file and regenerating the whole project)

3 comments

IDEA indeed doesn't generate application.xml during rebuild. So if you clean the target directory from Maven you need to call
'ear:generate-application-xml' goal from Maven Project tool window.

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

0

Hi Nikolay,

are there any plans to change this behavior?

I use the application.xml descriptor generated by the Maven EAR plugin to deploy a JEE application directly from IDEA to GlassFish 3.x and change the context root to a custom location. Of course it's not a big deal to generate the application.xml after running "clean" but nevertheless it's annoying that you have to rebuild and redeploy the application if you forgot to generate the descriptor before.

Or is there any workaround to automatically run the Maven goal ear:generate-application-xml just before the EAR is built and deployed? "Run Maven goal" in the GlassFish run configuration obviously does not do the trick but maybe there's something I am missing?!?

Thanks in advance!

Marco

0

Please sign in to leave a comment.