The APT plug-in can be used in conjunction with Eclipse to build your preconfigured workspace, either directly from the command-line or via ant with its built-in ant task.
eclipsec -nosplash -application org.eclipse.jdt.apt.core.aptBuild -data %WORKSPACE%This invokes Eclipse as a console application in headless mode and builds the workspace as provided on the command-line. Any configuration for the provided workspace will be observed in the build.
<project name="test_eclipse" default="build" basedir="."> <taskdef name="apt" classname="org.eclipse.jdt.apt.core.build.JdtApt"/> <target name="build"> <apt workspace="%WORKSPACE%" eclipseHome="%ECLIPSE_HOME%"/> </target> </project>