NoClassDefFoundError: Tests fail during Maven test phase when SureFire forkCount is greater than 0 - junit4

Issue
Java 9 / Java 10 Module Mode: Tests failing due to initializationError: java.lang.NoClassDefFoundError: Could not initialize class org.springframework.test.context.junit4.SpringRunner when SureFire forkCount > 0
Spring Boot: 2.0.1.RELEASE
Java: "10" 2018-03-20 (Vendor: Oracle Corporation)
Maven: 3.5.3
maven-compiler-plugin: 3.7.0
maven-surefire-plugin: 2.21.0
macOS: 10.12.6
Relevant stack trace
[INFO] --- maven-surefire-plugin:2.21.0:test (default-test) # turbo ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.axiom.turbo.UserControllerIntegrationTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.001 s <<< FAILURE! - in com.axiom.turbo.UserControllerIntegrationTest
[ERROR] initializationError(com.axiom.turbo.UserControllerIntegrationTest) Time elapsed: 0.001 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class org.springframework.test.context.junit4.SpringRunner
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:362)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)
Relevant section of pom.xml
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<release>${java.version}</release>
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.1.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
<configuration>
<forkCount>1</forkCount> <!-- works if set to 0 -->
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.1.1</version>
</dependency>
</dependencies>
</plugin>
If the forkCount is 0 then the tests pass and the build succeeds. It appears that SureFire fails on forking the Java process. Is this a known issue?

Related

Error only with maven: NoClassDefFoundError: feign/codec/Encoder

I created a project in Eclipse with the Maven wizard and edited the pom.xml file to include my dependencies. My project, which uses Open Feign, builds and runs in Eclipse, but I get the following runtime error when I build it at the command line with Maven:
Error: Unable to initialize main class edu.mills.cs180a.BookRepositoryImplFeign
Caused by: java.lang.NoClassDefFoundError: feign/codec/Encoder
Here is my pom.xml file:
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.mills.cs.180a</groupId>
<artifactId>book-client-example</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>book-client</name>
<description>Book REST API example</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>15</maven.compiler.target>
<maven.compiler.source> 15</maven.compiler.source>
</properties>
<dependencies>
<!-- Begin Open Feign dependencies -->
<!-- https://mvnrepository.com/artifact/io.github.openfeign/feign-core -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-core</artifactId>
<version>11.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.github.openfeign/feign-jackson -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-jackson</artifactId>
<version>11.0</version>
</dependency>
<!-- End Open Feign dependencies -->
<dependency>
<groupId>io.github.openfeign.form</groupId>
<artifactId>feign-form</artifactId>
<version>3.8.0</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>2.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
<version>2.2.5.RELEASE</version>
</dependency>
</dependencies>
</project>
To build and run it in Eclipse, I only need the first two dependencies. I added the rest in an attempt to eliminate the error.
Here is a command-line transcript:
$ mvn -v
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Program Files\apache-maven-3.6.3
Java version: 15.0.1, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-15.0.1
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
$ mvn clean
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< edu.mills.cs.180a:book-client-example >----------------
[INFO] Building book-client 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # book-client-example ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.153 s
[INFO] Finished at: 2020-11-03T10:54:18-08:00
[INFO] -----------------------------------------------------------------------
$ mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< edu.mills.cs.180a:book-client-example >----------------
[INFO] Building book-client 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # book-client-example ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\ellen\eclipse-workspace9\book-client-example\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # book-client-example ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to C:\Users\ellen\eclipse-workspace9\book-client-example\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # book-client-example ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\ellen\eclipse-workspace9\book-client-example\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # book-client-example ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # book-client-example ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # book-client-example ---
[INFO] Building jar: C:\Users\ellen\eclipse-workspace9\book-client-example\target\book-client-example-0.0.1-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.748 s
[INFO] Finished at: 2020-11-03T10:54:25-08:00
[INFO] ------------------------------------------------------------------------
$ java -cp target/book-client-example-0.0.1-SNAPSHOT.jar edu.mills.cs180a.BookRepositoryImplFeign
Error: Unable to initialize main class edu.mills.cs180a.BookRepositoryImplFeign
Caused by: java.lang.NoClassDefFoundError: feign/codec/Encoder
See also the repo.
Update
Per below answer, I added this to pom.xml:
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>edu.mills.cs180a.BookRepositoryImplFeign</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
I still get the same error when I try building and running:
$ java -jar target/book-client-example-0.0.1-SNAPSHOT.jar
Error: Unable to initialize main class edu.mills.cs180a.BookRepositoryImplFeign
Caused by: java.lang.NoClassDefFoundError: feign/codec/Encoder
The problem is how you run your code in the end.
When you compile and build your project, Maven will put all your compiled code into your jar file. This is the one you add to the classpath for execution. But you already know there are two more dependencies which you did not specify.
What you may want Maven to do is copy all your dependencies to your target folder. This can be done via the maven dependency plugin.
Next, you probably do not want to specify all the required libs on the classpath when you run your code. At least in my projects I add the main class and the classpath into the manifest using the maven jar plugin.
Here is a snippet from my pom.xml:
<project>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>edu.mills.cs180a.BookRepositoryImplFeign</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
With that in your pom you should be able to run your code like this:
java -jar target\book-client-example-0.0.1-SNAPSHOT.jar

