Intellij web application auto-reload for maven modules



    I'm trying to get auto-reload working for a maven module running under a jboss eap 6.4 server.  My project consists of a main project with a pom.xml specifying modules:


        <!-- add sub-projects here -->






When I load the main project using this pom.xml, the modules appear as sub-projects






html and javascript are in the web module.  This is what I want to auto-reload.  How do I get this to work?

For a project consisting of a single pom.xml auto-reload works great.  Just set the "On Update Action" on the Server tab of the 'Edit Server Run Configuration' page.  See image attached below.  But when I make changes in the web module (sub-project) in the project above and do a refresh on my browser, I do not see the changes I've made reflected.

I am using a Mac running Intellij version 

2016.32149 built on 09 Sep 2016


Comment actions Permalink


Make sure you artifact is Exploded and includes the correct files. Also check the the files are indeed updated in the artifact output location on disk and that JBoss loads the app from that location.

Comment actions Permalink

Thank you for the prompt reply.

The artifact is exploded.  It includes the files I am trying to modify.  The files are in the target directory, which is being loaded by the JBoss server.  I know this because I *can* see changes if I edit the target files directly.   Which is not really practical for development, of course.

The target directory *is* under the sub-project, not the parent project.  Could this be a problem?  To be more specific

On the disk the directory structure of the project is as follows:

Main/Web/target/<exploded war file>

If I do this:

cd Main/Web/target/<exploded war file>/html/

edit SomePage.html and add something (<h1>Hello</h1>, for example)

hit refresh on the browser with SomePage.html open I will see the change.

If I do the same in the IDEA to the source file, I will not.


Comment actions Permalink

Do the files in the target directory get updated when you invoke Update action or Build | Make? Try enabling build on make option for the artifact.

Comment actions Permalink

I am not sure what you mean by 'Build on Make'.  I have done the standard steps to make this work and it does not.  This means deploying an exploded war file, Having a goal of 'Build' when the server starts up, selecting 'Update classes and resources' for On Update and On frame de-activiation.

The same steps taken work on a simple web project with a single project.  They do not for this project with subprojects.

 If I stop the server and restart it the changes appear.  But they will not when the server is running and I refresh my browser.

Comment actions Permalink

Please submit a ticket to support and attach a sample project illustrating the problem so that we can investigate it.

Comment actions Permalink

OK.  Will do.

Comment actions Permalink

I have opened issue IDEA-162640


Please sign in to leave a comment.