I posted already another thread, but so far no response. This is the last try and I hope someone can help me:
In my project, I use Maven and Vaadin TouchKit. But the WidgetSet compilation doesn’t work. How can I do this?
I’m getting the following error message:
“Widgetset does not contain implementation for org.vaadin.touchkit.TouchPanel. Check its @ClientWidget mapping, widgetsets GWT module descrioption file and re-compile your widgetset. (…)”
But no success. I’m struggling with the compilation of the widgetset.
Do I have to change anything in the pom.xml?
Which goal do I have to execute?
The plugin definition in my pom.xml looks like this:
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<configuration>
<!-- if you don't specify any modules, the plugin will find them -->
<modules>
<!--
What to specify here?
<module>org.vaadin.touchkit.widgetset</module>
-->
</modules>
</configuration>
<goals>
<goal>update-widgetset</goal>
[Edit]
I should mention that I'm using Maven to build my project. </goals>
</execution>
</executions>
</plugin>
Do you mean that this goal fails or that it simply does not fix your original problem?
Normally, you should only need to add a dependency to the Vaadin TouchKit to your pom.xml dependencies section - no other change should be necessary.
Note that with Maven, you cannot simply copy a JAR to a project but you have to install it to your local maven repository and then add a dependency to it in your own pom.xml, e.g.
You should then be able to execute the goals “gwt:clean vaadin:update-widgetset package”.
This change should not be necessary, the modules are normally auto-detected. If you do want to specify the module yourself, it should at least point to your own widgetset GWT module (the .gwt.xml file without the extension) and possibly some additional modules you might need.
thank you for your reply. I think the Maven goal doesn’t work as expected, at least it doesn’t detect the module:
[WARNING]
GWT plugin is configured to detect modules, but none where found.
[INFO]
No widgetsets to update.
[INFO]
To create a widgetset, define a non-existing module in your pom.xml .
In my dependencies I have added the touchkit, of course:
runs successfully, but gives the same warning message as above.
I’m using a standard Maven directory structure.
The point is, that I’m not using my own widgetset, but the Touchkit (well, of course you know that), and therefore I think that maybe the module doesn’t get automatically detected because it is located in a JAR file…
The goal vaadin:update-widgetset should create a widgetset if it does not exist, and update it to refer to the sub-widgetsets in extension JARs etc. Maybe the widgetset is created in the wrong location in this case, e.g. some generated code directory.
The standard setup (when using your own custom widgets or ones from add-on JARs) is to have a widgetset in your own project that simply inherits the default widgetset and any add-on specific ones.
You could try to create an empty widgetset by hand, and see if it gets correctly updated by the goal vaadin:update-widgetset after creation, or even set it up completely by hand - here is an example of how the widgetset (e.g. com/example/MyWidgetSet.gwt.xml) could look like for the TouchKit:
<?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" />
<!-- This comes from the MANIFEST.MF of the TouchKit JAR -->
<inherits name="org.vaadin.touchkit.widgetset.TouchKitWidgetset" />
</module>
Good trick, but unfortunately, not very successful.
My own widgetset gets detected, but the compilation obviously fails. No idea what’s wrong. I added the output to this post.
Here’s a short snippet:
[INFO]
using GWT jars from project dependencies : 1.7.1
[INFO]
auto discovered modules [org.cloudme.runtrack.widgetset.MyWidgetSet]
[INFO]
establishing classpath list (scope = compile)
[INFO]
establishing classpath list (scope = compile)
[INFO]
establishing classpath list (scope = compile)
[INFO]
establishing classpath list (scope = compile)
[INFO]
Compiling module org.cloudme.runtrack.widgetset.MyWidgetSet
[INFO]
Refreshing module from source
[INFO]
Validating newly compiled units
[INFO]
Removing units with errors
[INFO]
[ERROR]
Errors in 'jar:file:/home/moritz/.m2/repository/com/vaadin/vaadin/6.3.0.pre1/vaadin-6.3.0.pre1.jar!/com/vaadin/terminal/gwt/client/VUIDLBrowser.java'
[INFO]
[ERROR]
Line 29: The import com.google.gwt.dom.client.Style.Position cannot be resolved
[INFO]
[ERROR]
Line 30: The import com.google.gwt.dom.client.Style.Unit cannot be resolved
[INFO]
[ERROR]
Line 220: Position cannot be resolved
[INFO]
[ERROR]
Line 221: The method setZIndex(int) is undefined for the type Style
[INFO]
[ERROR]
Line 222: The method setBackgroundColor(String) is undefined for the type Style
[INFO]
[ERROR]
Line 223: The method setOpacity(double) is undefined for the type Style
[INFO]
[ERROR]
Line 233: Unit cannot be resolved
[INFO]
[ERROR]
Line 234: Unit cannot be resolved
[INFO]
[ERROR]
Line 235: Unit cannot be resolved
[INFO]
[ERROR]
Line 236: Unit cannot be resolved
[INFO]
[ERROR]
Errors in 'jar:file:/home/moritz/.m2/repository/com/vaadin/vaadin/6.3.0.pre1/vaadin-6.3.0.pre1.jar!/com/vaadin/terminal/gwt/client/ui/richtextarea/VRichTextToolbar.java'
[INFO]
[ERROR]
Line 41: The import com.google.gwt.resources cannot be resolved
[INFO]
[ERROR]
Line 42: The import com.google.gwt.resources cannot be resolved
The errors in the earlier post are because you were using the wrong (old) GWT version. The new “errors” are actually not errors but text output to stderr, which maven prefixes with [ERROR]
. If there are no other “errors” than the list of the widgets included, it should work.
thank you for the explanation. But it’s totally weird: still no success.
I tired with the “MyWidgetSet” trick, and that actually copied the widgetset files to the VAADIN/widgetsets/… directory, so that is fine.
But when I remove “MyWidgetSet”, nothing is detected by the Maven plugin. The VAADIN/widgetsets/… directory is empty.
The Maven output is:
[INFO]
[gwt:compile {execution: default}]
[INFO]
using GWT jars from project dependencies : 2.0.3
[WARNING]
GWT plugin is configured to detect modules, but none where found.
[INFO]
establishing classpath list (scope = compile)
[INFO]
[vaadin:update-widgetset {execution: default}]
[WARNING]
GWT plugin is configured to detect modules, but none where found.
… and when I explicitly configure TouchKit module in Maven,
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<configuration>
<!-- if you don't specify any modules, the plugin will find them -->
<modules>
<module>org.vaadin.touchkit.widgetset.TouchKitWidgetset</module>
</modules>
</configuration>
<goals>
<goal>update-widgetset</goal>
</goals>
</execution>
</executions>
</plugin>
I get the following error message:
[INFO]
[gwt:compile {execution: default}]
[INFO]
using GWT jars from project dependencies : 2.0.3
[WARNING]
GWT plugin is configured to detect modules, but none where found.
[INFO]
establishing classpath list (scope = compile)
[INFO]
[vaadin:update-widgetset {execution: default}]
[INFO]
Updating widgetset org.vaadin.touchkit.widgetset.TouchKitWidgetset
[INFO]
establishing classpath list (scope = compile)
[ERROR]
Apr 13, 2010 6:44:17 PM com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
[ERROR]
INFO: Widgetsets found from classpath:
[ERROR]
com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:/home/moritz/.m2/repository/com/vaadin/vaadin/6.3-SNAPSHOT/vaadin-6.3-SNAPSHOT.jar!/
[ERROR]
org.vaadin.touchkit.widgetset.TouchKitWidgetset in jar:file:/home/moritz/.m2/repository/org/vaadin/vaadin-touchkit/0.5/vaadin-touchkit-0.5.jar!/
[ERROR]
[ERROR]
Exception in thread "main" java.io.IOException: No such file or directory
[ERROR]
at java.io.UnixFileSystem.createFileExclusively(Native Method)
[ERROR]
at java.io.File.createNewFile(File.java:900)
[ERROR]
at com.vaadin.terminal.gwt.widgetsetutils.WidgetSetBuilder.updateWidgetSet(WidgetSetBuilder.java:75)
[ERROR]
at com.vaadin.terminal.gwt.widgetsetutils.WidgetSetBuilder.main(WidgetSetBuilder.java:51)
[INFO]
------------------------------------------------------------------------
[ERROR]
BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO]
Command [[
/bin/sh -c /usr/lib/jvm/java-6-openjdk/jre/bin/java -Xmx512m -classpath "/home/moritz/workspace/runtrack/src/main/java":"/home/moritz/workspace/runtrack/src/main/resources":"/home/moritz/workspace/runtrack/target/classes":"/home/moritz/.m2/repository/com/google/appengine/appengine-testing/1.3.2/appengine-testing-1.3.2.jar":"/home/moritz/.m2/repository/org/apache/geronimo/specs/geronimo-servlet_2.5_spec/1.2/geronimo-servlet_2.5_spec-1.2.jar":"/home/moritz/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15.jar":"/home/moritz/.m2/repository/javax/mail/mail/1.4/mail-1.4.jar":"/home/moritz/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar":"/home/moritz/.m2/repository/javax/jms/jms/1.1/jms-1.1.jar":"/home/moritz/.m2/repository/com/sun/jdmk/jmxtools/1.2.1/jmxtools-1.2.1.jar":"/home/moritz/.m2/repository/com/sun/jmx/jmxri/1.2.1/jmxri-1.2.1.jar":"/home/moritz/.m2/repository/com/google/appengine/appengine-api-1.0-sdk/1.3.2/appengine-api-1.0-sdk-1.3.2.jar":"/home/moritz/.m2/repository/com/googlecode/objectify/objectify/2.0.2/objectify-2.0.2.jar":"/home/moritz/.m2/repository/com/vaadin/vaadin/6.3-SNAPSHOT/vaadin-6.3-SNAPSHOT.jar":"/home/moritz/.m2/repository/org/vaadin/vaadin-touchkit/0.5/vaadin-touchkit-0.5.jar":"/home/moritz/.m2/repository/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar":"/home/moritz/.m2/repository/com/google/gwt/gwt-user/2.0.3/gwt-user-2.0.3.jar" com.vaadin.terminal.gwt.widgetsetutils.WidgetSetBuilder org.vaadin.touchkit.widgetset.TouchKitWidgetset
]] failed with status 1
just wanted to give you a short status of the achievements in this case so far:
Using the latest versions seems to help a bit. Therefore I had to change the dependencies versions in the Maven pom.xml to Vaadin 6.3.0 and GWT 2.0.3.
The trick creating my own widgetset which inherits TouchKitWidgetset is the way to go. I just forgot to change the servlet’s init parameter to set the custom widgetset.
==> With the custom widgetset it works! But:
When I’m changing the widgetset to “org.vaadin.touchkit.widgetset.TouchKitWidgetset” the website only shows a spinning progress-wheel and after a while an error message (see attachment).
Using a custom widgetset
and defining an entrypoint there is the solution:
<module>
<!--
This is needed because of a bug in gwt-maven-plugin 1.2
(http://jira.codehaus.org/browse/MGWT-147):
modules without entry points are never compiled.
-->
<entry-point class="com.vaadin.terminal.gwt.client.DefaultWidgetSet" />
<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
<inherits name="org.vaadin.touchkit.widgetset.TouchKitWidgetset" />
</module>