Required class is missing: org/codehaus/gmaven/mojo/GroovyMojo when tried to run to generate report and send an email in the Maven Project - eclipse

I have Maven JUnit Project, which compiles, builds and tests successfully. Also when I do the mvn site all the tests run successfully and generates the surefire-report at ..\target\site.. directory.
Now, I need to send an email this report to given recipients.
Here is my POM:
<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>xxxx</groupId>
<artifactId>EmailReportMaven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name></name>
<description></description>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.18.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-core</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>ch.fortysix</groupId>
<artifactId>maven-postman-plugin</artifactId>
<version>0.1.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>appmodels</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>false</testFailureIgnore>
</configuration>
<version>2.7.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.18.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.6</version>
<configuration>
<generateSitemap>true</generateSitemap>
<generateReports>true</generateReports>
</configuration>
</plugin>
<plugin>
<groupId>ch.fortysix</groupId>
<artifactId>maven-postman-plugin</artifactId>
<version>0.1.6</version>
<executions>
<execution>
<id>send_an_mail</id>
<goals>
<goal>send-mail</goal>
</goals>
<inherited>false</inherited>
<phase>test</phase>
<configuration>
<from>mailID</from>
<subject>this is a test auto email sent from Eclipse using Maven</subject>
<htmlMessage><![CDATA[<p>Hi, Please find attached.</p>]]></htmlMessage>
<failonerror>true</failonerror>
<mailhost>host</mailhost>
<mailport>port</mailport>
<mailssl>true</mailssl>
<mailAltConfig>true</mailAltConfig>
<mailuser>emailID</mailuser>
<mailpassword>password</mailpassword>
<receivers>
<receiver>emailID</receiver>
</receivers>
<fileSets>
<fileSet>
<directory>${basedir}/target/site</directory>
<includes>
<include>**/surefire-report.html</include>
</includes>
</fileSet>
</fileSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<versionRange>[1.10,)</versionRange>
<goals>
<goal>add-source</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<reporting>
<plugins>
<!-- Include the unit test reports in the site -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.18.1</version>
</plugin>
</plugins>
Below errors are thrown when mvn surefire-report:report postman:send-mail is run:
[INFO] --- maven-postman-plugin:0.1.6:send-mail (Report Generation) # EmailReportMaven ---
[WARNING] Error injecting: ch.fortysix.maven.plugin.postaman.MailSenderMojo
java.lang.TypeNotPresentException: Type
ch.fortysix.maven.plugin.postaman.MailSenderMojo not present
at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:147)
at org.eclipse.sisu.space.NamedClass.load(NamedClass.java:46)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:65)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:519)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:121)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
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:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.NoClassDefFoundError: org/codehaus/gmaven/mojo/GroovyMojo
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:139)
... 41 more
Caused by: java.lang.ClassNotFoundException: org.codehaus.gmaven.mojo.GroovyMojo
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 70 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.073 s [INFO] Finished at:
2017-07-05T18:47:50-05:00 [INFO] Final Memory: 28M/226M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
ch.fortysix:maven-postman-plugin:0.1.6:send-mail (Report Generation)
on project EmailReportMaven: Execution Report Generation of goal
ch.fortysix:maven-postman-plugin:0.1.6:send-mail failed: Unable to
load the mojo 'send-mail' in the plugin
'ch.fortysix:maven-postman-plugin:0.1.6'. A required class is missing:
org/codehaus/gmaven/mojo/GroovyMojo
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>ch.fortysix:maven-postman-plugin:0.1.6
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] =
file:/C:/Development/Maven_Repo/ch/fortysix/maven-postman-plugin/0.1.6/maven-postman-plugin-0.1.6.jar
[ERROR] urls[1] =
file:/C:/Development/Maven_Repo/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : org.codehaus.gmaven.mojo.GroovyMojo
[ERROR] -> [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]

I was able to resolve this issue. I did the following things:
Deleted the contents of the ../org/apache/maven folder.
Deleted the contents of the ../ch/ folder (this was the turning point, I thought so)
Re-built the Maven project.
Ran mvn site command.
Successfully e-mail sent with surefire-report.html as attachment.

Related

jacoco plugin not working with sunfire plugin.. org.apache.maven.surefire.booter.SurefireBooterForkException

