Vaadin 7 : Ivy & Example Ant Build Script


I’m still struggling with trying to build a widgetset from an ant script.

I’ve tried to go back to first principles, and simply use the ivy-template zip file as linked to on the
Vaadin Download page
(Dependency Management - Ant + Ivy section) as a start, so I can work out what I need to do manually more our main project.

As I reported yesterday
, the ivt-template archive is missing for the 7.0.3 release. I’ve downloaded the, and installed ivy.

I then created a source structure and followed the instructions on the Vaadin 7 Mini Tutorial for
Creating a simple component
, and edited the from the template to point to the appropriate places, and then ran ant.

Ivy downloaded all the jars for me, which was lovely. Thanks ivy.

But then I hit some problems :

Firstly, the default configuration of the compile widgetset target set ended up with masses and masses of logging (when redirected to a file, it ended up as +100Mb!). Easy enough to fix (changed the loglevel from DEBUG to INFO)

Secondly, all of the java classes end up getting compiled to the root of the WAR file (instead of WEB-INF/classes), which means that WAR, well, doesn’t work!

I fiddled with the build file so that the classes ended up in WEB-INF/classes, so the webapp starts - but it turns out that the compiled widgetset did not contain the MyComponent from the tutorial.

All in all, it’s a bit disheartening.

Is there any chance of a source archive (or git repository) containing an example of a simple application, consisting of a single UI, using a custom widgetset and simple new client widget (like the tutorial) and ant/ivy configuration/build that compiles and builds a working WAR?



Update : I’ve now managed to create a small sample project that contains a tiny Vaadin 7 UI with an example (no logic) widget and an SASS theme; there’s a build file that compiles it all to a deployable WAR file.

Either checkout my
GitHub csanthony/simple-vaadin-7-compile-widgetset-ivy repository
, or download it as zip from

Assuming you have
, and
installed and configured, you can simply change to the root of the project and run the ant build. See the in the repository