Maven Shared Components
  1. Maven Shared Components
  2. MSHARED-120

No single report generated with latest maven-reporting-impl

    Details

    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      Recently, I fixed several report plugins (changelog, changes etc.) to use Doxia 1.0 and latest maven-reporting-impl.
      The main goal was to make reporting plugins available in PDF (see MPDF-26 and doc [1])

      I notified that running a single report doesn't work but works when coupling with maven-site-plugin 2.0.x.

      For instance, run:

      mvn org.apache.maven.plugins:maven-changelog-plugin:2.2-SNAPSHOT:changelog
      

      In Doxia 1.0, the SiteRenderSink [2] uses a StringWriter by default to use getBody() in the renderer [3]. So running a single report doesn't write a file with reporting-impl:2.0.4.2

      In MPIR 2.1.2, we overrided the mojo.execute() to handle a default renderer [4] so we are able to run a single report. I propose to move this logic in AbstractMavenReport.

      [1] http://maven.apache.org/plugins/maven-pdf-plugin-1.1-SNAPSHOT/examples/configuring-reports.html#Maven_Reporting_Plugins_Issues
      [2] http://maven.apache.org/doxia/doxia-sitetools-1.0.x/xref/org/apache/maven/doxia/siterenderer/sink/SiteRendererSink.html#47
      [3] http://maven.apache.org/doxia/doxia-sitetools-1.0.x/xref/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.html#433
      [4] http://maven.apache.org/plugins/maven-project-info-reports-plugin/xref/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.html#137

      1. MSHARED-120.patch
        5 kB
        Vincent Siveton
      2. reporting.patch
        9 kB
        Vincent Siveton

        Activity

        Hide
        Vincent Siveton added a comment -

        Dennis, the differences are not betwen the latest Doxia/Reporting-impl version and the previous versions but when you upgrade a plugin to these dependencies.

        Several Maven release plugins use old (very old) Doxia/reporting-impl. Takes the changelog plugin case:

        The release POM [1] uses this dependency:

        <dependency>
          <groupId>doxia</groupId>
          <artifactId>doxia-sink-api</artifactId>
          <version>1.0-alpha-5</version>
        </dependency>
        

        Take care of the groupId.
        FYI, in the repos, Doxia has 3 differents groupdIds: doxia, org.codehaus.doxia and the official org.apache.maven.doxia

        Here are the steps to bump to latest releases:

        • checkout the changelog tag and uses the 2.1.1-SNAPSHOT version
        • update the POM to Doxia to org.apache.maven.doxia:doxia-sink-api:1.0
        • update to reporting impl 2.0.4 or later. This implies to replace org.codehaus.doxia.* imports by org.apache.maven.doxia.* and to modify the renderer component.

        Now, running the following, no single report will be generated:

        mvn org.apache.maven.plugins:maven-changelog-plugin:2.1.1-SNAPSHOT:changelog
        

        Is it more clear?

        [1] http://repo2.maven.org/maven2/org/apache/maven/plugins/maven-changelog-plugin/2.1/maven-changelog-plugin-2.1.pom

        Show
        Vincent Siveton added a comment - Dennis, the differences are not betwen the latest Doxia/Reporting-impl version and the previous versions but when you upgrade a plugin to these dependencies. Several Maven release plugins use old (very old) Doxia/reporting-impl. Takes the changelog plugin case: The release POM [1] uses this dependency: <dependency> <groupId>doxia</groupId> <artifactId>doxia-sink-api</artifactId> <version>1.0-alpha-5</version> </dependency> Take care of the groupId. FYI, in the repos, Doxia has 3 differents groupdIds: doxia , org.codehaus.doxia and the official org.apache.maven.doxia Here are the steps to bump to latest releases: checkout the changelog tag and uses the 2.1.1-SNAPSHOT version update the POM to Doxia to org.apache.maven.doxia:doxia-sink-api:1.0 update to reporting impl 2.0.4 or later. This implies to replace org.codehaus.doxia.* imports by org.apache.maven.doxia.* and to modify the renderer component. Now, running the following, no single report will be generated: mvn org.apache.maven.plugins:maven-changelog-plugin:2.1.1-SNAPSHOT:changelog Is it more clear? [1] http://repo2.maven.org/maven2/org/apache/maven/plugins/maven-changelog-plugin/2.1/maven-changelog-plugin-2.1.pom
        Hide
        Brett Porter added a comment -

        +1 to fix the version. groupId issues notwithstanding, hadn't we discussed moving trunk to doxia itself in the interest of consolidating related tech?

        Show
        Brett Porter added a comment - +1 to fix the version. groupId issues notwithstanding, hadn't we discussed moving trunk to doxia itself in the interest of consolidating related tech?
        Hide
        Vincent Siveton added a comment -

        fixed in r832410

        Show
        Vincent Siveton added a comment - fixed in r832410
        Hide
        Olivier Lamy added a comment -

        this need to be merged in trunk

        Show
        Olivier Lamy added a comment - this need to be merged in trunk
        Hide
        Herve Boutemy added a comment -

        done in r940300

        Show
        Herve Boutemy added a comment - done in r940300

          People

          • Assignee:
            Vincent Siveton
            Reporter:
            Vincent Siveton
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: