We all know this situation: the developers of a team are using the Eclipse IDE to code their apps, to compile their apps, to version, to deploy, and to run their apps. No problems so far. But as soon as you want to set up something like a continuous build system which runs outside of Eclipse you also need a build process that is independent of Eclipse. Usually you will use Ant and some other tools to define your automatic build process. Fine. But unfortunately Ant cannot use any of Eclipse's configurations, such as classpathes, launcher or team project sets. Although everything has been nicely configured already inside the IDE, it has to be redone in those external Ant build files. And even worse: it has to be reconfigured each time a developer makes changes in Eclipse. As always with redundant data, the challenge is to keep Eclipse and Ant configurations in sync. But how about avoiding redundancy in the first place? This is where ant4eclipse comes into play.
The solution: ant4eclipse
The aim of the ant4eclipse project is to avoid (or at least: to reduce) the redundancy of Eclipse and Ant configurations. More precisly: it consists of Ant tasks that are able to read and work with some of Eclipse's configuration files. With these tasks you are for example able to:
- setup Ant classpathes as defined in Eclipse .classpath-file
- checkout complete workspaces as it's possible with the Team Project Set feature of eclipse
- build Eclipse plug-ins and OSGi bundles
With all these tasks you're able to create a complete automatic build system that starts with checking out all required projects from CVS, builds all projects in the correct order with classpath settings as specified in Eclipse, and to launch your applications as they are specified in Eclipse. And the best of it: if you or someone else changes a configuration in Eclipse, those changes are immediately visible to your buildfiles - without changing one line of code!