Vaadin7 Widgetset compilation intellij and maven

Hello,

I have a question concerning the compilation of the widgetset for my application. I seem to be unable to get it done.
I’m using intellij with maven.

If I run vaadin:compile or vaadin:update-widgetset I have the following message:

[INFO]
 Updating widgetset be.vanremortele.jcomber.ui.AppWidgetSet
[ERROR]
 sep 26, 2012 11:35:01 PM com.vaadin.server.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
[ERROR]
 INFO: Widgetsets found from classpath:
[ERROR]
 	org.vaadin.jouni.animator.AnimatorWidgetset in jar:file:C:/Users/Bart/.m2/repository/org/vaadin/addons/animator/1.7.1/animator-1.7.1.jar!/
[ERROR]
 	com.vaadin.DefaultWidgetSet in jar:file:C:/Users/Bart/.m2/repository/com/vaadin/vaadin-client/7.0.0.beta1/vaadin-client-7.0.0.beta1.jar!/
[ERROR]
 	be.vanremortele.jcomber.ui.AppWidgetSet in file://C/Java/workspace-intellij/jcombervaadin7/target/classes
[ERROR]
 
[ERROR]
 sep 26, 2012 11:35:02 PM com.vaadin.server.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
[ERROR]
 INFO: Search took 16ms

and when I start my app I just see the loading indicator in the center of the screen.

Can anyone help me?

Although the console shows those messages as errors, they are not.

The widgetset compilation should take some tens of seconds to minutes and output more after that.
When finished, check where the compiled widgetset is - maybe it is not on the deployment path of your server (you did not specify which server, how you start it or how you deploy the application etc.).

If that is the issue, this comes from a general problem of Maven not supporting a generated
webapps
directory that would automatically be included on the deployment path of all servers. For Java sources, there is an intermediate level (generated sources) but for webapps there isn’t as far as I know. This affects also other GWT applications and some others.
To get around this, you can either do server specific configuration (and/or WAR assembly configuration) about what to deploy or compile the widgetset to the src/webapps tree.

Henri,

First of all thank you for your quick response.

The widgetset compilation doesn’t take any time. It is done in less then a second so thats why I assumed it doesn’t compile anything.
I use the jetty plugin from the maven vaadin7 archetype and run my application exploded.

Am i doing it wrong? Which maven goal should normally compile the widgetset?

Try doing a “mvn clean vaadin:clean” to make sure the plug-in doesn’t consider there to be an up-to-date compiled copy - then check that there is no compiled widgetset around.

That check is identical with the check in the GWT plug-in, so we’ll need to see there if it has recurrent problems.

The jetty plug-in configuration in our archetype should include the correct directory with the compiled widgetset.

Thank you Henri, I have managed to solve my problem. It was due to a bad default run configuration for maven in my intellij paired with my lack of experience with maven and GWT. I can now compile my widgetset and run my app.

I do however have another question concerning the compilation of the widgetset and GWT dev mode. How can I compile my widgetset once and just run my app without the need for the codeserver and GWT devmode? Is this possible?

Much appreciated.

Bart

Late reply but in case you haven’t succeeded yet: running without codeserver or devmode is the normal way of running a Vaadin application - you only need to recompile the widgetset when something changes on the client side (including version upgrades or new add-ons).

To avoid recompiling the widgetset all the time, you can e.g. move the widgetset update and compilation under pluginManagement (if I remember correctly) to take it out of the build lifecycle and run it manually using “mvn vaadin:update-widgetset vaadin:compile”, or move the widgetset to a separate Maven module. Better examples on that and/or archetypes should be coming in the future.