I want to use jacoco plugin to generate a site to show my coverage tests. But when i add the plugin to plugins it gives me org.apache.maven.surefire.booter.SurefireBooterForkException which does not appear when i dont use jacoco plugin.
Here is my pom:
<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>fr.umfds.agl</groupId>
<artifactId>couvertureEtMutation</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<junit-platform.version>5.7.0</junit-platform.version>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-platform.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-platform.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.2</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<!-- attached to Maven test phase -->
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
I want my coverage reports to be generated in target / site / jacoco . I searched on internet and found many similar problems but none of the solutions worked for me. But to be more clear about the error i am getting this:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test
(default-test) on project couvertureEtMutation: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\tanku\Documents\L3\Semestre1\HAI501I(GenieLogiciele)\tp4\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was cmd.exe /X /C "C:\Users\tanku\.p2\pool\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_16.0.2.v20210721-1149\jre\bin\java -server -ea -XX:MaxPermSize=256m -Xmx4g -XX:-UseSplitVerifier ${surefire.argLine} -jar C:\Users\tanku\AppData\Local\Temp\surefire13202390967333438775\surefirebooter9706852401708371992.jar C:\Users\tanku\AppData\Local\Temp\surefire13202390967333438775 2021-12-04T13-02-20_823-jvmRun1 surefire13582094628762200674tmp surefire_04422354844095939650tmp"
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was cmd.exe /X /C "C:\Users\tanku\.p2\pool\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_16.0.2.v20210721-1149\jre\bin\java -server -ea -XX:MaxPermSize=256m -Xmx4g -XX:-UseSplitVerifier ${surefire.argLine} -jar C:\Users\tanku\AppData\Local\Temp\surefire13202390967333438775\surefirebooter9706852401708371992.jar C:\Users\tanku\AppData\Local\Temp\surefire13202390967333438775 2021-12-04T13-02-20_823-jvmRun1 surefire13582094628762200674tmp surefire_04422354844095939650tmp"
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[ERROR] -> [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/MojoExecutionException
adding configurations to sunfire plugin removed the error but did not help me to generate a site to see my coverage results.
<configuration>
<argLine>-Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>
</configuration>
<configuration>
<forkCount>0</forkCount>
</configuration>
Second result
Can you try if it works with my jacoco configuration?
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
<propertyName>surefireArgLine</propertyName>
<excludes>
<exclude>${project.build.directory}/classes/**/*Impl*.class</exclude>
<exclude>${project.build.directory}/test-classes/**/*.class</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
<excludes>
<exclude>${project.build.directory}/classes/**/*Impl*.class</exclude>
<exclude>${project.build.directory}/test-classes/**/*.class</exclude>
</excludes>
</configuration>
</execution>
</executions>
<configuration>
<excludes>
<exclude>${project.build.directory}/classes/**/*Impl*.class</exclude>
<exclude>${project.build.directory}/test-classes/**/*.class</exclude>
</excludes>
</configuration>
</plugin>
I also have in properties:
<surefireArgLine />
<jacoco.version>0.8.2</jacoco.version>

eclipse maven build java.lang.ExceptionInInitializerError

I've got a very strange error related to Eclipse IDE for RCP and RAP Developers Version: 2020-12 (4.18.0)
Build id: 20201210-1552.
I have a project (jax-ws project) and I can build it with console, using maven 3.6.0 and java 1.8. war file is created without problem.
But when I tried to import project to eclipse, or clean project in eclipse I'm getting error below
!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-03-08 12:07:50.992
!MESSAGE Error injecting: org.codehaus.plexus.archiver.jar.JarArchiver
!STACK 0
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.plexus.archiver.jar.JarArchiver
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:490)
...
!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-03-08 12:07:51.001
!MESSAGE Error injecting: org.apache.maven.plugin.war.WarMojo
!STACK 0
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.plexus.archiver.jar.JarArchiver
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:490)
at com.google.inject.internal.DefaultConstructionProxyFactory$ReflectiveProxy.newInstance(DefaultConstructionProxyFactory.java:126)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
...
!ENTRY org.eclipse.core.resources 4 2 2021-03-08 12:07:51.009
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.plexus.archiver.jar.JarArchiver
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:490)
at com.google.inject.internal.DefaultConstructionProxyFactory$ReflectiveProxy.newInstance(DefaultConstructionProxyFactory.java:126)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
...
!SUBENTRY 1 org.eclipse.m2e.core 4 75 2021-03-08 12:07:51.056
!MESSAGE Errors running builder 'Maven Project Builder' on project 'webservice'.
!STACK 0
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.plexus.archiver.jar.JarArchiver
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:490)
at com.google.inject.internal.DefaultConstructionProxyFactory$ReflectiveProxy.newInstance(DefaultConstructionProxyFactory.java:126)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
...
It looks like some problem related with codehaus.plexus plugins but if there was something wrong also I shouldn't be build a project in maven right?
I also set eclipse to use maven 3.6.0 and java1.8 but none of them work.
Tried to clean workspace, metadata and eclipse related project files and re-import project but no luck.
So where should I search the problem? (I have below dependencies in my m2 folder btw)
below you can find build config in pom.xml
<build>
<finalName>vc-myservice</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>wsimport</id>
<phase>generate-sources</phase>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<verbose>true</verbose>
<packageName>com.myservice.verteilcenter.webservice</packageName>
<wsdlDirectory>${basedir}/src/main/webapp/WEB-INF/wsdl</wsdlDirectory>
<wsdlFiles>
<wsdlFile>myservice.wsdl</wsdlFile>
</wsdlFiles>
<wsdlLocation>../WEB-INF/wsdl/myservice.wsdl</wsdlLocation>
<extension>true</extension>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/xjc </source>
<source>${project.build.directory}/jaxws/wsimport/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>${tomcat.path}</path>
<update>true</update>
<url>${tomcat.url}</url>
<server>${tomcat.server}</server>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<warName>${project.build.finalname}</warName>
<webResources>
<resource>
<directory>${basedir}/src/main/webapp</directory>
<filtering>true</filtering>
<includes>
<include>**/*.xml</include>
<include>**/version</include>
<!-- include any other file types you want to filter -->
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<versionRange>[1.12,)</versionRange>
<goals>
<goal>wsimport</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Not sure what is the actual cause but it resolved by adding below plugin entry in pom.xml.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
</plugin>