cucumber runner files is not able to pickup features/classes when run from maven

I am able to run my cucumber runner file(as JUnit) without any issues. Tests are picked up and running fine.
But when i run through maven, though maven points to the Runner file, unable to execute tests.
Please find my maven logs and pom.xml file. Can someone help me what is missing in pom.xml? or eclipse configuration?
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building LinenHousePOC 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # LinenHousePOC ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory E:\Programming\Cucumber\LinenHousePOC\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # LinenHousePOC ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # LinenHousePOC ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # LinenHousePOC ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # LinenHousePOC ---
[INFO] Surefire report directory: E:\Programming\Cucumber\LinenHousePOC\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running runners.RunnerTest
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator#7f7052
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.041 sec
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.463 s
[INFO] Finished at: 2016-07-03T10:45:17+05:30
[INFO] Final Memory: 8M/19M
[INFO] ------------------------------------------------------------------------
Following is my pom.xml:
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>LinenHousePOC</groupId>
<artifactId>LinenHousePOC</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.41.0</version>
</dependency>
</dependencies>
</project>
Update in your POM build!!
use below configuration and run mvn clean verify. If you don't want to run tests in parallel, remove parallel, perCoreThreadCount and threadCountClasses tags. Make sure to update the regular expression to match your test naming convention **/Run*.java
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<executions>
<execution>
<id>acceptance-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<outputEncoding>UTF-8</outputEncoding>
<parallel>classes</parallel>
<perCoreThreadCount>true</perCoreThreadCount>
<threadCountClasses>10</threadCountClasses>
<argLine>-Xmx1024m</argLine>
<argLine>-XX:MaxPermSize=256m</argLine>
<includes>
<include>**/Run*.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
Executing the tests from IDE is different from executing the tests from Command Line (Maven).
In IDE, the configuration, the context variables are automatically initialized or picked when we invoke the tests. Where as in the Maven Execution, few parameters needs to be explicitly mentioned.
when you invoke a test in :
Executing tests with Maven (command line)
mvn clean test -Dcucumber.options="--format json-pretty --glue classpath:src/test/resources"
The above command will set the glue from where the tests needs to be picked by maven to invoke the tests.
This glue information is same as the information passed as input in the CucumberOptions in the CucumberRunner.java
Executing tests with Maven (using Maven Profile)
Create a profile and pass the cucumber.options as input parameters as shown below:
<profiles>
<profile>
<id>cucumber-tests</id>
<properties>
<cucumber.options>--glue src/test/resources</cucumber.options>
</properties>
. . .
</profile>
</profiles>

How do I deploy a GWT-Maven-Project?

We're trying to convert our GWT Project into Maven GWT.
Also we're using Eclipse with m2e.
My idea was to create some sort of a war file by running the project as maven install and push it to the remote server.
Whenever I try maven install, I'm getting this error:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.420s
[INFO] Finished at: Fri Jul 19 23:39:35 CEST 2013
[INFO] Final Memory: 6M/16M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project SiedlerVonCatanC: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project SiedlerVonCatanC: Compilation failure
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
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:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:858)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR]
[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/MojoFailureException
this is my pom.xml:
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>SiedlerVonCatanC</groupId>
<artifactId>SiedlerVonCatanC</artifactId>
<packaging>war</packaging>
<build>
<defaultGoal>install</defaultGoal>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.5.1</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
</goals>
<configuration>
<module>main.java.de.swp.catan.SiedlerVonCatanC</module>
<runTarget>SiedlerVonCatanC.html</runTarget>
<hostedWebapp>${webappDirectory}</hostedWebapp>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependencies>
<!-- GWT -->
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>2.5.1</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>2.5.1</version>
</dependency>
<!-- SmartGWT -->
<dependency>
<groupId>com.smartgwt</groupId>
<artifactId>smartgwt</artifactId>
<version>3.0</version>
</dependency>
<!-- Event Service -->
<dependency>
<groupId>de.novanic.gwteventservice</groupId>
<artifactId>gwteventservice</artifactId>
<version>1.2.0</version>
</dependency>
<!-- Java-Mail -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
</dependency>
<!-- Apache Commons -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.3</version>
</dependency>
<!-- htmlunit (wird im Projekt irgendwo genutzt) -->
<!-- <dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.4</version>
</dependency>-->
<!-- Guice -->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>
<!-- Connector for JDBC -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.25</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>com.smartgwt</id>
<url>http://www.smartclient.com/maven2</url>
</repository>
</repositories>
<version>0.2</version>
</project>

compiler errors when starting gwt:compile with gwt-maven-plugin

I'm trying to migrating a gwt-project to maven for a couple of days, but keep running into problems.
I tried to follow different guides and tried different pom-configurations but didn't get it to work.
At the moment, it's like this:
When I run gwt:compile, I get [ERROR] Line 8: The import de.bml.web.versandanzeige.server.model.Zyklus cannot be resolved, which is just one of many classes in my package. The error shows only up for this class. I'll post complete log below
the complete error log, with -e option:
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Versandanzeige_Web 1.0.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- gwt-maven-plugin:2.5.0:compile (default-cli) # Versandanzeige_Web ---
[INFO] Compiling module de.bml.web.versandanzeige.Versandanzeige_Web
[INFO] Validating units:
[INFO] Ignored 3 units with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[INFO] Computing all possible rebind results for 'de.bml.web.versandanzeige.client.services.KostenstelleService'
[INFO] Rebinding de.bml.web.versandanzeige.client.services.KostenstelleService
[INFO] Checking rule <generate-with class='com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator'/>
[INFO] [ERROR] Errors in 'file:/home/icarus/git/BML-connect/Versandanzeige_Web/src/main/java/de/bml/web/versandanzeige/client/dto/ZyklusDTO.java'
[INFO] [ERROR] Line 8: The import de.bml.web.versandanzeige.server.model.Zyklus cannot be resolved
[INFO] [ERROR] Line 74: Zyklus cannot be resolved
[INFO] [ERROR] Line 77: Zyklus cannot be resolved
[INFO] [ERROR] Line 80: Zyklus cannot be resolved
[INFO] [ERROR] Line 83: Zyklus cannot be resolved
[INFO] [ERROR] Line 86: Zyklus cannot be resolved
[INFO] [ERROR] Unable to find type 'de.bml.web.versandanzeige.client.services.KostenstelleService'
[INFO] [ERROR] Hint: Previous compiler errors may have made this type unavailable
[INFO] [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
... all places where Zyklus is used follow ...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.406s
[INFO] Finished at: Mon Nov 12 15:27:39 CET 2012
[INFO] Final Memory: 13M/168M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.5.0:compile (default-cli) on project Versandanzeige_Web: Command [[
[ERROR] /bin/sh -c /usr/java/jdk1.7.0_07/jre/bin/java -Xmx512m -classpath /home/icarus/git/BML-connect/Versandanzeige_Web/src/main/webapp/WEB-INF/classes:/home/icarus/git/BML-connect/Versandanzeige_Web/src/main/java:/home/icarus/git/BML-connect/Versandanzeige_Web/src/main/resources:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-plugin-api/3.2/sonar-plugin-api-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-check-api/3.2/sonar-check-api-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-colorizer/3.2/sonar-colorizer-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-channel/3.2/sonar-channel-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-duplications/3.2/sonar-duplications-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-graph/3.2/sonar-graph-3.2.jar:/home/icarus/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-squid/3.2/sonar-squid-3.2.jar:/home/icarus/.m2/repository/commons-io/commons-io/2.0.1/commons-io-2.0.1.jar:/home/icarus/.m2/repository/org/picocontainer/picocontainer/2.14.1/picocontainer-2.14.1.jar:/home/icarus/.m2/repository/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar:/home/icarus/.m2/repository/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA.jar:/home/icarus/.m2/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar:/home/icarus/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/home/icarus/.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar:/home/icarus/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/home/icarus/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar:/home/icarus/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar:/home/icarus/.m2/repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar:/home/icarus/.m2/repository/jfree/jfreechart/1.0.9/jfreechart-1.0.9.jar:/home/icarus/.m2/repository/jfree/jcommon/1.0.12/jcommon-1.0.12.jar:/home/icarus/.m2/repository/org/slf4j/slf4j-api/1.6.2/slf4j-api-1.6.2.jar:/home/icarus/.m2/repository/org/slf4j/jcl-over-slf4j/1.6.2/jcl-over-slf4j-1.6.2.jar:/home/icarus/.m2/repository/org/slf4j/log4j-over-slf4j/1.6.2/log4j-over-slf4j-1.6.2.jar:/home/icarus/.m2/repository/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar:/home/icarus/.m2/repository/xpp3/xpp3/1.1.3.3/xpp3-1.1.3.3.jar:/home/icarus/.m2/repository/org/codehaus/woodstox/woodstox-core-lgpl/4.0.4/woodstox-core-lgpl-4.0.4.jar:/home/icarus/.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar:/home/icarus/.m2/repository/org/codehaus/woodstox/stax2-api/3.0.1/stax2-api-3.0.1.jar:/home/icarus/.m2/repository/org/codehaus/staxmate/staxmate/2.0.0/staxmate-2.0.0.jar:/home/icarus/.m2/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar:/home/icarus/.m2/repository/xalan/xalan/2.7.1/xalan-2.7.1.jar:/home/icarus/.m2/repository/xalan/serializer/2.7.1/serializer-2.7.1.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-gwt-api/2.11/sonar-gwt-api-2.11.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-ws-client/2.11/sonar-ws-client-2.11.jar:/home/icarus/.m2/repository/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.jar:/home/icarus/.m2/repository/com/google/gwt/gwt-incubator/2.0.1/gwt-incubator-2.0.1.jar:/home/icarus/.m2/repository/com/google/gwt/gwt-user/2.5.0/gwt-user-2.5.0.jar:/home/icarus/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar:/home/icarus/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA-sources.jar:/home/icarus/.m2/repository/org/json/json/20090211/json-20090211.jar:/home/icarus/.m2/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar:/home/icarus/.m2/repository/org/hibernate/hibernate-entitymanager/3.5.3-Final/hibernate-entitymanager-3.5.3-Final.jar:/home/icarus/.m2/repository/org/hibernate/hibernate-core/3.5.3-Final/hibernate-core-3.5.3-Final.jar:/home/icarus/.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar:/home/icarus/.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar:/home/icarus/.m2/repository/cglib/cglib/2.2/cglib-2.2.jar:/home/icarus/.m2/repository/asm/asm/3.1/asm-3.1.jar:/home/icarus/.m2/repository/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA.jar:/home/icarus/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final/hibernate-jpa-2.0-api-1.0.0.Final.jar:/home/icarus/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1/geronimo-jta_1.1_spec-1.1.jar:/home/icarus/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar:/home/icarus/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/home/icarus/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:/home/icarus/.m2/repository/com/google/gwt/gwt-user/2.5.0/gwt-user-2.5.0.jar:/home/icarus/.m2/repository/com/google/gwt/gwt-dev/2.5.0/gwt-dev-2.5.0.jar com.google.gwt.dev.Compiler -logLevel INFO -style PRETTY -war /home/icarus/git/BML-connect/Versandanzeige_Web/src/main/webapp -localWorkers 4 -XfragmentCount -1 -gen /home/icarus/git/BML-connect/Versandanzeige_Web/target/.generated de.bml.web.versandanzeige.Versandanzeige_Web
[ERROR] ]] failed with status 1
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.5.0:compile (default-cli) on project Versandanzeige_Web: Command [[
/bin/sh -c /usr/java/jdk1.7.0_07/jre/bin/java -Xmx512m -classpath /home/icarus/git/BML-connect/Versandanzeige_Web/src/main/webapp/WEB-INF/classes:/home/icarus/git/BML-connect/Versandanzeige_Web/src/main/java:/home/icarus/git/BML-connect/Versandanzeige_Web/src/main/resources:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-plugin-api/3.2/sonar-plugin-api-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-check-api/3.2/sonar-check-api-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-colorizer/3.2/sonar-colorizer-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-channel/3.2/sonar-channel-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-duplications/3.2/sonar-duplications-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-graph/3.2/sonar-graph-3.2.jar:/home/icarus/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-squid/3.2/sonar-squid-3.2.jar:/home/icarus/.m2/repository/commons-io/commons-io/2.0.1/commons-io-2.0.1.jar:/home/icarus/.m2/repository/org/picocontainer/picocontainer/2.14.1/picocontainer-2.14.1.jar:/home/icarus/.m2/repository/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar:/home/icarus/.m2/repository/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA.jar:/home/icarus/.m2/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar:/home/icarus/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/home/icarus/.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar:/home/icarus/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/home/icarus/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar:/home/icarus/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar:/home/icarus/.m2/repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar:/home/icarus/.m2/repository/jfree/jfreechart/1.0.9/jfreechart-1.0.9.jar:/home/icarus/.m2/repository/jfree/jcommon/1.0.12/jcommon-1.0.12.jar:/home/icarus/.m2/repository/org/slf4j/slf4j-api/1.6.2/slf4j-api-1.6.2.jar:/home/icarus/.m2/repository/org/slf4j/jcl-over-slf4j/1.6.2/jcl-over-slf4j-1.6.2.jar:/home/icarus/.m2/repository/org/slf4j/log4j-over-slf4j/1.6.2/log4j-over-slf4j-1.6.2.jar:/home/icarus/.m2/repository/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar:/home/icarus/.m2/repository/xpp3/xpp3/1.1.3.3/xpp3-1.1.3.3.jar:/home/icarus/.m2/repository/org/codehaus/woodstox/woodstox-core-lgpl/4.0.4/woodstox-core-lgpl-4.0.4.jar:/home/icarus/.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar:/home/icarus/.m2/repository/org/codehaus/woodstox/stax2-api/3.0.1/stax2-api-3.0.1.jar:/home/icarus/.m2/repository/org/codehaus/staxmate/staxmate/2.0.0/staxmate-2.0.0.jar:/home/icarus/.m2/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar:/home/icarus/.m2/repository/xalan/xalan/2.7.1/xalan-2.7.1.jar:/home/icarus/.m2/repository/xalan/serializer/2.7.1/serializer-2.7.1.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-gwt-api/2.11/sonar-gwt-api-2.11.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-ws-client/2.11/sonar-ws-client-2.11.jar:/home/icarus/.m2/repository/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.jar:/home/icarus/.m2/repository/com/google/gwt/gwt-incubator/2.0.1/gwt-incubator-2.0.1.jar:/home/icarus/.m2/repository/com/google/gwt/gwt-user/2.5.0/gwt-user-2.5.0.jar:/home/icarus/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar:/home/icarus/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA-sources.jar:/home/icarus/.m2/repository/org/json/json/20090211/json-20090211.jar:/home/icarus/.m2/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar:/home/icarus/.m2/repository/org/hibernate/hibernate-entitymanager/3.5.3-Final/hibernate-entitymanager-3.5.3-Final.jar:/home/icarus/.m2/repository/org/hibernate/hibernate-core/3.5.3-Final/hibernate-core-3.5.3-Final.jar:/home/icarus/.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar:/home/icarus/.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar:/home/icarus/.m2/repository/cglib/cglib/2.2/cglib-2.2.jar:/home/icarus/.m2/repository/asm/asm/3.1/asm-3.1.jar:/home/icarus/.m2/repository/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA.jar:/home/icarus/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final/hibernate-jpa-2.0-api-1.0.0.Final.jar:/home/icarus/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1/geronimo-jta_1.1_spec-1.1.jar:/home/icarus/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar:/home/icarus/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/home/icarus/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:/home/icarus/.m2/repository/com/google/gwt/gwt-user/2.5.0/gwt-user-2.5.0.jar:/home/icarus/.m2/repository/com/google/gwt/gwt-dev/2.5.0/gwt-dev-2.5.0.jar com.google.gwt.dev.Compiler -logLevel INFO -style PRETTY -war /home/icarus/git/BML-connect/Versandanzeige_Web/src/main/webapp -localWorkers 4 -XfragmentCount -1 -gen /home/icarus/git/BML-connect/Versandanzeige_Web/target/.generated de.bml.web.versandanzeige.Versandanzeige_Web
]] failed with status 1
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:158)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
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: org.codehaus.mojo.gwt.shell.ForkedProcessExecutionException: Command [[
/bin/sh -c /usr/java/jdk1.7.0_07/jre/bin/java -Xmx512m -classpath /home/icarus/git/BML-connect/Versandanzeige_Web/src/main/webapp/WEB-INF/classes:/home/icarus/git/BML-connect/Versandanzeige_Web/src/main/java:/home/icarus/git/BML-connect/Versandanzeige_Web/src/main/resources:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-plugin-api/3.2/sonar-plugin-api-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-check-api/3.2/sonar-check-api-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-colorizer/3.2/sonar-colorizer-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-channel/3.2/sonar-channel-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-duplications/3.2/sonar-duplications-3.2.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-graph/3.2/sonar-graph-3.2.jar:/home/icarus/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-squid/3.2/sonar-squid-3.2.jar:/home/icarus/.m2/repository/commons-io/commons-io/2.0.1/commons-io-2.0.1.jar:/home/icarus/.m2/repository/org/picocontainer/picocontainer/2.14.1/picocontainer-2.14.1.jar:/home/icarus/.m2/repository/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar:/home/icarus/.m2/repository/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA.jar:/home/icarus/.m2/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar:/home/icarus/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/home/icarus/.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar:/home/icarus/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/home/icarus/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar:/home/icarus/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar:/home/icarus/.m2/repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar:/home/icarus/.m2/repository/jfree/jfreechart/1.0.9/jfreechart-1.0.9.jar:/home/icarus/.m2/repository/jfree/jcommon/1.0.12/jcommon-1.0.12.jar:/home/icarus/.m2/repository/org/slf4j/slf4j-api/1.6.2/slf4j-api-1.6.2.jar:/home/icarus/.m2/repository/org/slf4j/jcl-over-slf4j/1.6.2/jcl-over-slf4j-1.6.2.jar:/home/icarus/.m2/repository/org/slf4j/log4j-over-slf4j/1.6.2/log4j-over-slf4j-1.6.2.jar:/home/icarus/.m2/repository/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar:/home/icarus/.m2/repository/xpp3/xpp3/1.1.3.3/xpp3-1.1.3.3.jar:/home/icarus/.m2/repository/org/codehaus/woodstox/woodstox-core-lgpl/4.0.4/woodstox-core-lgpl-4.0.4.jar:/home/icarus/.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar:/home/icarus/.m2/repository/org/codehaus/woodstox/stax2-api/3.0.1/stax2-api-3.0.1.jar:/home/icarus/.m2/repository/org/codehaus/staxmate/staxmate/2.0.0/staxmate-2.0.0.jar:/home/icarus/.m2/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar:/home/icarus/.m2/repository/xalan/xalan/2.7.1/xalan-2.7.1.jar:/home/icarus/.m2/repository/xalan/serializer/2.7.1/serializer-2.7.1.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-gwt-api/2.11/sonar-gwt-api-2.11.jar:/home/icarus/.m2/repository/org/codehaus/sonar/sonar-ws-client/2.11/sonar-ws-client-2.11.jar:/home/icarus/.m2/repository/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.jar:/home/icarus/.m2/repository/com/google/gwt/gwt-incubator/2.0.1/gwt-incubator-2.0.1.jar:/home/icarus/.m2/repository/com/google/gwt/gwt-user/2.5.0/gwt-user-2.5.0.jar:/home/icarus/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar:/home/icarus/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA-sources.jar:/home/icarus/.m2/repository/org/json/json/20090211/json-20090211.jar:/home/icarus/.m2/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar:/home/icarus/.m2/repository/org/hibernate/hibernate-entitymanager/3.5.3-Final/hibernate-entitymanager-3.5.3-Final.jar:/home/icarus/.m2/repository/org/hibernate/hibernate-core/3.5.3-Final/hibernate-core-3.5.3-Final.jar:/home/icarus/.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar:/home/icarus/.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar:/home/icarus/.m2/repository/cglib/cglib/2.2/cglib-2.2.jar:/home/icarus/.m2/repository/asm/asm/3.1/asm-3.1.jar:/home/icarus/.m2/repository/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA.jar:/home/icarus/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final/hibernate-jpa-2.0-api-1.0.0.Final.jar:/home/icarus/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1/geronimo-jta_1.1_spec-1.1.jar:/home/icarus/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar:/home/icarus/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/home/icarus/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:/home/icarus/.m2/repository/com/google/gwt/gwt-user/2.5.0/gwt-user-2.5.0.jar:/home/icarus/.m2/repository/com/google/gwt/gwt-dev/2.5.0/gwt-dev-2.5.0.jar com.google.gwt.dev.Compiler -logLevel INFO -style PRETTY -war /home/icarus/git/BML-connect/Versandanzeige_Web/src/main/webapp -localWorkers 4 -XfragmentCount -1 -gen /home/icarus/git/BML-connect/Versandanzeige_Web/target/.generated de.bml.web.versandanzeige.Versandanzeige_Web
]] failed with status 1
at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo$JavaCommand.execute(AbstractGwtShellMojo.java:485)
at org.codehaus.mojo.gwt.shell.CompileMojo.compile(CompileMojo.java:365)
at org.codehaus.mojo.gwt.shell.CompileMojo.doExecute(CompileMojo.java:280)
at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo.execute(AbstractGwtShellMojo.java:172)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR]
[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/MojoExecutionException
my pom.xml:
<?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">
<modelVersion>4.0.0</modelVersion>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<!-- for gwt-incubator -->
<id>sonar</id>
<name>Sonar</name>
<url>http://repository.sonarsource.org/content/repositories/sonar</url>
<releases>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-plugin-api</artifactId>
<version>3.2</version>
<exclusions>
<exclusion>
<artifactId>ejb3-persistence</artifactId>
<groupId>org.hibernate</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-gwt-api</artifactId>
<version>2.11</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>2.5.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>2.5.0</version>
<scope>provided</scope>
</dependency>
<!-- unit tests -->
<dependency>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-testing-harness</artifactId>
<version>2.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.5.3-Final</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
</dependencies>
<groupId>de.bml-con</groupId>
<artifactId>Versandanzeige_Web</artifactId>
<packaging>war</packaging>
<version>1.0.2-SNAPSHOT</version>
<build>
<outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
<include>**/*.gwt.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webappDirectory>src/main/webapp</webappDirectory>
<webXml>src/main/webapp/WEB-INF/web.xml</webXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<configuration>
<webAppConfig>
<contextPath>/${project.name}</contextPath>
</webAppConfig>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<configuration>
<logLevel>INFO</logLevel>
<style>PRETTY</style>
<gwtVersion>2.1.0</gwtVersion>
<runTarget>de.bml.web.versandanzeige.Versandanzeige_Web/Versandanzeige_Web.html
</runTarget>
<modules>
<module>de.bml.web.versandanzeige.Versandanzeige_Web</module>
</modules>
<copyWebapp>true</copyWebapp>
<webappDirectory>src/main/webapp</webappDirectory>
</configuration>
<executions>
<execution>
<id>gwtcompile</id>
<phase>prepare-package</phase>
<goals>
<goal>compile</goal>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- manage dependencies -->
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<includeTypes>jar</includeTypes>
<stripVersion>true</stripVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<executions>
<execution>
<id>copy-deps</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<projectsDirectory>.</projectsDirectory>
<pomIncludes>
<pomInclude>pom.xml</pomInclude>
</pomIncludes>
<streamLogs>true</streamLogs>
<goals>
<goal>dependency:copy-dependencies</goal>
</goals>
<encoding>UTF-8</encoding>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
project structure:
sources:
webapp:
This project is already under version control, so I'd try to avoid starting anew.
How can I fix this problem, make it compile into a war and start in debug mode?
GWT 101: client code cannot refer to server code.
More specifically:
[INFO] [ERROR] Errors in 'file:/home/icarus/git/BML-connect/Versandanzeige_Web/src/main/java/de/bml/web/versandanzeige/client/dto/ZyklusDTO.java'
[INFO] [ERROR] Line 8: The import de.bml.web.versandanzeige.server.model.Zyklus cannot be resolved
and the server subpackage probably has no corresponding <source path="server" /> in your de/bml/web/versandanzeige/Versandanzeige_Web.gwt.xml (totally understandable though). See https://developers.google.com/web-toolkit/doc/latest/DevGuideOrganizingProjects#DevGuideDirectoriesPackageConventions and https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsClient
Is your gwt module description missing ( xxx.gwt.xml) ?

Trying to get ScalaTest working: "There are no tests to run" when doing "mvn test"

Edit: I finally got it to work!!!
It needed a combination of JUnit in the pom.xml, and three statements in my .scala:
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
#RunWith(classOf[JUnitRunner])
For some reason, trying to configure Surefire makes the tests stop running again.
I'm coding in IntelliJ, trying to get a simple ScalaTest test running via a Maven (mvn test) build process. There aren't any errors, but unfortunately no tests run either.
Here is my .scala file:
import org.scalatest.FunSuite
import org.scalatest.BeforeAndAfter
class ExampleSuite extends FunSuite with BeforeAndAfter {
before {
println("Doing setup tasks...")
}
test("Example test of checking the browser title") {
val expected_title = "Company Platform"
var actual_title = "Company Platform"
assert(actual_title == expected_title)
}
after {
println("Doing teardown tasks...")
}
}
Here's the Maven output:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for JoeTestDemo:JoeTestDemo:jar:1.0
[WARNING] 'build.plugins.plugin.version' for org.scala-tools:maven-scala-plugin is missing. # line 42, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building JoeTestDemo 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) # JoeTestDemo ---
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # JoeTestDemo ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-scala-plugin:2.15.2:compile (default) # JoeTestDemo ---
[INFO] Checking for multiple versions of scala
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[WARNING] No source files found.
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) # JoeTestDemo ---
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/Joeshaver/Projects/JoeTestDemo/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # JoeTestDemo ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-scala-plugin:2.15.2:testCompile (default) # JoeTestDemo ---
[INFO] Checking for multiple versions of scala
[INFO] includes = [**/*.scala,**/*.java,]
[INFO] excludes = []
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) # JoeTestDemo ---
[INFO] Surefire report directory: /Users/Joeshaver/Projects/JoeTestDemo/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.368s
[INFO] Finished at: Tue Oct 23 10:58:30 PDT 2012
[INFO] Final Memory: 6M/81M
[INFO] ------------------------------------------------------------------------
Here is the pom.xml. I think my Maven Scala plugin might not be right:
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>JoeTestDemo</groupId>
<artifactId>JoeTestDemo</artifactId>
<version>1.0</version>
<repositories>
<repository>
<id>scala-tools.org</id>
<name>Scala-tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>scala-tools.org</id>
<name>Scala-tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.9.0-1</version>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.9.0-1</artifactId>
<version>1.6.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<sourceDir>src/main/java</sourceDir>
<jvmArgs>
<jvmArg>-Xms64m</jvmArg>
<jvmArg>-Xmx1024m</jvmArg>
</jvmArgs>
</configuration>
</plugin>
</plugins>
</build>
</project>
You might want to use the scalatest-maven-plugin to run your scala tests.
Also make sure that you use the <scope>test</scope> for jars needed only for test purposes.
This is how I have defined my pom.xml for using ScalaTest:
<?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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.stackoverflow</groupId>
<artifactId>Q13036561</artifactId>
<version>1.0-SNAPSHOT</version>
<name>${project.artifactId}-${project.version}</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<scala.version>2.9.2</scala.version>
<scalatest.version>2.0.M4</scalatest.version>
</properties>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_${scala.version}</artifactId>
<version>${scalatest.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.15.2</version>
<executions>
<execution>
<id>scala-compile</id>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<configuration>
<args>
<arg>-make:transitive</arg>
<arg>-dependencyfile</arg>
<arg>${project.build.directory}/.scala_dependencies</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<executions>
<execution>
<id>default-test</id>
< ! - Disable the default-test by putting it in phase none - >
<phase>none</phase>
</execution>
</executions>
</plugin>
-->
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>1.0-M2</version>
<configuration>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<stdout>W</stdout> <!-- Skip coloring output -->
</configuration>
<executions>
<execution>
<id>scala-test</id>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
As you can see I have also added a section that disables the surefire plugin if you really don't want to run it. It is commented in the above pom but if you want to disable the surefire plugin just uncomment that part.
I am using IntelliJ too and there are no problems at all with this combination. Just run the tests from within IntelliJ or by using mvn test, they will both work.
If you're running on Maven, then you'll either have to annotate your test class(es) with
#RunWith(classOf[JUnitRunner])
This would require you having JUnit as a dependency. Or you could use the ScalaTest Maven Plugin (haven't used it myself though).
Adding to Blake's answer, besides #RunWith(classOf[JUnitRunner]) you might also need to set the surefire as follows:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<includes>
<include>**/*Suite.class</include>
<include>**/*Test.class</include>
<include>**/*Tests.class</include>
<include>**/*Spec.class</include>
<include>**/*Specs.class</include>
</includes>
</configuration>
</plugin>
Here's one of my Maven projects which tests just fine by ScalaTest without any special plugin: https://github.com/nikita-volkov/sext/