Building GWT on the Mac

If you try to build the latest GWT from the svn repository on a Mac, you may end up with a bunch of errors like the following:

BUILD FAILED
/Users/ogerardin/Documents/GWT 2/trunk/build.xml:105: The following error occurred while executing this line:
/Users/ogerardin/Documents/GWT 2/trunk/build.xml:27: The following error occurred while executing this line:
/Users/ogerardin/Documents/GWT 2/trunk/build.xml:58: The following error occurred while executing this line:
/Users/ogerardin/Documents/GWT 2/trunk/platforms.ant.xml:36: The following error occurred while executing this line:
/Users/ogerardin/Documents/GWT 2/trunk/platforms.ant.xml:13: The following error occurred while executing this line:
/Users/ogerardin/Documents/GWT 2/trunk/dev/core/build.xml:192: The following error occurred while executing this line:
/Users/ogerardin/Documents/GWT 2/trunk/common.ant.xml:277: Non-zero status code result (1) running command: svn info

The last line indicates a problem with the “svn” command. The problem is that Mac’s builtin svn client is version 1.4.4 (wich you can check by typing “svn --version” in a terminal), but to build GWT, you need a newer svn client.

The steps to fix this are:

  • go to http://www.open.collab.net/downloads/community and download the latest subversion binaries for Mac OS X
  • you will get a disk image file; mount it and run the included installer. It will install to /opt/subversion/bin
  • edit your ~/.profile file to add the following line:
export PATH=/opt/subversion/bin:$PATH
  • start a new shell or type “. ~/.profile” to make sure the change is loaded in the current shell
  • type “svn --version” and check that the version is the latest one (1.6.5 as of today)
  • cd to your checked out GWT trunk directory, type “ant” and watch GWT build 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *