the canGenerateReport() has just been added to MavenReport: calling it from the site plugin makes all the plugins compiled with an earlier version fail with an AbstractMethodError.

This is intended as a temporary patch to keep the site plugin compatible with existing reports.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@322499 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Fabrizio Giustina 2005-10-16 18:23:35 +00:00
parent e02b8ed1e4
commit 8caa84a288
1 changed files with 14 additions and 1 deletions

View File

@ -404,8 +404,21 @@ public class SiteMojo
for ( Iterator i = reports.iterator(); i.hasNext(); )
{
MavenReport report = (MavenReport) i.next();
if ( report.canGenerateReport() )
try
{
if ( report.canGenerateReport() )
{
filteredReports.add( report );
}
}
// the canGenerateReport() has been added just before the 2.0 release and will cause all the reporting
// plugins with an earlier version to fail (most of the codehaus mojo now fails)
// be nice with them, output a warning and don't let them break anything
catch ( AbstractMethodError e )
{
getLog().warn(
"Error loading report " + report.getClass().getName()
+ " - AbstractMethodError: canGenerateReport()" );
filteredReports.add( report );
}
}