You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Brett Porter <br...@apache.org> on 2005/10/17 00:53:14 UTC
Re: svn commit: r322499 - /maven/components/trunk/maven-plugins/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java
Can we republish the offending report plugins? I thought there was only 1 or 2
so didn't worry about this.
- Brett
Quoting fgiust@apache.org:
> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: svn commit: r322499 - /maven/components/trunk/maven-plugins/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java
Posted by Fabrizio Giustina <fg...@gmail.com>.
On 10/17/05, Brett Porter <br...@apache.org> wrote:
> Can we republish the offending report plugins? I thought there was only 1 or 2
> so didn't worry about this.
>
> - Brett
well, actually this change to the reporting API breaks ALL the
reporting plugins published so far :(
we can update the core plugins hosted by maven, but I think we should
be careful to not to break existing third parties plugins... releasing
a new version of the site plugin with this (I know, pretty ugly) hack
will solve the problem: another solution will be removing the
canGenerateReport() call at all, but I think that can be really useful
and I would like to leave it in the API for 2.0.
Thoughts?
fabrizio
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org