Author: bentmann Date: Thu Oct 8 22:19:17 2009 New Revision: 823346 URL: http://svn.apache.org/viewvc?rev=823346&view=rev Log: o Improved error output
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3581/plugin/src/main/java/org/apache/maven/plugin/coreit/UsesWagonMojo.java Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3581/plugin/src/main/java/org/apache/maven/plugin/coreit/UsesWagonMojo.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3581/plugin/src/main/java/org/apache/maven/plugin/coreit/UsesWagonMojo.java?rev=823346&r1=823345&r2=823346&view=diff ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3581/plugin/src/main/java/org/apache/maven/plugin/coreit/UsesWagonMojo.java (original) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3581/plugin/src/main/java/org/apache/maven/plugin/coreit/UsesWagonMojo.java Thu Oct 8 22:19:17 2009 @@ -22,15 +22,49 @@ public void execute() throws MojoExecutionException { + Object fileWagon; try { - FileWagon fileWagon = (FileWagon) wagonManager.getWagon( "file" ); + fileWagon = wagonManager.getWagon( "file" ); + } + catch( Exception e ) + { + throw new MojoExecutionException( e.getMessage(), e ); + } + try + { + FileWagon theWagon = (FileWagon) fileWagon; + } + catch( ClassCastException e ) + { + getLog().error( "", e ); + getLog().error( "Plugin Class Loaded by " + FileWagon.class.getClassLoader() ); + getLog().error( "Wagon Class Loaded by " + fileWagon.getClass().getClassLoader() ); + + throw e; + } - ScpWagon scpWagon = (ScpWagon) wagonManager.getWagon( "scp" ); + Object scpWagon; + try + { + scpWagon = wagonManager.getWagon( "scp" ); } catch( Exception e ) { throw new MojoExecutionException( e.getMessage(), e ); } + try + { + ScpWagon theWagon = (ScpWagon) scpWagon; + } + catch( ClassCastException e ) + { + getLog().error( "", e ); + getLog().error( "Plugin Class Loaded by " + ScpWagon.class.getClassLoader() ); + getLog().error( "Wagon Class Loaded by " + scpWagon.getClass().getClassLoader() ); + + throw e; + } } + }