How to import existing Ant build.xml into IntelliJ IDEA

Mike S picture Mike S · May 22, 2015 · Viewed 33.4k times · Source

I have an existing project that uses an Ant build.xml file to maintain the location of dependency jars.

In Eclipse it's very easy to import from an existing Ant file. I have searched online and looked through all of the "new project" options in IntelliJ but cannot figure out how to do this.

The closest thing I've done is File > New > Project from Existing Sources. But my whole project is full of errors because it didn't use the build.xml to include the jars.

Answer

hitz picture hitz · May 22, 2015

Intellij supports Ant projects via built in Ant plugin which is included by default in IDE. To check if it is enabled go to Settings > Plugins > Ant

After enabling plugin, you can use build.xml from View > Tool Windows > Ant Build

You should then have option(+) of importing your build.xml file.