diff --git a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/LoadMojo.java b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/LoadMojo.java index fb63ae8737..e383ced812 100644 --- a/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/LoadMojo.java +++ b/its/core-it-support/core-it-plugins/maven-it-plugin-class-loader/maven-it-plugin-class-loader/src/main/java/org/apache/maven/plugin/coreit/LoadMojo.java @@ -146,7 +146,10 @@ public class LoadMojo getLog().info( "[MAVEN-CORE-IT-LOG] Loaded class from " + type.getClassLoader() ); try { - type = childClassLoader.loadClass( name ); + if ( !type.equals( childClassLoader.loadClass( name ) ) ) + { + throw new ClassNotFoundException( name ); + } } catch ( ClassNotFoundException cnfe ) {