Changes to the CSS and HTML files in webapp directory not being picked up by SuperDevMode

197 Views Asked by At

I think GWT is supposed to automatically pick up and reload changes to the app-wide HTML and CSS files, which reside in the webapp folder. However, in my case this is simply not the case and GWT says "skipped compile because no input files have changed". I am not sure where I should edit to let those files be watched as well.

This project was initialized using the old gwt-maven plugin from https://gwt-maven-plugin.github.io/gwt-maven-plugin/user-guide/archetype.html.

The program arguments on launch is the following: -war app/target/App-1.0-SNAPSHOT -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -startupUrl index.html -logLevel INFO -codeServerPort 9997 -port 8888 com.example.www.App.App.

Or did I simply not understand it correctly and GWT is just not supposed to watch for changes in the webapp folder? This would really hinder the pace of frontend development.

2

There are 2 best solutions below

4
Sal On BEST ANSWER

GWT compiles .java (input) files to javascript. So if you only modify a css file there is no need to recompile to js. However, when creating the war file, files in public dir may be updated.

0
Thomas Broyer On

No, the src/main/webapp is not watched for changes. The maven-war-plugin will process those files into target/${finalName} (and copy dependencies to it's WEB-INF/lib and the project classes to WEB-INF/classes), and the embedded server in DevMode will serve them as a webapp.

The way to update them is to run mvn war:exploded -Dgwt.compiler.skip (or possibly mvn package -Dgwt.compiler.skip -DskipTests); and then you'll tell DevMode to reload the webapp (from it's "Jetty" tab)