Bug 243484 - Auto-deploy HTML files in multi-module-maven-project doesn't work
Auto-deploy HTML files in multi-module-maven-project doesn't work
Status: NEW
Product: javaee
Classification: Unclassified
Component: Maven
8.0
PC Windows 7
: P2 with 9 votes (vote)
: 8.1
Assigned To: Martin Janicek
issues@javaee
:
: 206030 223217 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-02 15:47 UTC by CptS
Modified: 2014-07-30 12:45 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
a small and simple example project (5.56 MB, application/x-zip)
2014-04-02 15:47 UTC, CptS
Details
a EAR example project (28.70 KB, application/x-zip)
2014-07-17 14:00 UTC, CptS
Details

Note You need to log in before you can comment on or make changes to this bug.
Description CptS 2014-04-02 15:47:45 UTC
Created attachment 146504 [details]
a small and simple example project

Overview:
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

Actual Results:
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.

Expected Results:
All changes in java classes and html files should be auto-deployed on save.

Tested in NetBeans IDE 8.0 (Build 201403101706) with Tomcat 8.0.3.0

I have created and attached a small and simple example project.
See also http://forums.netbeans.org/viewtopic.php?t=59914
Comment 1 Martin Janicek 2014-07-17 12:13:12 UTC
I will take a look at it..
Comment 2 Martin Janicek 2014-07-17 12:55:56 UTC
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.
Comment 3 CptS 2014-07-17 13:56:30 UTC
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).
Comment 4 CptS 2014-07-17 14:00:28 UTC
Created attachment 148105 [details]
a EAR example project
Comment 5 Martin Janicek 2014-07-28 11:50:01 UTC
Sorry, there won't be enough of time to fix this issue into 8.0.1 patch.
Comment 6 Martin Janicek 2014-07-30 08:39:43 UTC
Changing to enhancement and increasing priority - we will need a special support to allow this.
Comment 7 Martin Janicek 2014-07-30 12:39:08 UTC
*** Bug 223217 has been marked as a duplicate of this bug. ***
Comment 8 Martin Janicek 2014-07-30 12:45:05 UTC
*** Bug 206030 has been marked as a duplicate of this bug. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo