mirror of https://github.com/apache/maven.git
get project reports working
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163376 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4e71f4f78a
commit
b005ece7c4
|
@ -9,3 +9,4 @@ dist
|
|||
target
|
||||
.classpath
|
||||
.project
|
||||
build.xml
|
||||
|
|
|
@ -64,4 +64,8 @@
|
|||
<url>scp://www.apache.org//www/maven.apache.org/m2</url>
|
||||
</site>
|
||||
</distributionManagement>
|
||||
<reports>
|
||||
<report>mail-lists</report>
|
||||
<report>dependencies</report>
|
||||
</reports>
|
||||
</project>
|
||||
|
|
|
@ -12,6 +12,13 @@
|
|||
<package>org.apache.maven.reporting</package>
|
||||
|
||||
<dependencies>
|
||||
<!-- TODO: this dependency should not be needed - the manager needs to discover the reports, either via the plugin manager or using a similar technique -->
|
||||
<dependency>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-project-reports-plugin</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<type>plugin</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>doxia</groupId>
|
||||
<artifactId>doxia-core</artifactId>
|
||||
|
@ -23,4 +30,10 @@
|
|||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<preGoals>
|
||||
<preGoal>
|
||||
<name>compiler:compile</name>
|
||||
<attain>plexus:descriptor</attain>
|
||||
</preGoal>
|
||||
</preGoals>
|
||||
</project>
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.apache.maven.reporting;
|
||||
|
||||
import org.apache.maven.model.Model;
|
||||
import org.codehaus.doxia.sink.Sink;
|
||||
import org.codehaus.doxia.site.renderer.SiteRenderer;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* Copyright 2005 The Apache Software Foundation.
|
||||
*
|
||||
|
@ -21,13 +27,23 @@ package org.apache.maven.reporting;
|
|||
*
|
||||
* @author Brett Porter
|
||||
* @version $Id$
|
||||
* @plexus.component
|
||||
*/
|
||||
public class DefaultMavenReportManager
|
||||
implements MavenReportManager
|
||||
{
|
||||
public MavenReport getReport( String name )
|
||||
private Map mavenReports;
|
||||
|
||||
/**
|
||||
* @todo we need some type of response
|
||||
* @todo don't want to be passing in model - use report configuration
|
||||
*/
|
||||
public void executeReport( String name, Model model, SiteRenderer siteRenderer, String outputDirectory )
|
||||
throws Exception
|
||||
{
|
||||
// TODO: return the report
|
||||
return null;
|
||||
MavenReport report = (MavenReport) mavenReports.get( name );
|
||||
|
||||
Sink sink = siteRenderer.createSink( outputDirectory, report.getOutputName() );
|
||||
report.execute( model, sink );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ package org.apache.maven.reporting;
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import org.apache.maven.model.Model;
|
||||
import org.codehaus.doxia.sink.Sink;
|
||||
|
||||
/**
|
||||
|
@ -28,6 +29,9 @@ public interface MavenReport
|
|||
{
|
||||
String ROLE = MavenReport.class.getName();
|
||||
|
||||
void execute( Sink sink )
|
||||
/** @todo don't want the model here long term. */
|
||||
void execute( Model model, Sink sink )
|
||||
throws MavenReportException;
|
||||
|
||||
String getOutputName();
|
||||
}
|
||||
|
|
|
@ -16,6 +16,9 @@ package org.apache.maven.reporting;
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import org.apache.maven.model.Model;
|
||||
import org.codehaus.doxia.site.renderer.SiteRenderer;
|
||||
|
||||
/**
|
||||
* Manage the set of available reports.
|
||||
*
|
||||
|
@ -26,5 +29,5 @@ public interface MavenReportManager
|
|||
{
|
||||
String ROLE = MavenReportManager.class.getName();
|
||||
|
||||
MavenReport getReport( String name );
|
||||
void executeReport( String name, Model model, SiteRenderer siteRenderer, String outputDirectory ) throws Exception;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue