Hot swapping on Multi-module maven project
Hi all,
I am evaluating IntelliJ IDEA 13 Ultimate for my workplace and I have come across an issue. Currently we develope using Eclipse IDE where we have an Enteprise Application (ear) deployed onto Weblogic 10.3.x which is only a matter of right-clicking on the parent module to deploy onto the server. I have succesfully imported the project into IntelliJ and activated all necessary plugins, such as Java EE, Weblogic integration etc. Initially I had a few issues with dependencies being at the wrong scope (although in eclipse it worked fine) and when I changed from Test to Provided everything worked fine.
I created a Run configuration for Weblogic server and under deployment I chose ear:exploded ear so that I can take advantage of reloading classes and resources without having to redeploy the app. Although I can succesfully deploy the app with no errors, I make some changes to an xhtml file, do Ctrl + F10 then reload my browser but I don't see the changes which led me to believe that I am missing something fundamental.
The app is spring, jsf1.1, javascript. I have attached a few screenshots but I do not how helpfull they are.
I think I have realized what the problem could be but I don't know how to fix it.
The ear:exploded which I am deploying has the structure shown in conf2.jpg, notice that the item one before the last in Output Layout is a .war. This .war contains all the web module related jars which contains all the views (.xhtml). Shoudn't that be unpacked in order for the reloading of resources to work? How do I set this up? When I select ear:exploded, under Available Elements > Artifacts I don't get web-war:exploded. So how can I move it into the ear:exploded artifact?
Regards,
George
Attachment(s):
conf2.JPG
conf1.JPG
conf.JPG
Please sign in to leave a comment.
Actually I will take what I said previously back, expanding web-war item under root shows the artifact web-war:exploded, which means the artifact is deployed as it should.
So my questions now is, why when I modify resources, they are not loaded onto the server. There are no errors, or anything in the logs to indicate something went wrong..
The problem appears because 'war' artifact is packed into an archive inside the exploded ear, and hot-swapping doesn't work for resources packed in
archives.
To fix the problem you need to add 'unpack' or 'unpackTypes' element to maven-ear-plugin configuration in pom.xml file
(https://maven.apache.org/plugins/maven-ear-plugin/examples/unpacking-a-module.html) and reimport the Maven project. IDEA will change 'exploded ear'
artifact configuration accordingly.
--
Nikolay Chashnikov
JetBrains
http://www.jetbrains.com
"Develop with pleasure!"
Hello Nikolay,
I have the same issue using a war. I found no similar solution using the maven-war-plugin. Do you know a solution for that?
Regards,
Richard