The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

ryee (2) [Avatar] Offline
#1
Has anyone been able to build the sotuserver war file with GWT 1.5? I am getting the following error:
Module file: /Users/richard/tmp/gwtips/GWTiP_code/Ch11-ApplicationState/sotuserver/src/main/resources/gwtip/sotu/SOTU.gwt.xml
Checking module: null
Donecom.google.gwt.user.User=false
Checking module: com.google.gwt.user.User
Unable to parse module: com.google.gwt.user.User
Donecom.google.gwt.xml.XML=false
Checking module: com.google.gwt.xml.XML
Unable to parse module: com.google.gwt.xml.XML
[gwt:compile]
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gwt/dev/GWTCompiler
[ERROR]The following mojo encountered an error while executing:
[ERROR]Group-Id: com.totsp.gwt
[ERROR]Artifact-Id: maven-googlewebtoolkit2-plugin
[ERROR]Version: 2.0-beta5
[ERROR]Mojo: compile
[ERROR]brought in via: POM
[ERROR]While building project:
[ERROR]Group-Id: com.manning.gwtip
[ERROR]Artifact-Id: sotu-server
[ERROR]Version: 1.0.0
[ERROR]From file: /Users/richard/tmp/gwtips/GWTiP_code/Ch11-ApplicationState/sotuserver/pom.xml
[ERROR]Reason: Exception attempting compile.

I'm building on Mac OS X.
It seems that it can't find the gwt-dev-mac.jar file.

Thanks,

Richard
ryee (2) [Avatar] Offline
#2
Re: Chapter 11- Sotuserver, building with GWT 1.5
I found the answer to my own problem.
I added this in the ~/.m2/settings.xml

<profile>
<id>gwt-1.5.0</id>
<properties>
<google.webtoolkit.home>
/develop/gwt
</google.webtoolkit.home>
<google.webtoolkit.extrajvmargs>
-XstartOnFirstThread
</google.webtoolkit.extrajvmargs>
</properties>
</profile>

and changed the active-profile to gwt-1.5.0 from gwt-1.4.60

I also had to edit pom.xml and change gwt-1.4.60 to gwt-1-5.0.

That was it. Previously, I had neglected to put the settings.xml in my .m2 directory.

Hope this helps anyone who is trying to use GWT 1.5 to build the sample code.

-Richard
charlie.collins (125) [Avatar] Offline
#3
Re: Chapter 11- Sotuserver, building with GWT 1.5
Nice tip there, glad it worked out after setting the home prop.

Honestly, I haven't yet had a chance to go back in and run all the sample code for the book on 1.5. I plan to, and should, but just haven't had the opportunity yet.