tags:

views:

67

answers:

3

Could someone explain what the build.xml file is used for in the root folder of a Google Web Toolkit application? From the looks of things, it seems to be the same for the majority of applications, however I'm failing to understand what it is actually used for. When and why would one choose to edit this file and if most people don't, why isn't there a standard build.xml automatically created for GWT applications? i.e. via the Eclipse GWT plug-in wizard.

A: 

Maybe it is some other plugin in your eclipse environment. I have a GWT 1.7 and 2.0 project both created with the eclipse plugin and neither of them has a build.xml.

Carnell
A: 

build.xml is the default name for Ant builds. It's possible that when running GWT apps in what used to be called 'hosted' mode (now 'web' mode) requires code to be generated and bundled in a WAR or similar to get it to run. So most times, if you're just running code, you might not see it; but it might be generated automatically for you based on some run modes.

The same is also potentially true for exporting; sometimes, the export script will generate a build.xml (e.g. that's how PDE works) and then run that. Of course, these are just hypothesis that may help go towards explaining the possibilities, rather than definitive reasons.

AlBlue
+2  A: 

If you mean build.xml in application created with webAppCreator, build.xml used to:

  • compile code to javascript (gwtc task)
  • test code (run test suite & generate html reports by default)
  • create "war" file for deployment
blackliteon