mirror of https://github.com/apache/maven.git
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:
parent
524a4602c4
commit
9f5fbe1f72
|
@ -39,7 +39,7 @@ import java.io.File;
|
||||||
* @goal report
|
* @goal report
|
||||||
* @execute phase="test" lifecycle="clover"
|
* @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"
|
* @parameter expression="${project.build.directory}/clover/clover.db"
|
||||||
|
@ -94,7 +94,7 @@ public class CloverReportMojo extends AbstractMojo implements MavenReport
|
||||||
|
|
||||||
public String getOutputName()
|
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" );
|
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()
|
public void generate( Sink sink, Locale locale )
|
||||||
{
|
throws MavenReportException
|
||||||
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
|
|
||||||
{
|
{
|
||||||
executeReport( locale );
|
executeReport( locale );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue