Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I don't think the right thing to do is just to exclude the tests from your maven life cycle. What's the point of writen them? What you have to do is to properly configure the maven-surefire-plugin in order to make it work.</p> <p>You see, that plugin uses a system classloader to look up the classes but <strong>GWTTestCase</strong> needs an <strong>URLClassLoader</strong>. That's the reason you are getting <code>[WARN] No source path entries; expect subsequent failures</code>. and the following <code>ClassNotFoundException</code>. No worries, though. It's easy to tell maven to use a URLClassLoader instead:</p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;useSystemClassLoader&gt;false&lt;/useSystemClassLoader&gt; &lt;additionalClasspathElements&gt; &lt;additionalClasspathElement&gt;${basedir}/src/main/java&lt;/additionalClasspathElement&gt; &lt;additionalClasspathElement&gt;${basedir}/src/test/java&lt;/additionalClasspathElement&gt; &lt;/additionalClasspathElements&gt; &lt;/configuration&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;integration-test&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;test&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; </code></pre> <p>Please, notice the <code>&lt;userSystemClassLoader&gt;false&lt;/useSystemClassLoader&gt;</code> entry. Also, notice that I added the sources of my tests and main directories in order to allow GWT find the needed classes to generate the Javascript. You might need to configure it differently.</p>
 

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