Maven Surefire test fails after upgrade to JDK 1.8

Getting the following exceptions during all test runs after upgrading from JDK 1.7 to JDK 1.8. All the test cases are running fine with Eclipse JUnit launcher, but fails when run with Maven surfire. We are using the latest stable version for Maven surefire and Maven compiler.
java.lang.IllegalArgumentException: null
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:73)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:73)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:217)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Following is the maven configuration
<mvn-compiler-plugin.version>3.3</mvn-compiler-plugin.version>
<maven-antrun-plugin.version>1.7</maven-antrun-plugin.version>
<mvn-source-plugin.version>2.4</mvn-source-plugin.version>
<java.version>1.8</java.version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${mvn-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven-antrun-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${mvn-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
</plugin>
</plugins>
</pluginManagement>
</build>
When changing the surefire configuration to run the tests in noFork mode the tests pass in some of the modules with the following exception in one of the modules in which the test fails.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<forkCount>0</forkCount>
</configuration>
</plugin>
Following is the exception
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.snapdeal.points.AppTest
java.lang.IllegalStateException: Native library for Attach API not available in this JRE
at mockit.internal.startup.JDK6AgentLoader.getVirtualMachineImplementationFromEmbeddedOnes(JDK6AgentLoader.java:95)
at mockit.internal.startup.JDK6AgentLoader.loadAgent(JDK6AgentLoader.java:54)
at mockit.internal.startup.AgentInitialization.initializeAccordingToJDKVersion(AgentInitialization.java:21)
at mockit.internal.startup.Startup.initializeIfNeeded(Startup.java:98)
at mockit.internal.startup.Startup.initializeIfPossible(Startup.java:112)
at org.junit.runner.Runner.<clinit>(Runner.java:22)
at org.junit.internal.builders.SuiteMethodBuilder.runnerForClass(SuiteMethodBuilder.java:11)
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:262)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:156)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:82)
at org.apache.maven.plugin.surefire.InPluginVMSurefireStarter.runSuitesInProcess(InPluginVMSurefireStarter.java:82)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:942)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:822)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:720)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
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.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(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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.UnsatisfiedLinkError: Native Library /home/abhishek/softwares/jdk1.8.0_45/jre/lib/amd64/libattach.so already loaded in another classloader
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1903)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1843)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at sun.tools.attach.LinuxVirtualMachine.<clinit>(LinuxVirtualMachine.java:336)
at mockit.internal.startup.JDK6AgentLoader.getVirtualMachineImplementationFromEmbeddedOnes(JDK6AgentLoader.java:79)
... 45 more
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.046 sec <<< FAILURE! - in com.snapdeal.points.AppTest
com.snapdeal.points.AppTest Time elapsed: 0.039 sec <<< ERROR!
java.lang.NoClassDefFoundError: org.junit.runner.Runner
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:61)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:262)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
Results :
Tests in error:
JUnit4Provider.invoke:124->executeTestSet:153->execute:262 ยป NoClassDefFound o...
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
Below solution assumes you are not directly using jmockit (it is included as a result of some other dependency)
Find why jmockit is included in dependency using
mvn dependency:tree -Dincludes=com.googlecode.jmockit:jmockit
and exclude using
<exclusion>
<groupId>com.googlecode.jmockit</groupId>
<artifactId>jmockit</artifactId>
</exclusion>
It worked for me I was having the exact same scenario and same stacktrace

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) ?