Vaadin app without Eclipse

I tried to read The book of Vaadin and couldn’t understand how the bloody item works without Eclipse :slight_smile: To be clear, for example I write on GWT - there is a GWT compiler, there are specific ant-tasks so I can type “ant build” and ant compiles server java code into java bytecode and client code will be compiled into js-code. And finally it will be packed into war file.
Lo, I wrote a sample Vaadin app and I want to create web application. I wrote Java code and Vaadin will create server and client part of application itself. How can I make a war without Eclipse? I wanna use ONLY Java, Ant and Vaadin libs! I hate repeat hate Eclipse and all -eclipse-stuffs :slight_smile:
Will you help the old grumbler :slight_smile:

First you need to understand the main idea behind vaadin: you are always writing server side code.

Why don’t you need to create client side? Because vaadin team already created smart cliend side
framework which can build client ui from server instructions!

Each component has two classes: server side (e.g. Table) and client side (e.g. VTable).
When you writing vaadin app you are using server side components.
Client side components are actually GWT components (and some of them are wrappers
around GWT components). Each component can read it’s state from the server.
All vaadin client side components are precompiled into normal GWT file (which are packaged inside vaadin jar)
(use firebug or chrome and look what files e.g. Sampler loads)

To use vaadin you just need to put vaadin jar into web-inf/lib and register vaadin servlet and specify
the class of your application as servlet parameter, thats all.
(see example application in e.g. Navigator7 addon source:

When you need to use addons you may need to recomple widgetset (if addon includes client side widget).
It is described in vaadin book (10.x chapter, don’t remember exactly). Example ant script is packaged into vaadin distribution or can be downloaded here

UPDATE: sorry if I get your question wrong, I thought it was about vaadin essentials

  • untill you don’t need to create custom widget. in this case you will have to write GWT code


You’re right, there isn’t much documentation on how to build Vaadin apps with just Ant. You can find the
script from the installation package; it builds the client-side and server-side, but it doesn’t package a WAR.

Packaging a war is documented in
Ant Manual
. It goes generally somewhat as follows:

	<target name="book-examples.war">
		<property name="result-path" value="build/result" />
		<property name="result.classes" value="build/classes" />
		<property name="" value="book-examples" />

		<war destfile="${result-path}/${}.war" webxml="WebContent/WEB-INF/web.xml">
			<classes dir="${result.classes}" includes="**" />
			<lib dir="WebContent/WEB-INF/lib" excludes="*src*" />

			<!-- Include the built widget set and theme. -->
			<fileset dir="WebContent">
					<include name="VAADIN/widgetsets/**/*" />
					<include name="VAADIN/themes/book-examples/**/*" />

Look Mr Rusakov I have seen the build-widgetset.xml. Maybe I’m so stupid, but…
I really do not understand at all.

  1. jar target depends no from compiler-server-side. WHAT HELL???
    2.There is “configure-widgetset” target. Also there is “generate-widgetset” target that depends from first one. I couldnot understand what class should I point there?
    Look. I have typed a simple example - Need I recompile widgets?
    Really I’m knockin’ onto a wall :slight_smile:

PS Your name is Rusakov so I may assume you’re russain like me. So two russian guys chat on english. It’s strange, isnt’ it? :slight_smile:

That could be a bug, the server-side needs to be compiled.

What is the problem there? The generate-widgetset target is not needed for building an add-on JAR, as the widget set has to be compiled by the user of the add-on JAR. Nevertheless, building an add-on JAR needs to know the widget set name, which is defined in the configure-widgetset target.

Please note that the build-widgetset.xml is meant for building a) widget sets, b) add-on JARs (in which case the widget set does not need to be built). It’s not for building a regular Vaadin app that doesn’t use add-ons or custom widget sets.

The tutorial does not use any add-on components or custom widgets, so no, you don’t need to compile widgets for such a project. If you have already compiled a widgetset, you can safely remove it.

Marko completely answers your question, so I just answer the part adressed to me

Yes, I am.
Regarding language, I think the fact that we both speak english is a really great thing!
For example, If we were both talking russian here, Marko may not answer you (or any other vaadin developer).

And little note about vaadin: I’ve started using vaadin in IDEA and have no troubles with it. Think of it as just another web framework, like struts or spring mvc. Do not worry about widgetsets and addons for the first time, this therms are little confusing first time.

Well Mr Rusakov :slight_smile:
I use chat English but it’s enough difficult to learn somethin’ new on a foreign language. So my icq is 485-638-696, my email is, my Google account is “hms.cruiser”. May I ask you to knock me? I sure you may be useful for me and I shall try to be useful for thou, “ka me - ka thee” (c)

You’ve really cleared my screen :slight_smile: God bless you!