GWT Does Not Load *.nocache.js - gwt

I have this Maven project built with the gwt-maven-archetype. While it runs perfectly with the mvn gwt:run goal, however when i try to run it in the tomcat7 container either mvn tomcat:run or mvn gwt:compile && mvn tomcat:run it does not load the GWT Dynamically created widgets.
According to the Google Chrome console it cannot find the *.nocache.js file even though in the /target/ folder it is exactly where it is expected to be.
I am currently trying to display a simple "Hello" Label in the Entry Point Module :
GWT Entry Point
public class Hello implements EntryPoint {
public void onModuleLoad() {
Label hello = new Label("TESTESTSTSTS");
RootPanel.get("helloContainer").add(hello);
}
}
*.html
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="veltisto.css">
<title>Web Application Starter Project</title>
<script type="text/javascript" language="javascript" src="veltisto/veltisto.nocache.js"></script>
</head>
<body>
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
<noscript>
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
Your web browser must have JavaScript enabled
in order for this application to display correctly.
</div>
</noscript>
<div id="helloContainer"></div>
</body>
</html>
POM.XML
<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/maven-v4_0_0.xsd">
<!-- POM file generated with GWT webAppCreator -->
<modelVersion>4.0.0</modelVersion>
<groupId>gr.veltisto</groupId>
<artifactId>web</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>GWT Maven Archetype</name>
<properties>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.4.0</gwtVersion>
<!-- GWT needs at least java 1.5 -->
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.gwtbootstrap</groupId>
<artifactId>gwt-bootstrap</artifactId>
<version>2.0.4.0</version>
</dependency>
</dependencies>
<build>
<!-- Generate compiled stuff in the folder used for developing mode -->
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
<plugins>
<!-- Copy static web files before executing gwt:run -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>exploded</goal>
</goals>
</execution>
</executions>
<configuration>
<webappDirectory>${webappDirectory}</webappDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<path>/veltisto</path>
</configuration>
</plugin>
<!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.4.0</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<!-- Plugin configuration. There are many available options,
see gwt-maven-plugin documentation at codehaus.org -->
<configuration>
<runTarget>veltisto.html</runTarget>
<hostedWebapp>${webappDirectory}</hostedWebapp>
</configuration>
</plugin>
</plugins>
</build>
</project>
*.GWT.XML
<module rename-to='veltisto'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<inherits name="com.google.gwt.uibinder.UiBinder" />
<!-- We need the JUnit module in the main module, -->
<!-- otherwise eclipse complains (Google plugin bug?) -->
<inherits name='com.google.gwt.junit.JUnit' />
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard' />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<inherits name="com.google.gwt.uibinder.UiBinder" />
<inherits name="com.github.gwtbootstrap.Bootstrap" />
<!-- Specify the app entry point class. -->
<entry-point class='gr.veltisto.web.client.Hello' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
</module>

tomcat7:run only uses the src/main/webapp. You'll want to use tomcat7:run-war (which will do a package) or tomcat7:run-war-only (if you already have a war:exploded structure).

Using firebug or chrome's inspector, do you see that the .nocache.js and .cache.html file loaded correctly? Or is there an error like a 404? If there is a 404, look in the path specified by the error in your war directory - is the file there?
If the .nocache.js file is missing or in the wrong place, it likely means that the path from the *.html page you listed to the compiled JS is wrong.
If the .cache.html file is missing, it often means that the gwt:compile was skipped, or that gwt:run or gwt:debug was running during or after the compile. Do not do gwt:compile followed by gwt:run or :debug:, as these latter two will remove the compiled files.
One final thought: The tomcat:run phase might be trying to grab a completed .war file, and your war:exploded will not create one. Additionally, when you run gwt:compile, this may not cause a completed compiled war directory to be build. To deal with all of these, consider getting your build working to produce a war file first, and then try to make tomcat:run behave. The first step here would be to map gwt:compile to the prepare-package phase, then make sure that the finished war contains the .nocache.js and .cache.html files as expected.

Related

Could not understand about Maven pom file using Eclipse

