May 2, 2009

Building GWT from SVN on OSX

Building GWT from svn trunk is documented in Making GWT Better.
But the compile process invoke a nasty parsing of svn info command which fails if your langage setting is not english.
You'll find that in build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/SvnInfo.java :


/**
* A pattern that matches the Repository Root line in svn info output.
*/
private static final Pattern ROOT_PATTERN =
Pattern.compile("\\s*Repository Root:\\s*(" + URL_REGEX + ")\\s*");

This pattern fails miserably on svn info like this :
Chemin : .
URL : http://google-web-toolkit.googlecode.com/svn/trunk
Racine du dépôt : http://google-web-toolkit.googlecode.com/svn
UUID du dépôt : 8db76d5a-ed1c-0410-87a9-c151d255dfc7
Révision : 5320
Type de noeud : répertoire
Tâche programmée : normale
Auteur de la dernière modification : jgw@google.com
Révision de la dernière modification : 5320
Date de la dernière modification: 2009-05-01 22:23:02 +0200 (Ven, 01 mai 2009)

I had to switch form iTerm to Terminal to achieve a good setup of my environment to achieve a sucessful building.
In Terminal preferences uncheck the LANG setting flag and in your shell do

export LANG=en_US
ant


This should be enough to build GWT successfully !

PS: Pay attention to not interfere with JDK 1.6 if you have it installed on your machine.

No comments: