eclipse2ant Plug-in

Official Eclipse contains a very old version of my Ant export filter plug-in. Here is the update!

New Features

Download eclipse2ant for Eclipse 2021-09 (4.21.0) - Java 11

Sources

Shortcut

Window -> Preferences -> eclipse2ant

Shortcut

File -> Export -> General -> Ant Buildfiles (eclipse2ant Plug-In)

Features available in Eclipse since 3.1

Examples

Here are some buildfiles created by eclipse2ant:
buildfile Used features
build.xml 2 source dirs, 1 main, 1 test
build.xml Project dependencies
build.xml Plug-in project (Used to compile this plug-in), eclipse compiler, copy resources User buildfile
build.xml Eclipse variables, bootclasspath, applet (very synthetic example)

FAQ

Q: Is it possible to export every Eclipse project to a matching Ant buildfile?
A: Short answer: No. But eclipse2ant helps you to make it compatible: It's easy! First you have to eliminate project cycles (by default Eclipse shows an error). Then check the dependencies in the source folders of your project. In Eclipse you can specifiy for every source directory a different classes directory. eclipse2ant will create a <javac> tag for every source directory. Therefore no cyclic dependencies are allowed between them. eclipse2ant informs you in detail how you can eliminate the cycle:
Furthermore the order of the sources in the buildpath is also relevant. Again eclipse2ant shows you detailed information what to change:
Simply change order in Eclipse -> Project -> Properties -> Java Build Path -> Order and Export

License

Eclipse Public License 2.0


Home