mirror of https://github.com/apache/maven.git
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:
parent
e02b8ed1e4
commit
8caa84a288
|
@ -404,8 +404,21 @@ public class SiteMojo
|
||||||
for ( Iterator i = reports.iterator(); i.hasNext(); )
|
for ( Iterator i = reports.iterator(); i.hasNext(); )
|
||||||
{
|
{
|
||||||
MavenReport report = (MavenReport) i.next();
|
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 );
|
filteredReports.add( report );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue