Building GWT from source

365 views
Skip to first unread message

Karan Bhatnagar

unread,
Jan 31, 2010, 9:11:18 PM1/31/10
to google-we...@googlegroups.com
Hi,
 I am an ant newbie. I am trying to build GWT from source following steps as mentioned at http://code.google.com/webtoolkit/makinggwtbetter.html
 I am facing problem doing that and could not get solution in ant forums.

 Now when I invoke ant from trunk directory, it first says that a file is duplicate.
BUILD FAILED
/home/karan/work/gwt/trunk/build.xml:91: The following error occurred while executing this line:
/home/karan/work/gwt/trunk/build.xml:27: The following error occurred while executing this line:
/home/karan/work/gwt/trunk/build.xml:54: The following error occurred while executing this line:
/home/karan/work/gwt/trunk/dev/build.xml:107: The following error occurred while executing this line:
/home/karanb/work/gwt/trunk/common.ant.xml:148: Duplicate file org/apache/COPYING was found and the duplicate attribute is 'fail'.

When I re invoke ant without ant clean, it fails to find classes in tools directory, for example it says:
compile:
[gwt.javac] /home/karan/work/gwt/trunk/dev/build.xml:199: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[gwt.javac] Compiling 138 source files to /home/karan/work/gwt/trunk/build/out/dev/bin
[gwt.javac] /home/karanb/work/gwt/trunk/dev/core/src/com/google/gwt/dev/ServletValidator.java:21: package org.mortbay.jetty.servlet does not exist
[gwt.javac] import org.mortbay.jetty.servlet.ServletHandler;
 {Many such errors}

I reinvoke ant, specifying -lib /home/karan/work/gwt/tools/lib/jetty, then jetty package issue is resolved, but rest packages continue giving errors.
[gwt.javac] /home/karan/work/gwt/trunk/dev/build.xml:199: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[gwt.javac] Compiling 138 source files to /home/karan/work/gwt/trunk/build/out/dev/bin
[gwt.javac] /home/karan/work/gwt/trunk/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java:47: package org.apache.commons.collections.map does not exist
[gwt.javac] import org.apache.commons.collections.map.AbstractReferenceMap;

Why do I have to manually give lib path, why can't ant get it by itself as the guide makinggwtbetter says. I am also mentioning system info below for any hints:
 Ant is in home/karan/Downloads/
karan@karanb:~/Downloads/apache-ant-1.8.0RC1$ ls
INSTALL  KEYS  LICENSE  NOTICE  README  WHATSNEW  bin  docs  etc  fetch.xml  get-m2.xml  lib

 ant is installed properly as I see:
 karan@karan:~/work/gwt/trunk$ ant -version
 Apache Ant version 1.8.0RC1 compiled on January 5 2010

The environment variables are set as :
 GWT_TOOLS=/home/karan/work/gwt/tools
 ANT_HOME=/home/karan/Downloads/apache-ant-1.8.0RC1

 The directory /home/karan/work/gwt contains tools and trunk subdirectories.

 karan@karan:~/work/gwt/tools$ ls
 antlib  lib  redist  sdk

 karan@karan:~/work/gwt/trunk$ ls
 build-tools  build.xml  common.ant.xml  dev  dev-ext  distro-source  doc  eclipse  jni  platforms.ant.xml  plugins  reference  samples  servlet  tools  user

Thanks in advance.

Karan Bhatnagar

unread,
Jan 31, 2010, 9:16:53 PM1/31/10
to google-we...@googlegroups.com
I have intentionally not set CLASSPATH, as http://ant.apache.org/manual/install.html#classpath says so.
Thus I feel it is wrong to specify classpaths using ant argument -lib path-to-tools-subdir-1 -lib path-to-tools-subdir-2

Peter Wong

unread,
Feb 1, 2010, 11:31:12 PM2/1/10
to Google Web Toolkit
Karan,

I ran into the same problems you mentioned above when using Ant 1.8.0
RC1.
Try Ant 1.7.1 (http://archive.apache.org/dist/ant/binaries/)
Switching to Ant 1.7.1 cleared up my build problems.

On Jan 31, 8:11 pm, Karan Bhatnagar <karan.bhatna...@gmail.com> wrote:
> Hi,
>  I am an ant newbie. I am trying to build GWT from source following steps as

> mentioned athttp://code.google.com/webtoolkit/makinggwtbetter.html


>  I am facing problem doing that and could not get solution in ant forums.

> <http://code.google.com/webtoolkit/makinggwtbetter.html>


>  Now when I invoke ant from trunk directory, it first says that a file is
> duplicate.
> BUILD FAILED
> /home/karan/work/gwt/trunk/build.xml:91: The following error occurred while
> executing this line:
> /home/karan/work/gwt/trunk/build.xml:27: The following error occurred while
> executing this line:
> /home/karan/work/gwt/trunk/build.xml:54: The following error occurred while
> executing this line:
> /home/karan/work/gwt/trunk/dev/build.xml:107: The following error occurred
> while executing this line:
> /home/karanb/work/gwt/trunk/common.ant.xml:148: Duplicate file
> org/apache/COPYING was found and the duplicate attribute is 'fail'.
>
> When I re invoke ant without ant clean, it fails to find classes in tools
> directory, for example it says:
> compile:
> [gwt.javac] /home/karan/work/gwt/trunk/dev/build.xml:199: warning:
> 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set
> to false for repeatable builds
> [gwt.javac] Compiling 138 source files to
> /home/karan/work/gwt/trunk/build/out/dev/bin
> [gwt.javac]

> /home/karanb/work/gwt/trunk/dev/core/src/com/google/gwt/dev/ServletValidato r.java:21:


> package org.mortbay.jetty.servlet does not exist
> [gwt.javac] import org.mortbay.jetty.servlet.ServletHandler;
>  {Many such errors}
>
> I reinvoke ant, specifying -lib /home/karan/work/gwt/tools/lib/jetty, then
> jetty package issue is resolved, but rest packages continue giving errors.
> [gwt.javac] /home/karan/work/gwt/trunk/dev/build.xml:199: warning:
> 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set
> to false for repeatable builds
> [gwt.javac] Compiling 138 source files to
> /home/karan/work/gwt/trunk/build/out/dev/bin
> [gwt.javac]

> /home/karan/work/gwt/trunk/dev/core/src/com/google/gwt/dev/shell/CompilingC lassLoader.java:47:

antoine

unread,
Feb 15, 2010, 6:06:42 PM2/15/10
to Google Web Toolkit

Hi,

I am an ant committer. I was worried that you might have found an
issue with ant 1.8.0. I have just built gwt from source on a mac using
ant 1.8.0. There were no errors. This issue might have been fixed
between ant 1.8.0RC1 and ant 1.8.0.

Regards,

Antoine

Reply all
Reply to author
Forward
0 new messages