Hey everybody,
I tried to get my project working with GWT 2.0 and Maven. Unfortunately your guide didn't work. I'm always getting this message:
Build errors for qm_mvn; org.apache.maven.lifecycle.LifecycleExecutionException: Missing:
----------
1) com.google.gwt:gwt-user:jar:2.0.0
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.google.gwt -DartifactId=gwt-user -Dversion=2.0.0 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.google.gwt -DartifactId=gwt-user -Dversion=2.0.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) com.myproject:qm_mvn:war:0.0.1-SNAPSHOT
2) com.google.gwt:gwt-user:jar:2.0.0
----------
1 required artifact is missing.
for artifact:
com.myproject:qm_mvn:war:0.0.1-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
and
Offline / Missing artifact com.google.gwt:gwt-servlet:jar:2.0.0:runtime
Offline / Missing artifact com.google.gwt:gwt-user:jar:2.0.0:provided
my 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/maven-v4_0_0.xsd">
<!--
POM generated by gwt-maven-plugin archetype
-->
<modelVersion>4.0.0</modelVersion>
<groupId>com.myproject</groupId>
<artifactId>qm_mvn</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<properties>
<!-- convenience to define GWT version in one place -->
<gwt.version>2.0.0</gwt.version>
<!-- tell the compiler we can use 1.5 -->
<maven.compiler.source>1.5</maven.compiler.source>
<maven.compiler.target>1.5</maven.compiler.target>
</properties>
<dependencies>
<!-- GWT dependencies (from central repo) -->
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<!-- test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<outputDirectory>war/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>generateAsync</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<runTarget>com.myproject.qm_mvn.Application/Application.html</runTarget>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<warSourceDirectory>war</warSourceDirectory>
<webXml>src/main/webapp/WEB-INF/web.xml</webXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
If I change the GWT version to 1.7.1 it works. So is it possible that the 2.0.0 version isn't in the central?
Thanks for your answers.