Note that there are some explanatory texts on larger screens.

plurals
  1. POGWT maven project with server side dependencies
    primarykey
    data
    text
    <p>I have a maven GWT project under eclipse and since I added some server side dependencies the maven plugin doesn't compile anymore. Here follows more info about the context:</p> <ul> <li>maven 3.0.3;</li> <li>GWT 1.5.3;</li> <li>GWT maven plugin org.codehaus.mojo:gwt-maven-plugin:1.2 (the latest compatible with GWT 1.5.3, <a href="http://mojo.codehaus.org/gwt-maven-plugin-1.2/" rel="nofollow">http://mojo.codehaus.org/gwt-maven-plugin-1.2/</a>).</li> </ul> <p>The goal gwt:compile of the GWT maven plugin completes successfully if I don't add dependencies other than the GWT ones:</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;com.google.gwt&lt;/groupId&gt; &lt;artifactId&gt;gwt-servlet&lt;/artifactId&gt; &lt;version&gt;${gwt.version}&lt;/version&gt; &lt;scope&gt;compile&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.gwt&lt;/groupId&gt; &lt;artifactId&gt;gwt-user&lt;/artifactId&gt; &lt;version&gt;${gwt.version}&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; </code></pre> <p>When I add any other dependency, the goal gwt:compile fails:</p> <pre><code>[INFO] establishing classpath list (scope = compile) [ERROR] Exception in thread "main" java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.Compiler.&lt;init&gt;(Lorg/eclipse/jdt/internal/compiler/env/INameEnvironment;Lorg/eclipse/jdt/internal/compiler/IErrorHandlingPolicy;Lorg/eclipse/jdt/internal/compiler/impl/CompilerOptions;Lorg/eclipse/jdt/internal/compiler/ICompilerRequestor;Lorg/eclipse/jdt/internal/compiler/IProblemFactory;)V [ERROR] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.&lt;init&gt;(JdtCompiler.java:93) [ERROR] at com.google.gwt.dev.javac.JdtCompiler.&lt;init&gt;(JdtCompiler.java:231) [ERROR] at com.google.gwt.dev.javac.JdtCompiler.compile(JdtCompiler.java:193) [ERROR] at com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:115) [ERROR] at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:327) [ERROR] at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:564) [ERROR] at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:554) [ERROR] at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:214) </code></pre> <p>I did search a configuration parameter about classpath/dependencies in the gwt:compile (http://mojo.codehaus.org/gwt-maven-plugin-1.2/compile-mojo.html) with no success.</p> <p>I would like to use server side dependencies alongside GWT ones telling the GWT plugin to not consider the non-GWT dependencies.</p> <hr> <p>working pom (gwt:compile completes successfully):</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;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"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;mygroupid&lt;/groupId&gt; &lt;artifactId&gt;projectname&lt;/artifactId&gt; &lt;packaging&gt;war&lt;/packaging&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;name&gt;project name&lt;/name&gt; &lt;organization&gt; &lt;name&gt;My company&lt;/name&gt; &lt;url&gt;my company url&lt;/url&gt; &lt;/organization&gt; &lt;properties&gt; &lt;gwt.version&gt;1.5.3&lt;/gwt.version&gt; &lt;/properties&gt; &lt;build&gt; &lt;finalName&gt;final name&lt;/finalName&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;source&gt;1.5&lt;/source&gt; &lt;target&gt;1.5&lt;/target&gt; &lt;encoding&gt;UTF-8&lt;/encoding&gt; &lt;/configuration&gt; &lt;version&gt;2.5.1&lt;/version&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;ajdtVersion&gt;none&lt;/ajdtVersion&gt; &lt;/configuration&gt; &lt;version&gt;2.9&lt;/version&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;gwt-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.2&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;goals&gt; &lt;goal&gt;compile&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;configuration&gt; &lt;runTarget&gt;org.mycompany.myproject.Main/welcomeGWT.html&lt;/runTarget&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt; &lt;version&gt;2.2&lt;/version&gt; &lt;configuration&gt; &lt;warSourceDirectory&gt;war&lt;/warSourceDirectory&gt; &lt;webXml&gt;src/main/webapp/WEB-INF/web.xml&lt;/webXml&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;dependencies&gt; &lt;!-- GWT --&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.gwt&lt;/groupId&gt; &lt;artifactId&gt;gwt-servlet&lt;/artifactId&gt; &lt;version&gt;${gwt.version}&lt;/version&gt; &lt;scope&gt;compile&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.gwt&lt;/groupId&gt; &lt;artifactId&gt;gwt-user&lt;/artifactId&gt; &lt;version&gt;${gwt.version}&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/project&gt; </code></pre> <p>not working pom (gwt:compile throws exception):</p> <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;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"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;mygroupid&lt;/groupId&gt; &lt;artifactId&gt;projectname&lt;/artifactId&gt; &lt;packaging&gt;war&lt;/packaging&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;name&gt;project name&lt;/name&gt; &lt;organization&gt; &lt;name&gt;My company&lt;/name&gt; &lt;url&gt;my company url&lt;/url&gt; &lt;/organization&gt; &lt;properties&gt; &lt;gwt.version&gt;1.5.3&lt;/gwt.version&gt; &lt;/properties&gt; &lt;build&gt; &lt;finalName&gt;final name&lt;/finalName&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;source&gt;1.5&lt;/source&gt; &lt;target&gt;1.5&lt;/target&gt; &lt;encoding&gt;UTF-8&lt;/encoding&gt; &lt;/configuration&gt; &lt;version&gt;2.5.1&lt;/version&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;ajdtVersion&gt;none&lt;/ajdtVersion&gt; &lt;/configuration&gt; &lt;version&gt;2.9&lt;/version&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;gwt-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.2&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;goals&gt; &lt;goal&gt;compile&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;configuration&gt; &lt;runTarget&gt;org.mycompany.myproject.Main/welcomeGWT.html&lt;/runTarget&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt; &lt;version&gt;2.2&lt;/version&gt; &lt;configuration&gt; &lt;warSourceDirectory&gt;war&lt;/warSourceDirectory&gt; &lt;webXml&gt;src/main/webapp/WEB-INF/web.xml&lt;/webXml&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.ibatis&lt;/groupId&gt; &lt;artifactId&gt;ibatis-sqlmap&lt;/artifactId&gt; &lt;version&gt;2.3.4.726&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;net.sf.jasperreports&lt;/groupId&gt; &lt;artifactId&gt;jasperreports&lt;/artifactId&gt; &lt;version&gt;3.6.0&lt;/version&gt; &lt;/dependency&gt; &lt;!-- GWT --&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.gwt&lt;/groupId&gt; &lt;artifactId&gt;gwt-servlet&lt;/artifactId&gt; &lt;version&gt;${gwt.version}&lt;/version&gt; &lt;scope&gt;compile&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.gwt&lt;/groupId&gt; &lt;artifactId&gt;gwt-user&lt;/artifactId&gt; &lt;version&gt;${gwt.version}&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/project&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload