Do we need to gwt compile, every time? even for small changes?

i have been working on vaadin for quite a some time now.

I need to gwt compile every time even to see very small simple change.

Do i need to gwt compile every time? Is there any solution?

If you change client-side widget code, then you have to do the GWT compile since it converts the Java code to javascript, including installing new Vaadin JARs and most Vaadin Add-On (found in the Directory).

Changes to your server-side Java code do not need a GWT-compile step, even if you are subclassing an existing widget so long as the client-side widget code doesn’t also need to be changed.

If you plan to make lots of changes to your client-side widget code, I’d turn off the auto-compile and just manually compile when you are done with all your changes.

It’s pretty rare that I need to recompile my widgetsets other than installing new JAR releases.

if i change the button text and run, i wont see updated text. i need to recompile to see it

Can you give an example of your code? You only need to recompile the widgetset if you change the version of Vaadin or the add-ons you’re using (if you’re not using any add-ons, you
need to do the gwt compile). Otherwise, you just recompile your app and leave the widgetset alone.

I think you may be having a problem with compilation/deployment, not anything related to the widgetset.


Sounds like a caching-problem.

  1. Disable the browser-cache.
  2. If 1. did not help, activate debug-mode in your web.xml / portlet.xml and add ?restartApplication to your application’s URL.

Another thing that is not related to GWT compilation but might be relevant - are you using the “?restartApplication” parameter in your URL? If not, the old application instance and the components, layouts etc. created with it are still in the session so certain kinds of changes are not visible when just reloading the page.