@ Override protected void postExecute ( List < String > filesProcessed , int nonComplyingFiles ) throws MojoFailureException { if ( nonComplyingFiles > 0 ) { String message = "Found " + nonComplyingFiles + " non-complying files, failing build" ; getLog ( ) . error ( message ) ; getLog ( ) . error ( "To fix formatting errors, run \"mvn com.coveo:fmt-maven-plugin:format\"" ) ; // do not support limit < 1 displayLimit = max ( 1 , displayLimit ) ; // Display first displayLimit files not formatted if ( displayFiles ) { for ( String path : filesNotFormatted . subList ( 0 , min ( displayLimit , filesNotFormatted . size ( ) ) ) ) { getLog ( ) . error ( "Non complying file: " + path ) ; } if ( nonComplyingFiles > displayLimit ) { getLog ( ) . error ( format ( "... and %d more files." , nonComplyingFiles - displayLimit ) ) ; } } throw new MojoFailureException ( message ) ; } }
Post Execute action . It is called at the end of the execute method . Subclasses can add extra checks .