Widgetset Compile Issue

Hey guys,

we got a problem within widgetset compilation since implementing a offlineMode class for touchkit addon.

during compilation this occurs:

giving fdeedback of errors such as:

strangely the original build on my eclipse with the (plugin) built-in widgetset-compiler works. dependencies are:

vaadin 6.7.8
touchkit agpl 2.1.1
gwt-user 2.3.0
gwt-dev 2.3.0

on both systems (friends & mine) we did this dependencies via maven although. he did the compilation through a maven plugin for vaadin. colud there be any kind of problem come from?

another guess is:

i found some similar errors on vaadin trac but i have no clue which certain problem it could be. trac announces several code snippets according to the OfflineMode of Vaadin. So my idea, did i code anything not well which the maven related vaadin widgetset compiler misses?
The OfflineMode class:

import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.RepeatingCommand;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.vaadin.addon.touchkit.gwt.client.TouchKitOfflineApp;
import com.vaadin.addon.touchkit.gwt.client.VNavigationBar;
import com.vaadin.addon.touchkit.gwt.client.VNavigationView;
import com.vaadin.addon.touchkit.gwt.client.VTouchKitApplicationConnection;
import com.vaadin.addon.touchkit.gwt.client.VVerticalComponentGroup;
import com.vaadin.terminal.gwt.client.ui.VButton;


/**
 * should be an alternative displaying to default one to inform user about no internet connection and give him the
 * opportunitys to reconnect
 * 
 * doesnt work so far!!! although analogue to vornitologist example
 * (gwt.xml changed) FIXME
 * see instructions/demo here: http://demo.vaadin.com/vornitologist/VAADIN/tutorial/touchkit-tutorial.html
 * 
 * @author Christoph Hillebrand
 *         Erstelldatum: 03.01.2013 (11:06:22)
 */
public class MobileCustomerOfflineMode extends TouchKitOfflineApp implements RepeatingCommand {

	private VButton goOnlineButton;
	private Label networkStatus;
	private FlowPanel flowPanel;


	/**
	 * Instead of the basic "no connection" screen, using
	 * overridden offline app
	 */
	@Override
	protected void buildDefaultContent() {
		createUi();
	}


	private void createUi() {
		/*
		 * We'll mostly use TouchKit's client side components to build to UI and
		 * some of TouchKit's style names to build the offline UI. This way we
		 * can get similar look and feel with the rest of the application.
		 */
		VNavigationView navigationView = new VNavigationView();
		getPanel().add(navigationView);
		navigationView.setHeight("100%");
		VNavigationBar navigationBar = new VNavigationBar();
		navigationBar.setCaption("godesys ERP");
		navigationView.setNavigationBar(navigationBar);

		/*
		 * FlowPanel is the simples GWT panel, pretty similar to CssLayout in
		 * Vaadin. We can use it with some Vaadin stylenames to get e.g.
		 * similarly themed margin widths.
		 */
		flowPanel = new FlowPanel();
		flowPanel.setStyleName("v-csslayout-margin-left v-csslayout-margin-right");

		Label label = new Label("Offline Mode");
		label.setStyleName("v-label-grey-title");
		flowPanel.add(label);

		VVerticalComponentGroup p = new VVerticalComponentGroup();
		// String english =
		// "You need an internet connection to receive needed data. Please connect to the internet and go online again.";
		String german = "Internetverbindung erforderlich, um notwendige Daten zu empfangen. Bitte etablieren Sie eine Verbindung und gehen Sie dann erneut online. Gegebenenfalls ist Ihre Session abgelaufen. In diesem Fall verbinden sich sich bitte erneut.";
		p.add(new HTML("<p>" + german + "</p>"));

		flowPanel.add(p);

		showRestartButton();

		navigationView.addContent(flowPanel);

	}


	private void goOnline() {

		super.deactivate();
	}


	@Override
	public void onlineApplicationStarted() {
		// nothing to do so far - invoked if app started online again
	}


	private void showRestartButton() {

		Label label = new Label("Connetion status");
		label.setStyleName("v-label-grey-title");
		flowPanel.add(label);
		VVerticalComponentGroup vVerticalComponentGroup = new VVerticalComponentGroup();
		vVerticalComponentGroup.addStyleName("v-touchkit-verticalcomponentgroup");
		Panel p = (Panel) vVerticalComponentGroup.getWidget();

		goOnlineButton = new VButton();
		goOnlineButton.setText("Reconnect");
		goOnlineButton.addClickHandler(new ClickHandler() {

			@Override
			public void onClick(ClickEvent event) {
				goOnline();
			}
		});

		goOnlineButton.setVisible(false);

		networkStatus = new Label();
		networkStatus.getElement().getStyle().setPaddingTop(10, Unit.PX);
		networkStatus.getElement().getStyle().setPaddingBottom(10, Unit.PX);

		Scheduler.get().scheduleFixedPeriod(this, 1000);

		p.add(networkStatus);
		p.add(goOnlineButton);

		flowPanel.add(vVerticalComponentGroup);
	}


