5

I have a running Java GWT application, that I can compile using Eclipse.

Now I wan't to also be able to build this application from the command line using ant.

As of my understanding I therefore need a build.xml file. I used the webAppCreator tool, that comes with the SDK to create this build.xml file and adapted it to my needs and got it working.

But how do I tell Eclipse now to automatically update the build.xml file upon code changes?

I know it is possible for it works in projects created with webAppCreator. But I just copied the build.xml to another project. So what do I need to adapt? Or where do I need to set up the link to the build.xml?

JochenJung
  • 7,183
  • 12
  • 64
  • 113
  • 1
    You say "it works in projects created with webAppCreator" - are you sure? That would be nice, but I haven't seen this yet. Which changes lead to an automatic update of the build.xml? – Chris Lercher Nov 25 '10 at 13:23
  • Actually I'm not. +1 :-) I thought the build.xml adapted in the past, but I created a new project just now and couldn't notice any changes in the build.xml. So I guess my question should be "Is there a way to let Eclipse update the build.xml file?" – JochenJung Nov 25 '10 at 15:01

1 Answers1

2

You could use Ant4Eclipse to get the Eclipse classpath into your ant build file. That's probably only part of the solution you're looking for... I'm not sure, how useful this will actually be when used together with a GWT project (do you want automatic copying of the libraries to WEB-INF/lib, too? Etc...)

Chris Lercher
  • 37,264
  • 20
  • 99
  • 131
  • Yes, after doing some more research I guess using a tool like Ant4Eclipse is the only way to automatically update the build.xml file. Thx. – JochenJung Nov 29 '10 at 10:36