Can we republish the offending report plugins? I thought there was only 1 or 2 
so didn't worry about this.

- Brett

Quoting [EMAIL PROTECTED]:

> Author: fgiust
> Date: Sun Oct 16 11:23:35 2005
> New Revision: 322499
> 
> URL: http://svn.apache.org/viewcvs?rev=322499&view=rev
> Log:
> 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.
> 
> Modified:
>    
> maven/components/trunk/maven-plugins/maven-site-
plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java
> 
> Modified:
> maven/components/trunk/maven-plugins/maven-site-
plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java
> URL:
> http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-
site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java?
rev=322499&r1=322498&r2=322499&view=diff
> 
==============================================================================
> ---
> maven/components/trunk/maven-plugins/maven-site-
plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java
> (original)
> +++
> maven/components/trunk/maven-plugins/maven-site-
plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java
> Sun Oct 16 11:23:35 2005
> @@ -404,8 +404,21 @@
>          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 );
>              }
>          }
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to