I am very new to Maven and i am creating my first maven project of maven-archetype-quickstart
Then it generates the error message ::
But in my project explorer :
I am unable to understand that why it is creating a proper maven project every time it shows a red warning mark into my project and as well as in my pom.xml file.
> pom.xml
<?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.akash</groupId>
<artifactId>feind</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>feind</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- Change username in below line -->
<localRepository>/Users/COACH/.m2/repository</localRepository>
<interactiveMode>true</interactiveMode>
<offline>false</offline>
<pluginGroups>
<!-- pluginGroup
| Specifies a further group identifier to use for plugin lookup.
<pluginGroup>com.your.plugins</pluginGroup>
-->
</pluginGroups>
<proxies>
<!--
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
-->
</proxies>
<servers>
<!--
<server>
<id>deploymentRepo</id>
<username>crunchify</username>
<password>crunchify</password>
</server>
-->
</servers>
<mirrors>
<!--
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>mirror description</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-->
</mirrors>
<profiles>
</profiles>
</settings>
I am fail to understand that why this happening every time to me and my .m2\repository folder is also empty . Please suggest me some steps to fix it and properly run a maven project.
Since i am not behind any proxy so i don't need to worry about the settings.xml file i just deleted .m2 folder and just simply try to create a maven project again
and maven itself downloads the required dependencies automatically.
Hence problem is resolved.
As reputable sources go:
apache/maven PR 38 illustrates you should not define any M2_HOME (not with recent maven versions)
apache-maven/src/bin/mvn shows that, if MAVEN_HOME is not defined, it defaults to where maven is installed.
By deleting your ~/.m2 folder, you have forced Eclipse (through m2e, included in any Eclipse 4.5 or newer), to revert back to a default m2 folder.
It also uses, per FAQ, the default <maven home>/conf/settings.xml

Class 'java.io.' is not present in JRE Emulation library INTELLIJ IDEA

I am working on a GWT project in IntelliJ IDEA 15.0.4. This project compileds and runs. But IntelliJ keeps telling me that java class files are not present in JRE Emulation Library.
Please help me! Is there something missing in my maven pom.xml?
Here are the error messages:
My pom.xml:
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<verbose>true</verbose>
<fork>true</fork>
<executable>/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/javac</executable>
<compilerVersion>1.8</compilerVersion>
</configuration>
</plugin>
Here are my IntelliJ project config:
Timesheet.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='Timesheet'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<inherits name="com.vaadin.polymer.Elements"/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard' />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class='com.campus.client.Timesheet' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
<!-- <inherits name="com.google.gwt.user.theme.standard.Standard"/> -->
<inherits name="com.google.gwt.user.theme.clean.Clean"/>
<!-- For production, most teams prefer to set the default log level to `OFF` -->
<inherits name="com.allen_sauer.gwt.log.gwt-log-OFF" />
<!-- For development, a default of `DEBUG` is recommended -->
<!-- <inherits name="com.allen_sauer.gwt.log.gwt-log-DEBUG" /> -->
</module>
Unless you have the full version of IntelliJ I would strongly suggest you to use Eclipse + GWT Plugin for GWT development.
This is the reference for GWT Jre emulated class, all that is in here will work on the client side:
http://www.gwtproject.org/doc/latest/RefJreEmulation.html#Package_java_io
In your particular case seems like IntelliJ cannot find the String class either, that points out to a deeper configuration issue than a GWT related one.
I seemed to have this problem when I installed Oracle JDK 9 in Arch Linux and used that as the project SDK. After I uninstalled Oracle JDK 9 and installed OpenJDK 8, and set that as the project SDK, no errors occurred anymore. I wonder if either Java 9 or Oracle JDK is just not very nicely supported by GWT.
Another possible cause of error is that maybe I set up the SDK incorrectly. First I pointed the SDK path to /usr/lib/jvm/default-runtime, but later I changed it to the actual path (/usr/lib/jvm/java-8-openjdk).
This will help you solve your issue.. I had same issue and tried to add the dependencies..
<gwt.version>2.7.0</gwt.version>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
</dependency>

gwt 2.8 beta1 - trying to invoke a java method from javascript using jsinterop

I am trying to invoke a gwt method from javascript using latest JsInterop -
below is the head part of my html
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- -->
<!-- Consider inlining CSS to reduce the number of requested files -->
<!-- -->
<link type="text/css" rel="stylesheet" href="Home.css">
<!-- -->
<!-- Any title is fine -->
<!-- -->
<title>Web Application Starter Project</title>
<!-- -->
<!-- This script loads your compiled module. -->
<!-- If you add any GWT meta tags, they must -->
<!-- be added before this line. -->
<!-- -->
<script type="text/javascript" language="javascript" src="Home/Home.nocache.js"></script>
</head>
below is the body part of my html
<body onload="myFunction()">
<script >
function myFunction(){
alert("something to say");
var foo = new host.Employee();
foo.hello("Gautam");
}
</script>
<!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
<h1>Web Application Starter Project</h1>
<table align="center">
<tr>
<td colspan="2" style="font-weight:bold;">Please enter your name:</td>
</tr>
<tr>
<td id="nameFieldContainer"></td>
<td id="sendButtonContainer"></td>
<td id="someButton"><input type="button" value="SomeValue" onclick=myFunction()/></td>
</tr>
<tr>
<td colspan="2" style="color:red;" id="errorLabelContainer"></td>
</tr>
</table>
</body>
Here is the java class
import com.google.gwt.user.client.Window;
import jsinterop.annotations.JsMethod;
import jsinterop.annotations.JsType;
#JsType(namespace = "host" , name = "Employee" )
public class Employee implements Serializable {
private String name ;
private int age ;
private long salary ;
#JsMethod(name = "hello")
public String sayHello(String name){
String last = "Hello " + name ;
Window.alert(last);
return last ;
}
}
In the browser the body onload=myFunction() gets called and the first alert is shown always.
But clicking the button someValue shows the first alert from myFunction but the expected host.Employee() always shows a undefined
Home.html:47 Uncaught ReferenceError: host is not defined
Could you point me to what's wrong here ?
I am building with gwt-maven-plugin for 2.8.0-beta1.
Update - here is my pom content
4.0.0
<parent>
<artifactId>bi-parent-client</artifactId>
<groupId>com.pa.bi</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>com.pa.bi</groupId>
<artifactId>bi-gwt-host</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>Maven Archetype for GWT</name>
<properties>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.8.0-beta1</gwtVersion>
<!-- GWT needs at least java 1.7 -->
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt</artifactId>
<version>${gwtVersion}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- Output classes directly into the webapp, so that IDEs and "mvn process- classes" update them in DevMode -->
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<!-- Mojo's Maven Plugin for GWT -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.8.0-beta1</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
<goal>generateAsync</goal>
</goals>
</execution>
</executions>
<!-- Plugin configuration. There are many available options, see
gwt-maven-plugin documentation at codehaus.org -->
<configuration>
<runTarget>Home.html</runTarget>
<modules>
<module>com.pa.bi.gwt.host.Home</module>
</modules>
<copyWebapp>true</copyWebapp>
</configuration>
</plugin>
</plugins>
</build>
</project>
I added the
<add-linker name="xsiframe" />
<set-configuration-property name="devModeRedirectEnabled"
value="true" />
to my Home.gwt.xml module file. But still no luck
Update -
removed jsInterOpMode flag and added
<generateJsInteropExports>true</generateJsInteropExports>
and my maven gwt:run throws a weird error -
[ERROR] Unable to find 'JS_RC.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
It would typically mean I need to inherit a module and I looked for a such a module in gwt project on github but so far no luck.
This is a known issue in GWT 2.8.0-beta1 when using -generateJsInteropExports with SDM; it's been fixed but not yet released: https://github.com/gwtproject/gwt/issues/9223
Try using GWT 2.8.0-SNAPSHOT.

GWT Module XXX not found in project sources or resources

