From 9f5fbe1f7269df734bc0ebfba5a544cf94eacc5b Mon Sep 17 00:00:00 2001 From: Vincent Massol Date: Tue, 26 Jul 2005 10:44:31 +0000 Subject: [PATCH] MNG-628: No more clover.html + no more site resources generated. Done this time by extending AbstractMavenReport and overriding it's main methods (generate() and execute()). AbstractMavenReport would need to add native support for external reports to have something clean (see MNG-645) git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@225271 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/plugin/clover/CloverReportMojo.java | 40 +++---------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/maven-plugins/maven-clover-plugin/src/main/java/org/apache/maven/plugin/clover/CloverReportMojo.java b/maven-plugins/maven-clover-plugin/src/main/java/org/apache/maven/plugin/clover/CloverReportMojo.java index 59e1b86274..dd4accbd70 100644 --- a/maven-plugins/maven-clover-plugin/src/main/java/org/apache/maven/plugin/clover/CloverReportMojo.java +++ b/maven-plugins/maven-clover-plugin/src/main/java/org/apache/maven/plugin/clover/CloverReportMojo.java @@ -39,7 +39,7 @@ import java.io.File; * @goal report * @execute phase="test" lifecycle="clover" */ -public class CloverReportMojo extends AbstractMojo implements MavenReport +public class CloverReportMojo extends AbstractMavenReport { /** * @parameter expression="${project.build.directory}/clover/clover.db" @@ -94,7 +94,7 @@ public class CloverReportMojo extends AbstractMojo implements MavenReport public String getOutputName() { - return "clover"; + return "clover/index"; } /** @@ -142,41 +142,11 @@ public class CloverReportMojo extends AbstractMojo implements MavenReport return getBundle( locale ).getString( "report.clover.name" ); } - // The methods below are required because we don't extend AbstractMavenReport. The reason is that - // AbstractMavenReport does not support externally generated HTML report files. - /** - * @see org.apache.maven.reporting.MavenReport#getReportOutputDirectory() + * @see org.apache.maven.reporting.MavenReport#generate(org.codehaus.doxia.sink.Sink, java.util.Locale) */ - public File getReportOutputDirectory() - { - if ( this.reportOutputDirectory == null ) - { - this.reportOutputDirectory = new File( getOutputDirectory() ); - } - return this.reportOutputDirectory; - } - - /** - * @see MavenReport#setReportOutputDirectory(java.io.File) - */ - public void setReportOutputDirectory( File reportOutputDirectory ) - { - this.reportOutputDirectory = reportOutputDirectory; - } - - /** - * @see org.apache.maven.reporting.MavenReport#getCategoryName() - */ - public String getCategoryName() - { - return CATEGORY_PROJECT_REPORTS; - } - - /** - * @see MavenReport#generate(org.codehaus.doxia.sink.Sink, java.util.Locale) - */ - public void generate(Sink sink, Locale locale) throws MavenReportException + public void generate( Sink sink, Locale locale ) + throws MavenReportException { executeReport( locale ); }