title: Adding maven dependencies to GWT project
body: <p>I start my GWT project, and then somebody told me it's good to use maven, so i decided to try and i added maven dependencies to my project
  it generated very simple pom file:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven 4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;demo5&lt;/groupId&gt;
    &lt;artifactId&gt;demo5&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>i tried to run goals gwt:compile gwt:run, that when i run it first time downloaded lot of jars and stuck, when i run it second time it gaves me this:</p>
  
  <pre><code>[INFO] --- gwt-maven-plugin:2.4.0:compile (default-cli) @ demo5 ---
  [WARNING] The POM for com.google.gwt:gwt-servlet:jar:2.4.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
  Downloading: http://repo1.maven.org/maven2/com/google/gwt/gwt-dev/2.4.0/gwt-dev-2.4.0.jar
  Downloaded: http://repo1.maven.org/maven2/com/google/gwt/gwt-dev/2.4.0/gwt-dev-2.4.0.jar (27647 KB at 61.4 KB/sec)
  [WARNING] GWT plugin is configured to detect modules, but none were found.
  [INFO] 
  [INFO] &gt;&gt;&gt; gwt-maven-plugin:2.4.0:run (default-cli) @ demo5 &gt;&gt;&gt;
  [INFO] 
  [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ demo5 ---
  [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] skip non existing resourceDirectory C:\workspace\springsource\demo5\src\main\resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ demo5 ---
  455388 [main] ERROR org.sonatype.guice.bean.reflect.LoadedClass - Error injecting: org.apache.maven.plugin.CompilerMojo
  java.lang.NoClassDefFoundError: org/codehaus/plexus/compiler/CompilerException
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
      at java.lang.Class.getDeclaredConstructors(Class.java:1836)
      at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243)
      at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96)
      at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:609)
      at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:816)
      at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:750)
      at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:235)
      at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:185)
      at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:824)
      at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:938)
      at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:971)
      at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:932)
      at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:984)
      at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
      at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
      at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
      at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:995)
      at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
      at com.google.inject.Scopes$1$1.get(Scopes.java:59)
      at org.sonatype.guice.bean.locators.LazyQualifiedBean.getValue(LazyQualifiedBean.java:66)
      at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:54)
      at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:247)
      at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:239)
      at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:451)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:98)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
  Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.compiler.CompilerException
      at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
      ... 51 more
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 7:36.976s
  [INFO] Finished at: Sun Nov 13 22:03:36 GMT 2011
  [INFO] Final Memory: 7M/16M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project demo5: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile failed: Unable to load the mojo 'compile' in the plugin 'org.apache.maven.plugins:maven-compiler-plugin:2.3.2'. A required class is missing: org/codehaus/plexus/compiler/CompilerException
  [ERROR] -----------------------------------------------------
  [ERROR] realm =    plugin&gt;org.apache.maven.plugins:maven-compiler-plugin:2.3.2
  [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
  [ERROR] urls[0] = file:/c:/users/mad%20troll/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.jar
  [ERROR] urls[1] = file:/c:/users/mad%20troll/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar
  [ERROR] urls[2] = file:/c:/users/mad%20troll/.m2/repository/org/codehaus/plexus/plexus-compiler-api/1.8.1/plexus-compiler-api-1.8.1.jar
  [ERROR] urls[3] = file:/c:/users/mad%20troll/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/1.8.1/plexus-compiler-manager-1.8.1.jar
  [ERROR] urls[4] = file:/c:/users/mad%20troll/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/1.8.1/plexus-compiler-javac-1.8.1.jar
  [ERROR] Number of foreign imports: 1
  [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
  [ERROR] 
  [ERROR] -----------------------------------------------------: org.codehaus.plexus.compiler.CompilerException
  [ERROR] -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
  </code></pre>
  
  <p>If this will be helpful, i'm working under eclipse
  Can anyone tell me what i made wrong and how i can fix that? 
  thanks in advance.</p>