I have the widgetset compiled with the Maven goals: vaadin:update-widgetset gwt:compile. So the pom.xml and web.xml files configurations should be fine.
I'm a Maven newbie and this is my first Maven project.
After compilation the compiled code shows in src/main/webapp/VAADIN/widgetsets folder. When I try to run the install goal the error shows:
Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.2.0:resources (default) on project Validation-Manager-Web: GWT Module com.pantar.widget.graph.GraphWidget not found in project sources or resources.
Just in case here are the relevant files:
POM:
<plugins>
<!-- 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 -->
<modules>
<module>com.pantar.widget.graph.GraphWidget</module>
</modules>
<webappDirectory>src/main/webapp/VAADIN/widgetsets</webappDirectory>
<!-- On Mac running Snow Leopard, add "-d32" -->
<!-- This causes error messages (but build works) in phase "package": two processes would use the same debug
port -->
<!--extraJvmArgs>-Xmx512M -Xss1024k -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8998</extraJvmArgs -->
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<runTarget>Validation-Manager-Web</runTarget>
<hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
<noServer>true</noServer>
<port>8084</port>
<compileReport>false</compileReport>
</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>
<configuration>
<modules>
<module>com.pantar.widget.graph.GraphWidget</module>
</modules>
</configuration>
<goals>
<goal>update-widgetset</goal>
</goals>
</execution>
</executions>
</plugin>
Any ideas?
Thanks in advance!
Fixed it by adding an empty gwt.xml file with this contents:
<?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" />
<inherits name="<module>" />
</module>

Simply GWT 2.3 and Maven2(3) project in Eclipse Indigo

When I try to create Maven project with this parameters:
Archetype Group Id - org.codehaus.mojo;
Archetype Artifact Id - gwt-maven-plugin;
Archetype Version - 2.3.0-1.
I get some strange errors:
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:generateAsync (execution: default, phase: generate-sources)
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:i18n (execution: default, phase: generate-sources)
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-war-plugin:2.1.1:exploded (execution: default, phase: compile)
And some warnings as:
Implementation of project facet jst.web could not be found. Functionality will be limited.
Implementation of project facet wst.jsdt.web could not be found. Functionality will be limited.
This is my pom.xml:
<?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/maven-v4_0_0.xsd">
<!-- POM file generated with GWT webAppCreator -->
<modelVersion>4.0.0</modelVersion>
<groupId>net.test1</groupId>
<artifactId>TestWebApp</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>GWT Maven Archetype</name>
<properties>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.3.0</gwtVersion>
<!-- GWT needs at least java 1.5 -->
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- Generate compiled stuff in the folder used for developing mode -->
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
<plugins>
<!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.3.0-1</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
<goal>i18n</goal>
<goal>generateAsync</goal>
</goals>
</execution>
</executions>
<!-- Plugin configuration. There are many available options, see
gwt-maven-plugin documentation at codehaus.org -->
<configuration>
<runTarget>TestWebApp.html</runTarget>
<hostedWebapp>${webappDirectory}</hostedWebapp>
<i18nMessagesBundle>net.test1.TestWebApp.client.Messages</i18nMessagesBundle>
</configuration>
</plugin>
<!-- Copy static web files before executing gwt:run -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>exploded</goal>
</goals>
</execution>
</executions>
<configuration>
<webappDirectory>${webappDirectory}</webappDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
And so on. What is this? I have tried all possible manuals on the Internet, and everywhere the same. I tried to create project manualy without eclipse and the same. I think, the problem is that manuals in the Internet was writing for old version of Eclipse, Maven, GWT. How can I beat it? How can I just create simple project with GWT 2.3, Maven2 plugin and Eclipse Indigo without errors end warnings?
This is known behavior, discussed on the eclipse wiki. See here: http://wiki.eclipse.org/M2E_plugin_execution_not_covered.
Don't just comment out the problematic sections of your pom, you really do need them. For instance The generated comment for that maven-war-plugin in the pom is "Copy static web files before executing gwt:run" This turns out to be true. If you comment out that plugin and "mvn clean gwt:run", static files will not be copied to the target folder and be unavailable to hosted mode.
Fortunately the workaround is easy. If you open up the pom in Eclipse, look in the Overview section, and click the error message at the top, it will give you some quick fix options. Such as "Permanently mark goal exploded in pom.xml as ignored." This will add some m2e configuration to your pom so it is no longer flagged as an error, and everything will work as before. The newly generated section in your pom is what is described in the link above as the "ignore" option.
Hope this helps.