Hi,
I had to reinstall my machine and backuped a bigger vaadin project. After that I reinstalled Eclipse+ VaadinPlugin.
Before reinstall I used Vaadin 7.3 and after reinstalling noted inmediatly it would be more easy to create a new vaadin 7.7.8 project and migrating my source code instead of trying to get the old project to run.
I did note the different project structure and that the build system changed from ivy to maven. I am fighting now four days to a custom widget included inside this project to compile, that uses Henri Kerolas gwt-graphics-1.0.0 add on, without any success so far. The error messages produced by widget set compilation are:
The type org.vaadin.gwtgraphics.client.VectorObject cannot be resolved. It is indirectly referenced from required .class files VisionDataModelEditorWidget.java /vcweb/src/main/java/com/example/vcweb/widgetset/client
and
[b]
GWT Module org.vaadin.gwtgraphics.GWTGraphics not found in project sources or resources. (com.vaadin:vaadin-maven-plugin:7.7.8:compile:default:process-classes)
org.apache.maven.plugin.MojoExecutionException: GWT Module org.vaadin.gwtgraphics.GWTGraphics not found in project sources or resources.
at org.codehaus.mojo.gwt.shell.CompileMojo.compilationRequired(CompileMojo.java:701)
at org.codehaus.mojo.gwt.shell.CompileMojo.compile(CompileMojo.java:567)
at org.codehaus.mojo.gwt.shell.CompileMojo.doExecute(CompileMojo.java:435)
at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo.execute(AbstractGwtShellMojo.java:182)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360)
at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52)
at com.vaadin.integration.eclipse.maven.VaadinMojoExecutionBuildParticipant.build(VaadinMojoExecutionBuildParticipant.java:87)
[/b]
I am running out of ideas, so any help on this really appreciated. I will attach a screen shot of the project structure and source code, which I suspect to be related with the error.
The class VisionDataEditorWidget cannot compile because it is missing all imports org.vaadin.gwtgraphics.client.*
package com.example.vcweb.widgetset.client;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Random;
import org.vaadin.gwtgraphics.client.DrawingArea;
import org.vaadin.gwtgraphics.client.Line;
import org.vaadin.gwtgraphics.client.VectorObject;
import org.vaadin.gwtgraphics.client.shape.Rectangle;
import com.example.vcweb.widgetset.client.DataModelEditorWidgetConfiguration.AlignType;
import com.example.vcweb.widgetset.client.drawable.DrawableManager;
import com.example.vcweb.widgetset.client.drawable.def.Drawable;
import com.example.vcweb.widgetset.client.drawable.def.Drawable.Point;
import com.example.vcweb.widgetset.client.drawable.def.VisionProcessorDrawable;
import com.example.vcweb.widgetset.client.drawable.impl.ShapeWithTextDrawable;
import com.example.vcweb.widgetset.client.drawable.impl.ShapeWithTextDrawable.ShapeType;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.DomEvent;
import com.google.gwt.event.dom.client.MouseDownEvent;
import com.google.gwt.event.dom.client.MouseDownHandler;
import com.google.gwt.event.dom.client.MouseMoveEvent;
import com.google.gwt.event.dom.client.MouseMoveHandler;
import com.google.gwt.event.dom.client.MouseUpEvent;
import com.google.gwt.event.dom.client.MouseUpHandler;
import com.google.gwt.event.dom.client.MouseWheelEvent;
import com.google.gwt.event.dom.client.MouseWheelHandler;
import com.vaadin.client.ui.VPanel;
public class VisionDataModelEditorWidget extends VPanel
implements MouseDownHandler, MouseUpHandler, MouseMoveHandler, MouseWheelHandler, ClickHandler {
private DrawingArea _dwArea = null;
private long _gridMap;
private boolean _dragGrid;
private boolean _clicked = false;
ViewPortState _zoomState = null;
public DrawableManager _dwmanager;
Random rand = new Random(34456747L);
public List<ShapeWithTextDrawable> _texts;
public VisionDataModelEditorWidget()
{
super();
// setSize(SCREEN_SIZE + "px", SCREEN_SIZE + "px");
_dwmanager = new DrawableManager();
_texts = new ArrayList<ShapeWithTextDrawable>();
_gridMap = new long[GRIDX_SIZE]
[GRIDY_SIZE]
;
_dwArea = new DrawingArea(SCREEN_SIZE, SCREEN_SIZE);
_dwArea.setStyleName("screen");
_dwArea.addMouseDownHandler(this);
_dwArea.addMouseUpHandler(this);
_dwArea.addMouseMoveHandler(this);
_dwArea.addMouseWheelHandler(this);
_dwArea.addClickHandler(this);
add(_dwArea);
_zoomState = new ViewPortState();
drawViewport(_zoomState);
_dragGrid = false;
}
VcWebWidgetSet.gwt.xml has the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.vaadin.DefaultWidgetSet" />
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<inherits name='com.google.gwt.event.Event'/>
<inherits name='org.vaadin.gwtgraphics.GWTGraphics'/>
<source path="client" />
<!--
Uncomment the following to compile the widgetset for one browser only.
Multiple browsers can be specified as a comma separated list. The
supported user agents at the moment of writing were:
ie8,ie9,gecko1_8,safari,opera
The value gecko1_8 is used for Firefox and safari is used for webkit
based browsers including Google Chrome.
-->
<!-- <set-property name="user.agent" value="safari"/> -->
<!--
To enable SuperDevMode, uncomment this line.
See https://vaadin.com/wiki/-/wiki/Main/Using%20SuperDevMode for more
information and instructions.
-->
<set-configuration-property name="devModeRedirectEnabled" value="true" />
</module>
pom.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>com.example</groupId>
<artifactId>vcweb</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>vcweb</name>
<prerequisites>
<maven>3</maven>
</prerequisites>
<properties>
<vaadin.version>7.7.8</vaadin.version>
<vaadin.plugin.version>7.7.8</vaadin.plugin.version>
<jetty.plugin.version>9.3.9.v20160517</jetty.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- If there are no local customisations, this can also be "fetch" or "cdn" -->
<vaadin.widgetset.mode>local</vaadin.widgetset.mode>
</properties>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-push</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiled</artifactId>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>gwt-graphics</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiler</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<!-- Exclude an unnecessary file generated by the GWT compiler. -->
<packagingExcludes>WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<configuration>
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<draftCompile>false</draftCompile>
<compileReport>false</compileReport>
<style>OBF</style>
<strict>true</strict>
</configuration>
<executions>
<execution>
<goals>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
<!-- Comment out compile-theme goal to use on-the-fly theme compilation -->
<goal>compile-theme</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
<!-- Clean up also any pre-compiled themes -->
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp/VAADIN/themes</directory>
<includes>
<include>**/styles.css</include>
<include>**/styles.scss.cache</include>
</includes>
</fileset>
<fileset>
<directory>src/main/webapp/VAADIN/widgetsets</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<!-- The Jetty plugin allows us to easily test the development build by
running jetty:run on the command line. -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.plugin.version}</version>
<configuration>
<scanIntervalSeconds>2</scanIntervalSeconds>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- Vaadin pre-release repositories -->
<id>vaadin-prerelease</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<repositories>
<repository>
<id>vaadin-prereleases</id>
<url>http://maven.vaadin.com/vaadin-prereleases</url>
</repository>
<repository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>vaadin-prereleases</id>
<url>http://maven.vaadin.com/vaadin-prereleases</url>
</pluginRepository>
<pluginRepository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</project>
Thanks for every hint on this, I am almost desillusionated!