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

No single report generated with latest maven-reporting-impl

    Details

    • Flags:
      Patch

      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
        Siveton Vincent
      2. reporting.patch
        9 kB
        Siveton Vincent

        Activity

        Hide
        Siveton Vincent added a comment -

        The MSHARED-120.patch seems better and is backward compatible (only no resources are available)

        Show
        Siveton Vincent added a comment - The MSHARED-120 .patch seems better and is backward compatible (only no resources are available)
        Hide
        Benjamin Bentmann added a comment - - edited

        Given that this patch restores significant functionality, how about using this patch to get back to some normal (i.e. Maven parseable) version number like "2.1.0" for the maven-reporting-impl? Likewise, the trunk of maven-reporting-impl seems abandoned, we had two releases from the branch already, so maybe we should just drop trunk and make the branch the trunk?

        Show
        Benjamin Bentmann added a comment - - edited Given that this patch restores significant functionality, how about using this patch to get back to some normal (i.e. Maven parseable) version number like "2.1.0" for the maven-reporting-impl? Likewise, the trunk of maven-reporting-impl seems abandoned, we had two releases from the branch already, so maybe we should just drop trunk and make the branch the trunk?
        Hide
        Siveton Vincent added a comment -

        I already asked to Dennis and Lukas what it the best approach for this issue. No response. I added them as watcher.
        I think we need to release 2.0.4.3 since old versions doesn't work with Doxia 1.1

        Show
        Siveton Vincent added a comment - I already asked to Dennis and Lukas what it the best approach for this issue. No response. I added them as watcher. I think we need to release 2.0.4.3 since old versions doesn't work with Doxia 1.1
        Hide
        Benjamin Bentmann added a comment -

        If not 2.1.0, then let's at least call it 2.0.5.

        Show
        Benjamin Bentmann added a comment - If not 2.1.0, then let's at least call it 2.0.5.
        Hide
        Dennis Lundberg added a comment -

        I don't understand what has broken between 2.0.4.1 and 2.0.4.2. The only changes I did was to upgrade the doxia dependency. So I'm sorry to say that I can't be of much help. When diffing the two versions the only code changes are in AbstractMavenReportRenderer.java.

        @Benjamin That's what I thought as well when I was about to release, what would become 2.0.4.2. The versioning is based on the version of the reporting API that the component is implementing, which is 2.0.4. Since we didn't change that I went with what had been started earlier with the 2.0.4.1 release.

        Show
        Dennis Lundberg added a comment - I don't understand what has broken between 2.0.4.1 and 2.0.4.2. The only changes I did was to upgrade the doxia dependency. So I'm sorry to say that I can't be of much help. When diffing the two versions the only code changes are in AbstractMavenReportRenderer.java. @Benjamin That's what I thought as well when I was about to release, what would become 2.0.4.2. The versioning is based on the version of the reporting API that the component is implementing, which is 2.0.4. Since we didn't change that I went with what had been started earlier with the 2.0.4.1 release.
        Hide
        Siveton Vincent added a comment -

        @Dennis, IIRC 2.0.4.x doesnt work with Doxia 1.0. Did you try my samples?

        Show
        Siveton Vincent added a comment - @Dennis, IIRC 2.0.4.x doesnt work with Doxia 1.0. Did you try my samples?
        Hide
        Dennis Lundberg added a comment -

        Well, in that case I do not understand how it could have worked with versions prior to Doxia 1.0. I have diffed maven-reporting-impl 2.0.4.1 with 2.0.4.2, doxia-sink-api, doxia-core and doxia-site-renderer 1.0-alpha-10 with 1.0, and I cannot find any changes in there that would make things stop working.

        No I didn't try your samples, but if you say it doesn't work, I trust you on that. unfortunately I do not understand how to fix it, but I am willing to help in any way I can, doing releases or whatever.

        Show
        Dennis Lundberg added a comment - Well, in that case I do not understand how it could have worked with versions prior to Doxia 1.0. I have diffed maven-reporting-impl 2.0.4.1 with 2.0.4.2, doxia-sink-api, doxia-core and doxia-site-renderer 1.0-alpha-10 with 1.0, and I cannot find any changes in there that would make things stop working. No I didn't try your samples, but if you say it doesn't work, I trust you on that. unfortunately I do not understand how to fix it, but I am willing to help in any way I can, doing releases or whatever.
        Hide
        Siveton Vincent 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
        Siveton Vincent 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
        Siveton Vincent added a comment -

        fixed in r832410

        Show
        Siveton Vincent 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
        Hervé Boutemy added a comment -

        done in r940300

        Show
        Hervé Boutemy added a comment - done in r940300

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development