Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
ANT build for addons
Sorry if this is repeat, but I think I should have posted my original question here. Anyways. I am using VaadinVisualization.jar and CanvasWidget.jar in my project. I used the built in widgetcompiler in my eclipse to compile these. They did it happily. Now i am trying to build them using ant files. Do I have to include gwt-user and gwt-dev jars now? Also do I have to include the Vaalidation jars too? Please help!
Hi,
Even though this tutorial is written for NetBeans, the principles and example files should work in other IDEs as well (there's a ready-made Ant build file for compiling the widgetset): Using Add-ons in NetBeans
Cheers,
Jouni
Thanks a lot for the reply. I am not using a builder as the inbuit widget compiler already created an xml for me. I am using the same to compile the widgets. I am getting the following error:
Compiling ${widgetset}...
[java] Loading inherited module 'com.vaadin.terminal.gwt.DefaultWidgetSet'
[java] [ERROR] Unable to find 'com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[java] [ERROR] Line 4: Unexpected exception while processing element 'inherits'
and my xml file is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
<!--
Uncomment the following to compile the widgetset for one browser only.
This can reduce the GWT compilation time significantly when debugging.
The line should be commented out before deployment to production
environments.
Multiple browsers can be specified for GWT 1.7 as a comma separated
list. The supported user agents at the moment of writing were:
ie6,ie8,gecko,gecko1_8,safari,opera
The value gecko1_8 is used for Firefox 3 and later and safari is used for
webkit based browsers including Google Chrome.
-->
<!-- <set-property name="user.agent" value="gecko1_8"/> -->
<inherits name="org.vaadin.vaadinvisualizations.widgetset.VaadinvisualizationApplicationWidgetset" /><inherits name="org.vaadin.hezamu.canvas.widgetset.CanvasWidgetset" />
</module>
I was able to solve the above apecifying the vaadin jar in the classpath which I had deleted by mistake earlier :(
Well, now it seems to compile okay. Just in case if somebody needs it, here is what my build file had:
<!-- specify configurations-for-widgets-->
---------<!-- Specify classpath -->
<target name="widgets" depends="configuration-for-widgets">
<path id="widgets.classpath">
<pathelement location="${source-location}"/>
<pathelement location="${build-location}"/>
<pathelement path="${vaadin-jar-location}"/>
<pathelement path="${jars.location}/jars/gwt-user.jar" />
<pathelement path="${jars.location}/jars/gwt-dev.jar" />
<pathelement path="${jars.location}/jars/gwt-visualization.jar"/>
<pathelement path="${jars.location}/jars/gwt-incubator-20101117-r1766.jar"/>
<pathelement path="${jars.location}/jars/validation-api-1.0.0.GA.jar" />
<pathelement path="${jars.location}/jars/validation-api-1.0.0.GA-sources.jar" />
<pathelement path="${jars.location}/jars/canvaswidget-1.1.jar"/>
<pathelement path="${jars.location}/jars/VaadinVisualizations2.1.jar"/>
<fileset dir="${lib-location}"><include name="**/*.jar"/></fileset>
</path>
</target>
<!-- Build the widget set. -->
<target name="gwt-compile" depends="configuration-for-widgets, widgets">
<echo>Compiling Widgetsets</echo>
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<path refid="widgets.classpath"/>
</classpath>
<jvmarg value="-Xss1024k"/>
<arg value="${widgetset-xml}"/>
</java>
</target>