3 Replies Last post: Aug 5, 2012 6:29 PM by Marco Ehrentreich  
Darac Newbie 15 posts since
Apr 8, 2011
Currently Being Moderated

Apr 19, 2012 7:46 PM

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)

Guest
Currently Being Moderated
May 2, 2012 9:44 AM in response to: Darac
Re: Java EE - application.xml sometimes not generated

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!"

 

Marco Ehrentreich Newbie 1 posts since
Aug 5, 2012
Currently Being Moderated
Aug 5, 2012 6:29 PM in response to: Nikolay Chashnikov (JetBrains)
Re: Java EE - application.xml sometimes not generated

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

More Like This

  • Retrieving data ...