Hot Deployment of styles.css

Hi!

I have created a widget project using the maven archetype vaadin-archetype-widget with Vaadin 6.8.1. Thanks to the hot deployment of Jetty and the GWT DevMode, I have very short turnaround times from a change to the test in the browser. Server side code is redeployed automatically by Jetty and client side code changes are available after a reload.

There just just one problem with updates in the styles.css. Jetty detects the change and starts a hot deployment. But when I reload my test application, the old styles.css is still in use.

Is there a way the hot deploy the styles.css?

Greetings
Oliver

Are you sure this is not simply a browser cache issue? I usually have to pres refresh (f5) in the browser to get style updates, as far as I know the browser cache the styles as static content. This will not restart the application , it will only get your browser to re-fetch the content.

… and if you use Chrome, it caches CSS very aggressively - forcing a refresh with Ctrl-F5 multiple times might help.

Hi!

Yes, I’m using Chrome. And the browser cache was my first suspicion, too.

After some more investigations, I now found the actual cause: After editing and saving the styles.css, the Eclipse Java Builder copies the file the target/classes folder. But Jetty serves the CSS files from the target/maven-artifact+version/VAADIN/widgetsets/… folder. A ‘mvn clean install’ puts the file to the correct location. But that also includes the long running gwt compile.

I will try to find another way to copy the styles.css to the correct location automatically after saving it.

Greetings
Oliver