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
This commit is contained in:
Vincent Massol 2005-07-26 10:44:31 +00:00
parent 524a4602c4
commit 9f5fbe1f72
1 changed files with 5 additions and 35 deletions

View File

@ -39,7 +39,7 @@
* @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 @@ private String[] createCliArgs()
public String getOutputName()
{
return "clover";
return "clover/index";
}
/**
@ -142,41 +142,11 @@ public String getName( Locale locale )
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 );
}