WidgetSetBuilder and Scala's Simple Build Tool (SBT)

Hello boys and girls! I’m new here. First of all: Vaadin rocks!

I’m playing around with Vaadin and Scala (I didn’t know much about Java or the Java ecosystem before, coming from Perl ;-)) and I have to say that it has been the most pleasant experience.

I have even managed to hack up a simple SBT plugin which integrates WidgetSetBuilder and the GWT compiler into SBT’s build process in order to use addons from the directory. It’s working fine, except for a minor annoyance:

Let’s say that the name of my widgetset is “org.example.widgetset.MyWidgetSet”.
WidgetSetBuilder.updateWidgetSet
tries to create the widgetset- definition file in the “default” class path at line 75. In our case, the name of the file would be “$CLASSPATH/org/example/widgetset/MyWidgetSet.gwt.xml”. The problem is that when using Scala and there are no Scala source files beneath “$SOURCEDIR/org/example/widgetset/” the compiler never creates the corresponding directory in the classpath. That causes createNewFile() to blow up.

My current workaround is to put a bogus source file with meaningless content into the sourcedir, but I think that’s not very nice. I do not know if the problem also exists when using the Java compiler.

Maybe you could consider to try to create the directory where the builder puts the file first. That way I could avoid my workaround.

PS I’m planning to clean up the plugin and upload it somewhere over the weekend so that my fellow Scala coders can have a look at it.

The parent directories will be created by Vaadin 6.4.0 WidgetsetBuilder.
See
ticket 5293
.

Is the Scala plugin already somewhere available?