Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java EE deployment in Intellij IDEA

I have a fairly complex Java EE project which can be built fine from Maven. After importing it to IDEA, I had set up a working deployment of the frontend WAR and the backend EAR to a local Weblogic 12c server. The project also have several 'common' artifacts packaged as jars and used by both the frontend and backend artifacts. For deployment, I used the exploded artifacts to save some time on packaging/unpacking, everything works fine till that point.

During development, I edit some Java sources and try to redeploy the updated artifacts to the running Weblogic. I press Shift+F10, choose Redeploy artifacts, I see IDEA building the project, the project redeploys on the server, and more often than not, I do not see any of the recent changes. Even if I choose Rebuild project explicitly and then try to redeploy artifacts after, no changes can be seen on the server. The only safe way to make my changes appear in the deployed artifacts is to invoke maven from the command line calling the package goal, and then redeploying from IDEA. (No JRebel is installed, is being used either in the IDE or on Weblogic, and I'd like to stay that way).

Is that expected behaviour from IDEA? Could this be something specific to our project or something global? Should IDEA be able to discover which projects needs rebuilt and repackaged and then redeploy the EAR/WAR artifacts properly to the server? Does it need any help from my side achieving that goal?

like image 827
Kristof Jozsa Avatar asked Apr 29 '13 21:04

Kristof Jozsa


2 Answers

Whats your run/debug configurations? Check this, if not already sois not.

in the quick menu, edit configurations > Run/debug configurations window:

  • Server tab:

    • On 'update' action: restart server
    • Before launch: set 'run maven clean' and 'run maven install'
  • Deplowment tab

    • inserts your ear's here.
like image 164
Rodrigo Avatar answered Oct 19 '22 18:10

Rodrigo


don't sure this specific answer your question but what I can suggest you is to try configure weblogic maven plugin

then you can execute deployment from command line / or from IDEA with maven support.

  1. http://docs.oracle.com/cd/E21764_01/web.1111/e13702/maven_deployer.htm
  2. http://www.youtube.com/watch?v=hagaMr6UL6U
like image 26
lukass77 Avatar answered Oct 19 '22 17:10

lukass77