Problem with Maven-Plugin and Widgetset

Hallo,
i use maven to compile and build my vaadin application. I can use the vaadin eclipse Plugin to compile the widgetset and it’s works fine. When i use maven to build my application it doesn’t work. I get this error:

[ERROR]
17.05.2011 07:58:47 com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
[ERROR]
INFO: Widgetsets found from classpath:
[ERROR]
com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:Z:/programs/maven/repository/com/vaadin/vaadin/6.6.0/vaadin-6.6.0.jar!/
[ERROR]
org.vaadin.artur.icepush.IcepushaddonWidgetset in jar:file:Z:/programs/maven/repository/ice/icepush-0.2.1/0.2.1/icepush-0.2.1-0.2.1.jar!/
[ERROR]
de.conet.ics.ucrs.dispatcher.ui.widgetset.AppWidgetSet in file://Z/work/UCRS/ucrs-gui-dispatcher/src/main/java
[ERROR]

[ERROR]
17.05.2011 07:58:47 com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
[ERROR]
INFO: Search took 9ms
[INFO]
[resources:testResources {execution: default-testResources}]

[INFO]
Using ‘UTF-8’ encoding to copy filtered resources.
[INFO]
skip non existing resourceDirectory z:\work\UCRS\ucrs-gui-dispatcher\src\test\resources
[INFO]
[compiler:testCompile {execution: default-testCompile}]

[INFO]
Not compiling test sources
[INFO]
[surefire:test {execution: default-test}]

[INFO]
Tests are skipped.
[WARNING]
DEPRECATED [soyc]
: you must use {@link #compileReport} option
[INFO]
[gwt:compile {execution: default}]

[INFO]
auto discovered modules [de.conet.ics.ucrs.dispatcher.ui.widgetset.AppWidgetSet]

[INFO]
Compiling module de.conet.ics.ucrs.dispatcher.ui.widgetset.AppWidgetSet
[INFO]
[ERROR]
Unexpected
[INFO]
java.lang.NoSuchFieldError: warningThreshold
[INFO]
at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions(JdtCompiler.java:400)
[INFO]
at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.(JdtCompiler.java:228)
[INFO]
at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:689)
[INFO]
at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:215)
[INFO]
at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:406)
[INFO]
at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:299)
[INFO]
at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:325)
[INFO]
at com.google.gwt.dev.Precompile.precompile(Precompile.java:507)
[INFO]
at com.google.gwt.dev.Precompile.precompile(Precompile.java:492)
[INFO]
at com.google.gwt.dev.Precompile.precompile(Precompile.java:405)
[INFO]
at com.google.gwt.dev.Compiler.run(Compiler.java:215)
[INFO]
at com.google.gwt.dev.Compiler.run(Compiler.java:187)
[INFO]
at com.google.gwt.dev.Compiler$1.run(Compiler.java:159)
[INFO]
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
[INFO]
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
[INFO]
at com.google.gwt.dev.Compiler.main(Compiler.java:166)
[INFO]

[ERROR]
BUILD ERROR
[INFO]

I don’t know why this happend, because it works fine the hole time. Because of this error i update my Vaadin Version from 6.5.0 to 6.6.0.
Other Versions:

  • gwt-maven-plugin 2.2
  • gwt-user 2.3
  • gwt-dev 2.3
  • vaadin-maven-plugin 1.0.1
  • javax.validation-api 1.0.0.GA
  • javax.validation-api-sources 1.0.0.GA

Furthermore i use the addon ICEPush in Version 0.2.1 in my application.

Greetz,
Michel

Sound like some kind of classpath conflict, as described in
the GWT issue tracker
.

For all who have the same problem, edit your pom.xml and add this line
true
to the configuration tag of the plugin tag.

org.codehaus.mojo
gwt-maven-plugin
2.2.0



${project.build.directory}/${project.build.finalName}/VAADIN/widgetsets
-Xmx512M -Xss1024k
clean
${project.build.directory}/${project.build.finalName}
true
8080
false
true


You lifesaver :wink:

For those using Intellij, an “Invalidate caches/restart” from the File menu seems to screw with the classpath order (although this has only happenned once), this fix works great.

Michael Klein, I dunno if you are still here. But seriously thank you!

I also had this problem and

parameter helped me. I added to vaadin-maven-plugin. Thank you Michel.

com.vaadin vaadin-maven-plugin ${vaadin.plugin.version} -Xmx512M -Xss1024k ${basedir}/target/classes/VAADIN/widgetsets false false OBF true [b] true [/b] update-widgetset compile