Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6189

WARN if maven-site-plugin configuration contains reportPlugins element

    Details

      Description

      with MNG-4162, a bunch of reporting logic was removed from Maven core.
      This was globally successful, but not on one topic: it was expected to remove pom's reporting section and replace it with a normal reportPlugins parameter in maven-site-plugin configuration.
      We later discovered that with this normal parameter, we missed one crucial feature: report plugins inheritance, which would require a new mechanism MSITE-484
      Then we reverted our instructions in maven-site-plugin documentation MSITE-647: the new reportPlugins parameter is now just an implementation detail, but should not be used by end-users, reporting section remains the way to configure report plugins MSITE-684

      Now adding a warning in Maven core when it detects a reportPlugins parameter in a maven-site-plugin configuration is easy to do, will help users come back to normal reporting configuration, and will permit future enhancements (we need to finally completely clean-up the situation we created with this story...)

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build maven-3.x #1575 (See https://builds.apache.org/job/maven-3.x/1575/)
          MNG-6189 warn if maven-site-plugin reportPlugins is configured (hboutemy: http://git-wip-us.apache.org/repos/asf/?p=maven.git&a=commit&h=16382802611939a8876fe553208e8b0f4da606a6)

          • (edit) maven-model-builder/src/main/java/org/apache/maven/model/plugin/ReportingConverter.java
          • (edit) maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-3.x #1575 (See https://builds.apache.org/job/maven-3.x/1575/ ) MNG-6189 warn if maven-site-plugin reportPlugins is configured (hboutemy: http://git-wip-us.apache.org/repos/asf/?p=maven.git&a=commit&h=16382802611939a8876fe553208e8b0f4da606a6 ) (edit) maven-model-builder/src/main/java/org/apache/maven/model/plugin/ReportingConverter.java (edit) maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultReportingConverter.java
          Hide
          WolfgangFahl Wolfgang Fahl added a comment - - edited

          When getting the message:

          Some problems were encountered while building the effective model for ...
          [WARNING] Reporting configuration should be done in <reporting> section, not in maven-site-plugin <configuration> as reportPlugins parameter. @ line ... column ...
          [WARNING]

          a search egine search points here. This is very infortunate since for maven users this might be all greek. It would be great to have some simple configuration examples and an answer to the stackoverflow question below:

          See:
          https://stackoverflow.com/questions/46742407/some-problems-were-encountered-while-building-the-effective-model-for

          Show
          WolfgangFahl Wolfgang Fahl added a comment - - edited When getting the message: Some problems were encountered while building the effective model for ... [WARNING] Reporting configuration should be done in <reporting> section, not in maven-site-plugin <configuration> as reportPlugins parameter. @ line ... column ... [WARNING] a search egine search points here. This is very infortunate since for maven users this might be all greek. It would be great to have some simple configuration examples and an answer to the stackoverflow question below: See: https://stackoverflow.com/questions/46742407/some-problems-were-encountered-while-building-the-effective-model-for
          Hide
          hboutemy Hervé Boutemy added a comment - - edited

          thank you for this useful feedback: yes, we need to improve the experience when someone tries to understand what to do when he gets this message

          I'll need your help to find the best place to explain things, then link directly from StackOverflow, because I did all the changes, and I'm struggling to create simple and concise explanations...

          the full reference explanations are in Maven Site Plugin Configuration Formats section: http://maven.apache.org/plugins/maven-site-plugin/maven-3.html#Configuration_formats

          do you think it's sufficiently clear? do you have ideas on how to improve it?
          And should we add something specific to the WARN message that was added in Maven 3.5.0?

          Show
          hboutemy Hervé Boutemy added a comment - - edited thank you for this useful feedback: yes, we need to improve the experience when someone tries to understand what to do when he gets this message I'll need your help to find the best place to explain things, then link directly from StackOverflow, because I did all the changes, and I'm struggling to create simple and concise explanations... the full reference explanations are in Maven Site Plugin Configuration Formats section: http://maven.apache.org/plugins/maven-site-plugin/maven-3.html#Configuration_formats do you think it's sufficiently clear? do you have ideas on how to improve it? And should we add something specific to the WARN message that was added in Maven 3.5.0?
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build maven-plugins #9160 (See https://builds.apache.org/job/maven-plugins/9160/)
          MSITE-792 improved explanations on Maven 3.5.0 WARNING for MNG-6189 (hboutemy: http://svn.apache.org/viewvc/?view=rev&rev=1812178)

          • (edit) maven-site-plugin/src/site/apt/maven-3.apt.vm
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-plugins #9160 (See https://builds.apache.org/job/maven-plugins/9160/ ) MSITE-792 improved explanations on Maven 3.5.0 WARNING for MNG-6189 (hboutemy: http://svn.apache.org/viewvc/?view=rev&rev=1812178 ) (edit) maven-site-plugin/src/site/apt/maven-3.apt.vm
          Hide
          WolfgangFahl Wolfgang Fahl added a comment - - edited

          I think it would be good to add a pointer to a specific website/blog entry explaining what to do. An initial wording could be something like in the answer:

          https://stackoverflow.com/a/46743438/1497139

          And as simple svn / git diff that shows what things look before and after the changes will be much clearer.
          The abstract explanation is in any case far too complicated. When a mvn user understands what he really needs to do the move is really simple.

          In a wiki with syntax. highlighting things can be explained quite clearly - see
          http://wiki.bitplan.com/index.php/MNG-6189

          Show
          WolfgangFahl Wolfgang Fahl added a comment - - edited I think it would be good to add a pointer to a specific website/blog entry explaining what to do. An initial wording could be something like in the answer: https://stackoverflow.com/a/46743438/1497139 And as simple svn / git diff that shows what things look before and after the changes will be much clearer. The abstract explanation is in any case far too complicated. When a mvn user understands what he really needs to do the move is really simple. In a wiki with syntax. highlighting things can be explained quite clearly - see http://wiki.bitplan.com/index.php/MNG-6189
          Hide
          hboutemy Hervé Boutemy added a comment -

          I added some details in http://maven.apache.org/plugins-archives/maven-site-plugin-LATEST/maven-3.html#New_Configuration_Maven_3_only_no_reports_configuration_inheritance which will be published with Maven Site Plugin 3.7

          With the StackOverflow reference and this discussion, I imagine the topic is now sufficiently covered for end users to find it

          thank you for your contribution

          Show
          hboutemy Hervé Boutemy added a comment - I added some details in http://maven.apache.org/plugins-archives/maven-site-plugin-LATEST/maven-3.html#New_Configuration_Maven_3_only_no_reports_configuration_inheritance which will be published with Maven Site Plugin 3.7 With the StackOverflow reference and this discussion, I imagine the topic is now sufficiently covered for end users to find it thank you for your contribution

            People

            • Assignee:
              hboutemy Hervé Boutemy
              Reporter:
              hboutemy Hervé Boutemy
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development