The format used in .ajproperties files is that of standard properties files. If want to build your Eclipse projects using Ant, you can either convert your .ajproperties files to the old .lst format, or you can process the .ajproperties files directly in Ant. Below is an example build.xml file which reads the src.includes and src.excludes properties from a file and passes them to the iajc Ant task.
<project name="ajprops-example" default="compile" >
<property name="aspectj" value="c:/aspectj1.2" />
<property name="aspectjrt" value="${aspectj}/lib/aspectjrt.jar" />
<property name="aspectjtools" value="${aspectj}/lib/aspectjtools.jar" />
<property file="tracelib.ajproperties"/>
<taskdef
resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
<classpath>
<pathelement location="${aspectjtools}"/>
</classpath>
</taskdef>
<target name="compile" >
<iajc classpath="${aspectjrt}" srcdir="."
includes="${src.includes}" excludes="${src.excludes}"/>
</target>
</project>
Note that there is a limitation here in that Ant processes the includes and excludes in a slightly different way to Eclipse. For example, if you include “lib/AbstractTracing.java” but exclude “lib/” then as a build configuration in Eclipse, the source file will be an included entry in an otherwise excluded package, but Ant processes the includes first, then removes the matching excludes, so everything under “lib/” will be excluded (thus overriding the include entry). This issue should be addressed in a future version of the iajc Ant task.
AspectJ projects
Build configurations
Creating a new build configuration
Editing a build configuration
Switching build configurations
.lst file support