in src/main/java/org/apache/maven/plugins/jdeprscan/BaseJDeprScanMojo.java [133:170]
protected void verify() throws MojoExecutionException
{
if ( !( consumer.getDeprecatedClasses().isEmpty() && consumer.getDeprecatedMethods().isEmpty() ) )
{
if ( !consumer.getDeprecatedClasses().isEmpty() )
{
getLog().warn( "Found usage of deprecated classes:" );
for ( Map.Entry<String, Set<String>> classes : consumer.getDeprecatedClasses().entrySet() )
{
getLog().warn( "class " + classes.getKey() + " uses deprecated class(es)" );
for ( String deprClass : classes.getValue() )
{
getLog().warn( " * " + deprClass );
}
}
}
if ( !consumer.getDeprecatedMethods().isEmpty() )
{
getLog().warn( "Found usage of deprecated methods:" );
for ( Map.Entry<String, Set<String>> classes : consumer.getDeprecatedMethods().entrySet() )
{
getLog().warn( "class " + classes.getKey() + " uses deprecated method(s)" );
for ( String deprMethod : classes.getValue() )
{
getLog().warn( " * " + deprMethod );
}
}
}
if ( failOnWarning )
{
throw new MojoExecutionException( "JDeprScan detected usage of deprecated classes/methods" );
}
}
}