maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: maven-components/maven-core .cvsignore pom.xml
Date Wed, 23 Feb 2005 00:06:06 GMT
brett       2005/02/22 16:06:06

  Modified:    maven-reporting-api/src/main/java/org/apache/maven/reporting
                        DefaultMavenReportManager.java MavenReport.java
                        MavenReportManager.java
               maven-reporting-api pom.xml
               maven-core .cvsignore pom.xml
  Log:
  get project reports working
  
  Revision  Changes    Path
  1.2       +20 -4     maven-components/maven-reporting-api/src/main/java/org/apache/maven/reporting/DefaultMavenReportManager.java
  
  Index: DefaultMavenReportManager.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-reporting-api/src/main/java/org/apache/maven/reporting/DefaultMavenReportManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultMavenReportManager.java	17 Feb 2005 07:00:26 -0000	1.1
  +++ DefaultMavenReportManager.java	23 Feb 2005 00:06:06 -0000	1.2
  @@ -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 @@
    *
    * @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 );
       }
   }
  
  
  
  1.2       +6 -2      maven-components/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java
  
  Index: MavenReport.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MavenReport.java	17 Feb 2005 07:00:26 -0000	1.1
  +++ MavenReport.java	23 Feb 2005 00:06:06 -0000	1.2
  @@ -16,6 +16,7 @@
    * limitations under the License.
    */
   
  +import org.apache.maven.model.Model;
   import org.codehaus.doxia.sink.Sink;
   
   /**
  @@ -28,6 +29,9 @@
   {
       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();
   }
  
  
  
  1.2       +5 -2      maven-components/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportManager.java
  
  Index: MavenReportManager.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReportManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MavenReportManager.java	17 Feb 2005 07:00:26 -0000	1.1
  +++ MavenReportManager.java	23 Feb 2005 00:06:06 -0000	1.2
  @@ -16,6 +16,9 @@
    * 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 @@
   {
       String ROLE = MavenReportManager.class.getName();
   
  -    MavenReport getReport( String name );
  +    void executeReport( String name, Model model, SiteRenderer siteRenderer, String outputDirectory
) throws Exception;
   }
  
  
  
  1.3       +13 -0     maven-components/maven-reporting-api/pom.xml
  
  Index: pom.xml
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-reporting-api/pom.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- pom.xml	22 Feb 2005 07:01:01 -0000	1.2
  +++ pom.xml	23 Feb 2005 00:06:06 -0000	1.3
  @@ -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.3       +1 -0      maven-components/maven-core/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/.cvsignore,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- .cvsignore	5 Dec 2004 04:16:07 -0000	1.2
  +++ .cvsignore	23 Feb 2005 00:06:06 -0000	1.3
  @@ -9,3 +9,4 @@
   target
   .classpath
   .project
  +build.xml
  
  
  
  1.16      +4 -0      maven-components/maven-core/pom.xml
  
  Index: pom.xml
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/pom.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- pom.xml	23 Dec 2004 23:46:41 -0000	1.15
  +++ pom.xml	23 Feb 2005 00:06:06 -0000	1.16
  @@ -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>
  
  
  

Mime
View raw message