DoxiaMojo creates output file name in addition to the report mojos
------------------------------------------------------------------

         Key: MNG-659
         URL: http://jira.codehaus.org/browse/MNG-659
     Project: Maven 2
        Type: Bug
  Components: maven-reports  
    Versions: 2.0-alpha-3    
 Reporter: Vincent Massol


I had a problem in the clover plugin: when running "m2 site:site", the site 
generation overwrites the clover/index.html file created by the clover report 
(clover:report goal). Looking at the DoxiaMojo, I can see the following code:

                //Generate reports
                if ( reports != null )
                {
                    for ( Iterator j = reports.iterator(); j.hasNext(); )
                    {
                        MavenReport report = (MavenReport) j.next();

                        getLog().info( "Generate \"" + report.getName( locale ) 
+ "\" report." );

                        report.setReportOutputDirectory( localeOutputDirectory 
);

                        String outputFileName = report.getOutputName() + 
".html";

                        SiteRendererSink sink = siteRenderer.createSink( new 
File( siteDirectory ), outputFileName,
                                                                         
getSiteDescriptor( reports, locale ) );

                        report.generate( sink, locale );

                        File outputFile = new File( localeOutputDirectory, 
outputFileName );

                        if ( !outputFile.getParentFile().exists() )
                        {
                            outputFile.getParentFile().mkdirs();
                        }

                        siteRenderer.generateDocument( new FileWriter( 
outputFile ), template, attributes, sink,
                                                       locale );
                    }
                }

It seems that this getOutputName() + ".html" file is created twice:
- once by the report itself
- once by the DoxiaMojo (after the report has created it)
 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to