File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Using Ant in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Using Ant in Eclipse" Watch "Using Ant in Eclipse" New topic

Using Ant in Eclipse

Nate deBrom

Joined: May 22, 2004
Posts: 5
This may seem like a silly question, but how the heck does one use Ant in Eclipse. I use the Run > Rus As..> Ant Build command, and all I get in the console window is

I've tried using ant from the command line, and it runs just fine.
The documentation for Eclipse is somewhat lacking on Ant (my opinion anyway), and i've looked all over the web to no avail.
Are there any special configurations for Ant in Eclipse?
Tim West
Ranch Hand

Joined: Mar 15, 2004
Posts: 539
There are two ways to use Ant in Eclipse (assuming your setup is the same as mine - Eclipse 3 M7, default(?!) Ant plugin).

  • Open the 'Ant' view (Window menu -> Show View -> ('Other...' if necessary) -> Ant. Right click in the window and do 'Add Buildfile', then find it. It should parse the file and give you a list of targets.
  • With External Tools (Run menu -> External Tools, or click on the running man icon on menubar). The setup here is a little more involved, but everything is reasonably explanatory.

  • Hope all that helps, write back if it doesn't work out.

    It is sorta covered in the JavaRanch Style Guide.
    subject: Using Ant in Eclipse
    It's not a secret anymore!