	@Override
	public void deactivate() {
		// Don't get out off offline mode automatically as user may be actively
		// filling an observation
	}


	@Override
	public boolean execute() {
		if (isActive()) {
			if (networkStatus != null) {
				if (VTouchKitApplicationConnection.isNetworkOnline()) {
					networkStatus.setText("Your network connection is on.");
					networkStatus.getElement().getStyle().setColor("green");
					goOnlineButton.setVisible(true);
				}
				else {
					networkStatus.setText("Your network connection is down.");
					networkStatus.getElement().getStyle().setColor("");
					goOnlineButton.setVisible(false);
				}

			}
			return true;
		}
		return false;
	}

}

i did change this in my gwt.xml:

<set-configuration-property
		name='touchkit.manifestlinker.additionalCacheRoot'
		value='src/main/webapp/VAADIN/themes/mobileCustomerTheme:../../../VAADIN/themes/mobileCustomerTheme' />
 
 	<replace-with
		class="com.godesys.web.mobile.widgetset.client.MobileCustomerOfflineMode">
		<when-type-is
			class="com.vaadin.addon.touchkit.gwt.client.TouchKitOfflineApp" />
	</replace-with>

my compilation worked so far. (with eclipse widgetset bulding).

i would appreciate any idea or guess! i f you need more info please let me know!

best regards, sorry for the lot of stuff i posted, hoping just this could help,

christoph hillebrand

ps:
complete outtake from my friends pom:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<relativePath>../../../services/mvn_services</relativePath>
		<groupId>com.godesys</groupId>
		<artifactId>mvn_services</artifactId>
		<version>5.5.5.0001-SNAPSHOT</version>
	</parent>
	<artifactId>VaadinMobileWidgetset</artifactId>
	<packaging>jar</packaging>
	<description>This is where the widgetset compilation occurs. This module is optional and is only rebuilt
        on demand through the 'all' profile. Compilation of the widgetset is necessary when you
        update to a new Vaadin version or you change the version of an add-on you're using.
    </description>

	<dependencies>
		<dependency>
			<groupId>com.vaadin</groupId>
			<artifactId>vaadin</artifactId>
			<version>6.7.8</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.vaadin.addon</groupId>
			<artifactId>vaadin-touchkit-agpl</artifactId>
			<version>2.1.1</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.validation</groupId>
			<artifactId>validation-api</artifactId>
			<version>1.0.0.GA</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.validation</groupId>
			<artifactId>validation-api</artifactId>
			<version>1.0.0.GA</version>
			<classifier>sources</classifier>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.godesys</groupId>
			<artifactId>VaadinMobileCustomer</artifactId>
			<version>5.5.5.0001-SNAPSHOT</version>
			<type>war</type>
			<scope>provided</scope>
		</dependency>

	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<excludes>
						<exclude>VAADIN/widgetsets/WEB-INF/**</exclude>
					</excludes>
				</configuration>
			</plugin>

			<!-- Compiles your custom GWT components with the GWT compiler -->
			<!-- A hosted mode browser for client-side widget debugging can be run 
				with the goal gwt:run after uncommenting the correct line below. A remote 
				debugger can then be connected to port 8998. Note that e.g. a Jetty server 
				should be running with the server side parts - use the goal jetty:run . -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>gwt-maven-plugin</artifactId>
				<version>${gwt.plugin.version}</version>
				<configuration>
					<!-- if you don't specify any modules, the plugin will find them -->
					<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
					<webappDirectory>${project.build.outputDirectory}/VAADIN/widgetsets</webappDirectory>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>resources</goal>
							<goal>compile</goal>
						</goals>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>com.google.gwt</groupId>
						<artifactId>gwt-dev</artifactId>
						<version>${gwt.version}</version>
					</dependency>
					<dependency>
						<groupId>com.google.gwt</groupId>
						<artifactId>gwt-user</artifactId>
						<version>${gwt.version}</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>com.vaadin</groupId>
				<artifactId>vaadin-maven-plugin</artifactId>
				<version>1.0.2</version>
				<executions>
					<execution>
						<goals>
							<goal>update-widgetset</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>com.vaadin</groupId>
										<artifactId>
											vaadin-maven-plugin
										</artifactId>
										<versionRange>
											[1.0.2,)
										</versionRange>
										<goals>
											<goal>update-widgetset</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.codehaus.mojo</groupId>
										<artifactId>
											gwt-maven-plugin
										</artifactId>
										<versionRange>
											[2.2.0,)
										</versionRange>
										<goals>
											<goal>resources</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.codehaus.mojo
										</groupId>
										<artifactId>
											build-helper-maven-plugin
										</artifactId>
										<versionRange>
											[1.6,)
										</versionRange>
										<goals>
											<goal>add-source</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

</project>

We solved it:

The client package including the OfflineApp class didnĀ“t exist in the widgetset package which contains the gwt.xml.
:grin: