List messages = new ArrayList();
    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 );        if ( errors )        {            IMessage[] errorMessages = messageHandler.getMessages( IMessage.ERROR, true );            for ( int i = 0; i < errorMessages.length; i++ )            {                IMessage m = errorMessages[i];                ISourceLocation sourceLocation = m.getSourceLocation();                CompilerError error;                if ( sourceLocation == null )                {                    error = new CompilerError( m.getMessage(), true );                }                else                {                    error = new CompilerError( sourceLocation.getSourceFile().getPath(), true,                                               sourceLocation.getLine(), sourceLocation.getColumn(), sourceLocation                                                   .getEndLine(), sourceLocation.getColumn(), m.getMessage() );                }                messages.add( error );             }        }        return messages;    }