This framework is an extension to the AspectJ compiler which allows to output Ajc errors messages in XML format. It is implemented as an extension of the AspectJ Ajc Ant task.
Note: missing in 0.5
Here is an example on how to use it from a java application:
AjcXml compiler = new AjcXml();
compiler.createSrc().setPath("src/aspect");
compiler.setDestdir("target/classes");
compiler.setResultFile(new FileOutputStream("result.xml"));
compiler.execute();
Here is an example on how to use it from an Ant script:
<taskdef name="ajcxml" classname="patterntesting.plugin.aspectj.AjcXmlTask" >
<classpath>
<pathelement path="${java.class.path}"/>
</classpath>
</taskdef>
<ajcxml destdir="${target.classes.dir}" resultFile="output.xml">
<src path="${src.dir}"/>
<classpath>
<path refid="classpath"/>
</classpath>
</ajcxml>
It can be used in Test Cases if you wish to assert results of AspectJ compilation. For example, if you're expecting an Aspect to produce a compilation error, you will be able to assert the XML result by either comparing the XML string or better by using XMLUnit .
In addition, it is useful if you need to produce reports about the result of the compilation. You can easily use DVSL to transform the XML into an HTML report.