private List compileInProcess( AjBuildConfig buildConfig )
throws CompilerException
{
MessageHandler messageHandler = new MessageHandler();
AjBuildManager manager = new AjBuildManager( messageHandler );
try
{
manager.batchBuild( buildConfig, messageHandler );
}
catch ( AbortException e )
{
throw new CompilerException( "Unknown error while compiling", e );
}
catch ( IOException e )
{
throw new CompilerException( "Unknown error while compiling", e );
}
// We need the location of the maven so we have a couple of options
// here.
//
// The aspectjrt jar is something this component needs to function so we
// can either
// bake it into the plugin and retrieve it somehow or use a system
// property or we
// could pass in a set of parameters in a Map.
boolean errors = messageHandler.hasAnyMessage( IMessage.ERROR, true );
List messages = new ArrayList();
if ( errors )
{
IMessage[] errorMessages = messageHandler.getMessages( IMessage.ERROR, true );
for ( int i = 0; i < errorMessages.length; i++ )
{
IMessage m = errorMessages[i];