maven addons compilation problem

I have done everything from http://vaadin.com/directory/help/using-vaadin-add-ons/maven but when I run compilation I get an error:


[INFO]
 --- vaadin-maven-plugin:1.0.1:update-widgetset (default) @ web ---
[INFO]
 auto discovered modules [pl.tas.pokl.web.widgetset.MyAppWidgetSet]

[INFO]
 Updating widgetset pl.tas.pokl.web.widgetset.MyAppWidgetSet
[INFO]
 establishing classpath list (scope = compile)
[ERROR]
 2010-10-24 03:44:26 com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
[ERROR]
 INFO: Widgetsets found from classpath:
[ERROR]
 	pl.tas.pokl.web.widgetset.MyAppWidgetSet in file:/Users/Kuba/work/projects/pokl/web/src/main/java
[ERROR]
 	com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:/Users/Kuba/.m2/repository/com/vaadin/vaadin/6.4.4/vaadin-6.4.4.jar!/
[ERROR]
 	org.vaadin.artur.icepush.IcepushaddonWidgetset in jar:file:/Users/Kuba/.m2/repository/org/vaadin/addons/icepush/0.2.0/icepush-0.2.0.jar!/
[ERROR]
 

[..]


[ERROR]
 Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:1.3-SNAPSHOT:compile (default) on project web: GWT Module org.icepush.gwt.ICEpush not found in project sources or resources. -> [Help 1]

Can You help me please? :slight_smile:

I don’t know what I am doing wrong…

web.xml


          <servlet>
		<servlet-name>Vaadin Application Servlet</servlet-name>
		<servlet-class>org.vaadin.artur.icepush.ICEPushServlet</servlet-class>
		<!-- <servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class> -->
		<init-param>
			<description>Vaadin application class to start</description>
			<param-name>application</param-name>
			<param-value>pl.tas.pokl.web.POKLApplication</param-value>
		</init-param>
		<init-param>
			<param-name>widgetset</param-name>
			<param-value>pl.tas.pokl.web.widgetset.MyAppWidgetSet</param-value>
		</init-param>
	</servlet>

pom.xml


	<!-- 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.

Thank You! Thank You! Thank You!

I’m so stupid :grin: I was steering at it whole time and I didn’t noticed that it is
org.icepush.gwt.ICEpush
not
org.vaadin.artur.icepush.ICEpush
:slight_smile:

Guys, I’m having this problem and I don’t understand your solution - what is it I need to put in my pom.xml, please? :slight_smile:

Thanks in advance!

Also having this problem, what was the solution? Where is the jar file ice-pushGWT

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 my pom.xml includes these:

    <repository>
      <id>vaadin-addons</id>
      <url>http://maven.vaadin.com/vaadin-addons</url>
    </repository>
  </repositories>
      <dependency>
          <groupId>org.vaadin.addons</groupId>
          <artifactId>icepush</artifactId>
          <version>0.2.1</version>
      </dependency>

…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?

Thanks,
Bobby

First you must add the icepush.jar and icepush-gwt.jar to your local repository them add this to your pom.xml

   <dependency>
       <groupId>org.icepush</groupId>
       <artifactId>icepush</artifactId>
       <version>2.0.0-alpha3</version>
    </dependency>
    <dependency>
       <groupId>org.icepush</groupId>
       <artifactId>icepush-gwt</artifactId>
       <version>2.0.0-alpha3</version>
       <scope>provided</scope>
    </dependency>