Buggy code:
@ Mojo ( name = "verify-springmvc-api-docs" , requiresDependencyResolution = ResolutionScope . COMPILE_PLUS_RUNTIME , threadSafe = true ) public class SpringMvcRamlVerifierMojo extends CommonApiSyncMojo { @ Parameter ( required = true , readonly = true , defaultValue = "" ) protected String ramlToVerifyPath ; @ Parameter ( required = false , readonly = true , defaultValue = "true" ) protected Boolean performStyleChecks ; @ Parameter ( required = false , readonly = true , defaultValue = "true" ) protected Boolean checkForResourceExistence ; @ Parameter ( required = false , readonly = true , defaultValue = "true" ) protected Boolean checkForActionExistence ; @ Parameter ( required = false , readonly = true , defaultValue = "true" ) protected Boolean checkForActionContentType ; @ Parameter ( required = false , readonly = true , defaultValue = "true" ) protected Boolean checkForQueryParameterExistence ; @ Parameter ( required = false , readonly = true , defaultValue = "true" ) protected Boolean checkForPluralisedResourceNames ; @ Parameter ( required = false , readonly = true , defaultValue = "true" ) protected Boolean checkForSpecialCharactersInResourceNames ; @ Parameter ( required = false , readonly = true , defaultValue = "true" ) protected Boolean checkForDefinitionOf40xResponseInSecuredResource ; @ Parameter ( required = false , readonly = true , defaultValue = "false" ) protected Boolean breakBuildOnWarnings ; @ Parameter ( required = false , readonly = true , defaultValue = "true" ) protected Boolean logWarnings ; @ Parameter ( required = false , readonly = true , defaultValue = "true" ) protected Boolean logErrors ; @ SuppressWarnings ( "unchecked" ) @ Override protected Class < ? extends Annotation > [ ] getSupportedClassAnnotations ( ) { } protected void verifyRaml ( ) throws IOException , MojoExecutionException , MojoFailureException { } public void execute ( ) throws MojoExecutionException , MojoFailureException { long startTime = System . currentTimeMillis ( ) ; if ( project . getPackaging ( ) . equals ( "pom" ) ) { this . getLog ( ) . info ( ( "Skipping<seq2seq4repair_space>[pom]<seq2seq4repair_space>project:<seq2seq4repair_space>" + ( project . getName ( ) ) ) ) ; } else if ( project . getPackaging ( ) . equals ( "maven-plugin" ) ) { this . getLog ( ) . info ( ( "Skipping<seq2seq4repair_space>[maven-plugin]<seq2seq4repair_space>project:<seq2seq4repair_space>" + ( project . getName ( ) ) ) ) ; } else if ( ! ( Files . isDirectory ( Paths . get ( project . getBuild ( ) . getSourceDirectory ( ) ) , LinkOption . NOFOLLOW_LINKS ) ) ) { this . getLog ( ) . info ( ( "Skipping<seq2seq4repair_space>project<seq2seq4repair_space>with<seq2seq4repair_space>missing<seq2seq4repair_space>src<seq2seq4repair_space>folder:<seq2seq4repair_space>" + ( project . getName ( ) ) ) ) ; } else { try { verifyRaml ( ) ; } catch ( IOException e ) { ClassLoaderUtils . restoreOriginalClassLoader ( ) ; <START_BUG> throw new MojoExecutionException ( e , "Unexpected<seq2seq4repair_space>exception<seq2seq4repair_space>while<seq2seq4repair_space>executing<seq2seq4repair_space>security<seq2seq4repair_space>enforcer." , e . toString ( ) ) ; <END_BUG> } } this . getLog ( ) . info ( ( ( "Raml<seq2seq4repair_space>Generation<seq2seq4repair_space>Complete<seq2seq4repair_space>in:" + ( ( System . currentTimeMillis ( ) ) - startTime ) ) + "ms" ) ) ; } }

Fix:
throw new MojoExecutionException ( e , "Unexpected<seq2seq4repair_space>exception<seq2seq4repair_space>while<seq2seq4repair_space>executing<seq2seq4repair_space>Raml<seq2seq4repair_space>Sync<seq2seq4repair_space>Plugin." , e . toString ( ) ) ;