<!-- Compiles your custom GWT components with the GWT compiler -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.3-SNAPSHOT</version>
<configuration>
<!-- if you don't specify any modules, the plugin will find them -->
<!--modules>
..
</modules-->
<webappDirectory>${project.build.directory}/${project.build.finalName}/VAADIN/widgetsets</webappDirectory>
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<runTarget>clean</runTarget>
<hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
<noServer>true</noServer>
<port>8080</port>
<soyc>false</soyc>
</configuration>
<executions>
<execution>
<goals>
<goal>resources</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Updates Vaadin 6.2+ widgetset definitions based on project dependencies -->
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<configuration>
<!-- if you don't specify any modules, the plugin will find them -->
<!--
<modules>
<module>${package}.gwt.MyWidgetSet</module>
</modules>
-->
</configuration>
<goals>
<goal>update-widgetset</goal>
</goals>
</execution>
</executions>
</plugin>
[..]
<!-- This is also used by gwt-maven-plugin to deduce GWT version number. -->
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>2.0.4</version>
<scope>provided</scope>
</dependency>
[..]
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>icepush</artifactId>
<version>0.2.0</version>
</dependency>
pl.tas.pokl.web.widgetset.MyAppWidgetSet.gwt.xml
<?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" />
</module>
In addition to the Vaadin add-on, you also need a dependency to the icepush-gwt module it is using. AFAIK, the ICEPush add-on for Vaadin does not include a pom.xml (it is not built with Maven) so you need to add the additional dependencies to your POM yourself.
Adding both jars worked (that I found here https://github.com/R2R/ICEPush-for-Vaadin in the lib). The problem is that these files can’t be found anywhere except in the some repositories. This is highly
un-Maven-ly . But to make matters worst, who created these jar? I notice the Timeline addon also uses them. So maybe it would be nice to add them to the maven repository Vaadin keeps, or at least have a link to the original Jar. If this is part of the ICEPush addon, it make sense to have them on your repository.
I’d be happy to mavenify these artifact, but someone has to point me to the source…
I’m still not happy with the maven version of the ICEPush artifact, but at least the downloaded ZIP version of the plugin includes the dependencies. Still this is a problem since I don’t know the version of these artifact or their origin. But for those stuck with a failing maven build, you can download the zip version and install the Jars on you repository.
So what is the final solution to this? I’ve been tearing out my last three hairs this morning trying to get a new project to work with ICEPush using maven. Can it be done with maven only, or do I need to download a jar somewhere and then manually force it into my maven build?
My MyAppWidgetSet.gwt.xml:
<?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>
<!-- Inherit super widgetset -->
<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
<inherits name="org.vaadin.artur.icepush.IcepushaddonWidgetset" />
<inherits name="org.icepush.gwt.ICEpush" />
<!-- adding support for icepush -->
<script src="icepush.js"></script>
</module>
…and when I run “mvn clean vaadin:update-widgetset install” I get the error seen above: “Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.2.0:compile (default) on project vaadin-test: GWT Module org.icepush.gwt.ICEpush not found in project sources or resources.”
If I need to manually include a downloaded jar in my maven build, how does someone do that?