Created attachment 146504 [details]
a small and simple example project
I have a multi-module maven project. There are two modules, one is a war and the other is a jar.
In the war I have a web application using Apache Wicket. In the jar I have a Wicket Panel. This panel will be used by the web application - the war has a dependency on the jar.
The compile and deploy on save options are enabled and only work if I change the java or html files in the war project.
Changes in the java classes in the jar-module also work fine, but if I change the html file in the jar module the changes are not auto-deployed.
Steps to reproduce:
1. Create a maven POM project
2. Create the two modules, e.g. "web" (packaging "war" - archetype wicket-quickstart-archetype) and "testmodule" (packaging "jar")
3. Create a wicket panel (java class + html file) in the "testmodule" project
4. Use this panel in the HomePage.java and HomePage.html
5. Run the web project in debug mode
6. Change the content of the files and reload in the browser after each change
Changes in HomePage.java will be auto-deployed on save and I can see the changes in the browser.
Changes in HomePage.html will be auto-deployed on save and I can see the changes in the browser.
Changes in TestPanel.java will be auto-deployed on save and I can see the changes in the browser.
Changes in TestPanel.html won't be auto-deployed on save and I can't see the changes in the browser.
All changes in java classes and html files should be auto-deployed on save.
Tested in NetBeans IDE 8.0 (Build 201403101706) with Tomcat 220.127.116.11
I have created and attached a small and simple example project.
See also http://forums.netbeans.org/viewtopic.php?t=59914
I will take a look at it..
Well this is basically impossible to support. Your project structure is:
- WAR module containing dependency on JAR module
- Only WAR module is needed for deployment and it includes JAR module as a library dependency
For a correct auto-deployment we would need to rebuild your JAR module everytime when you would make any kind of change. That would obviously make the IDE uncomfortable to use.
The way how auto-deployment usually works is that we take the updated files and copy them (+ compile them in case of .java/groovy files) to the exploded directory used by the server for deployment. That allow us to avoid compiling the whole module.
EAR project used to wrap up your module would help, but I guess that wont work for you if you need to use lightweight Tomcat for the deployment.
Don't see any simple solution at the moment, but I will try to think about it a little more.
I have tried a EAR in wildfly 8. But again, it unfortunately does not work.
I do not see any change after reload of the browser when I change one of the 4 files (HomePage.java, homepage.html, TestPanel.java, TestPanel.html).
I think Netbeans doesn't compile anything on save in one of the modules.
[Tools] [Options] [Java] [Java Debugger] "Apply code changes after save ..." is enabled.
In all Modules [Properties] [Build] [Compile] "Compile On Save" is enabled.
Have I missed something?
I've attached the modified sample project.
Tested in NetBeans IDE 8.0 (Build 201403101706) with Wildfly 8.0.0 and GlassFish Server Open Source Edition 4.0 (build 89).
Created attachment 148105 [details]
a EAR example project
Sorry, there won't be enough of time to fix this issue into 8.0.1 patch.
Changing to enhancement and increasing priority - we will need a special support to allow this.
*** Bug 223217 has been marked as a duplicate of this bug. ***
*** Bug 206030 has been marked as a duplicate of this bug. ***