Ant task re-compiling code base even if GWT files are unmodified

14 views
Skip to first unread message

Rahul

unread,
Nov 27, 2006, 6:20:28 AM11/27/06
to Google Web Toolkit
Hi,

I am using the following ant task to compile my GWT stuff:

<target name="GWTcompile">
<mkdir dir="C:/web/www" />
<java classname="com.google.gwt.dev.GWTCompiler" fork="true">
<classpath>
<pathelement path="C:/src/java/" />
<pathelement location="C:/gwt/gwt-user.jar" />
<pathelement location="C:/gwt/gwt-dev-linux.jar" />
</classpath>
<arg value="-out" />
<arg value="C:/web/www" />
<arg value="com.xyz.gwt.GetData" />
</java>
</target>

When I compiled it fresh, i.e., compiled for the first time, I got
following message displayed on console:

GWTcompile:
[mkdir] Created dir: C:/web/www
[java] Output will be written into C:/www/com.xyz.gwt.GetData
[java] Copying all files found on public path
[java] Compilation succeeded
BUILD SUCCESSFUL

Now without changing any code file when I recompiled it with same ant
target I got following display on console:

GWTcompile:
[java] Output will be written into C:/www/com.xyz.gwt.GetData
[java] Compilation succeeded
BUILD SUCCESSFUL

So far so good. It appears as if it is not re-compiling the codebase
but following two things shook my belief:

1) It took almost same time as it took during first time compilation.
2) For every subsequent after first fresh build there was a time stamp
change for the file com.xyz.gwt.GetData.nocache.html lying at
C:/www/com.xyz.gwt.GetData, which essentially means that this file was
modified everytime, irrespective of code change.


Can anyone suggest any solution, which will check unneccessary
re-compilation of unmodified code and thus save build time.

Thanks,
Rahul

wangzx

unread,
Nov 27, 2006, 8:56:10 PM11/27/06
to Google Web Toolkit
Yes, we have meet the same problem. we have more modules(about 10) in
our project, and each time we build the project, it takes a lot of time
to compile the GWT files.

I think it would help us with such an ant task or command line
compiler.

Rahul

unread,
Jan 3, 2007, 10:58:01 AM1/3/07
to Google Web Toolkit
I used ant uptodate task along with globmapper to avoid recompiling of
task.

One can fasten up the speed of compilation upto an extent by using
Compiler flag.

For details refer to:

http://groups.google.co.uk/group/Google-Web-Toolkit/browse_thread/thread/70d7d1f0c8f8a6ac/b9ccaecf00578150?tvc=2&q=compiler+faster&hl=en#b9ccaecf00578150
http://code.google.com/p/google-web-toolkit/issues/detail?id=42#c5

Rahul

Reply all
Reply to author
Forward
0 new messages