[Originally Posted 25-Dec-2005]

I ran across this tidbit from the Eclipse Developer Journal’s website. It took a bit of digging so I thought I’d share here for posterity and whomever might read. Apparently it is possible to move an Eclipse project out to ANT and vice-versa. Note that this only works in Eclipse 3.1

To export your project settings to an ANT build file:

1. In your navigator window, look for a file called “.project”
2. Right click on the file and click on “export”
3. On the window that pops up, select “Ant Buildfiles” and click on “next”
4. Select the appropriate project to use to generate the ANT buildfile
5. Click “finish”

You should now have two new build files on your project, “build.xml” and build-user.xml.

Any custom targets you create should go on build-user.xml, since build.xml will be overwritten every time a build file is generated.

To create a project from an existing ANT buildfile:

1. Click on File->New->Project
2. Select “Java Project from existing Ant Buildfile” and click “next”
3. Enter a project name, and select the build file to use to create the project
4. Select the javac declaration to be used to define the project
5. Click finish

Thanks to the author of the original article (http://eclipse.sys-con.com/read/100814.htm)