protected static void throwMojoExecutionException ( Object mojo , String message , Exception cause ) throws Exception { Class < ? > clz = mojo . getClass ( ) . getClassLoader ( ) . loadClass ( MavenNames . MOJO_EXECUTION_EXCEPTION_BIN ) ; Constructor < ? > con = clz . getConstructor ( String . class , Exception . class ) ; Exception ex = ( Exception ) con . newInstance ( message , cause ) ; throw ex ; }
Throws MojoExecutionException .