Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-508

cannot run GWTTestCases with surefire

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.3
    • 2.11
    • classloading
    • None

    Description

      GWTTestCase require some complex setup, as tje GWT compiler requires acces to the java sources, and classpath scanning for available jars at runtime :

      <plugin>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
      <additionalClasspathElements>
      <additionalClasspathElement>src/main/java</additionalClasspathElement>
      <additionalClasspathElement>src/test/java</additionalClasspathElement>
      <additionalClasspathElement>target/generated-sources/gwt</additionalClasspathElement>
      </additionalClasspathElements>
      <useManifestOnlyJar>false</useManifestOnlyJar>
      <systemProperties>
      <property>
      <name>gwt.args</name>
      <value>-out target/www-test</value>
      </property>
      </systemProperties>
      <argLine>-Xmx256M</argLine>
      </configuration>
      </plugin>

      Even with this configuration, the test fails with a tomcat ClassCastException "GWTShellServlet is not a Servlet"

      I may be wrong, but it seems the useManifestOnlyJar=false mode still uses the tmp file classpath elements to build it's classpath, and not the system classpath.

      Attachments

        Activity

          People

            krosenvold Kristian Rosenvold
            ndeloof nicolas de loof
            Votes:
            12 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: