How to compile my widget ?


I am a new user of Vaadin, and I would like to know how I can compile my widget.

The main problem, is that I am not using my project as an Vaadin project (in eclipse) but as a
maven project.

I have a main which instanciate a Grizzly container like that :

public static void main(String args[])
		GrizzlyWebServer grizzly = new GrizzlyWebServer(18081);

		ServletAdapter sa = new ServletAdapter();
		sa.setServletInstance(new com.vaadin.terminal.gwt.server.ApplicationServlet());
		sa.addContextParameter("productionMode", "false");
		sa.setProperty(ServletAdapter.LOAD_ON_STARTUP, "1");
		sa.addInitParameter("application", FIVApplication.class.getName());
		grizzly.addGrizzlyAdapter(sa, new String[]
			"/", "/VAADIN"

		catch(IOException e)

This is really powerfull, as I can embed my application in any normal java application.

The problem, is that eclipse don’t auto detect the fact I have added an addon (refresher), and I didn’t succeed to use the
mvn vaadin:update-widgset install

How can I make addons works in my special way to use Vaadin ?

Thanks for all, and happy new year.

I haven’t played that much with Maven myself so all I can do is to point to a wiki article and a specific line in it:

Wiki: Using Maven with Vaadin

Have you tried the gwt:compile?

Thanks Jens !

Here is why I didn’t succedd at first : my pom.xml file didn’t have the good plugins section for vaadin:update-widgetset command and neither for gwt:compile.

After finding that, I had an other problem : because I am using Vaadin v6.7.2, what are the version of theses plugins ?

So here is my build section :


			<!-- Compiles your custom GWT components with the GWT compiler -->
					<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
			<!-- Updates Vaadin 6.2+ widgetset definitions based on project dependencies -->

I don’t use the execution parameters because I don’t want it to be executed for each compilation, I have a little script, that I instantiate myself : mvn vaadin:update-widgetset gwt:compile

And finally, my last problem was that I don’t have a web.xml file, nor webapps folder, because of the instanciation of grizzly.

I had to add the sa.addInitParameter("widgetset", "com.fiv.CustomWidgetSet"); in the code I provided earlier.

I created a
file in the resources folder of my maven project with the normal content :

<?xml version="1.0" encoding="UTF-8"?>
"-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN"
	<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />

	<inherits name="com.github.wolfie.refresher.RefresherApplicationWidgetset" />

Everything works well now !

Great and thank you.