try { executeTarget( projectFile, targetName, null ); fail( "target execution did not fail" ); } catch( Exception e ) { assertSameMessage( messages, e ); }
executeTargetExpectError( projectFile, targetName, new String[]{message} );
    protected void executeTargetExpectError( final File projectFile,                                             final String targetName,                                             final String[] messages )    {        try        {            executeTarget( projectFile, targetName, null );            fail( "target execution did not fail" );        }        catch( Exception e )        {            assertSameMessage( messages, e );        }    }