Maven Project Info Reports Plugin
  1. Maven Project Info Reports Plugin
  2. MPIR-35

Site Plugin should work from Template. Plugin Should not generate Markup from Java

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      2

      Description

      The site plugin currently generates markup from Java. There is logic in the team list report that prints HTML and Javascript directly to a StringBuffer and there is no facility for customization. Because of this, every single site that uses the project info reports ends up with the same text. Google for the text of the team-list plugin and there are at least 18,000 matching pages.

      There needs to be a facility for customization. I propose that the default report is published from a velocity template loaded form the classpath, but the site plugin checks for the presence of an overriding velocity template in a know path (or from a URL).

        Issue Links

          Activity

          Hide
          Adam Leggett added a comment -

          Added a prospective patch to workaround the default vanilla text issue for project reports.

          Solution is to allow a project to override the default properties file containing the messages for the reports.
          I've made a change to AbstractProjectInfoReport to include an additional optional configuration element of <reportPropertiesBasename> that defaults to 'project-info-report'.
          I've then done a prototype implementation in the TeamListReport subclass and updated the corresponding Test Case.

          Also attached some sample integration test projects - one that packages the property resource, which is then referenced as a dependency by the other project in the maven-project-info-reports-plugin configuration.

          If the solution is deemed appropriate, i could modify the other report subclasses and make the testing more robust.

          TIA

          Adam

          Show
          Adam Leggett added a comment - Added a prospective patch to workaround the default vanilla text issue for project reports. Solution is to allow a project to override the default properties file containing the messages for the reports. I've made a change to AbstractProjectInfoReport to include an additional optional configuration element of <reportPropertiesBasename> that defaults to 'project-info-report'. I've then done a prototype implementation in the TeamListReport subclass and updated the corresponding Test Case. Also attached some sample integration test projects - one that packages the property resource, which is then referenced as a dependency by the other project in the maven-project-info-reports-plugin configuration. If the solution is deemed appropriate, i could modify the other report subclasses and make the testing more robust. TIA Adam
          Hide
          Rodrigo Ruiz added a comment - - edited

          Having the ability to specify custom templates for the reports would be great. Much better than just the message properties.

          For example, I would like to merge the Organisation and Organisation URL columns of the Projet Team report into a single column with a link to the URL using the Organisation name as the link text (I don't know why it is not so). Such changes would be very easy to do with templates.

          BTW, custom templates would be a valid solution for issues MPIR-78, MPIR-86, MPIR-94 and MPIR-97.

          Show
          Rodrigo Ruiz added a comment - - edited Having the ability to specify custom templates for the reports would be great. Much better than just the message properties. For example, I would like to merge the Organisation and Organisation URL columns of the Projet Team report into a single column with a link to the URL using the Organisation name as the link text (I don't know why it is not so). Such changes would be very easy to do with templates. BTW, custom templates would be a valid solution for issues MPIR-78 , MPIR-86 , MPIR-94 and MPIR-97 .
          Hide
          Michael Osipov added a comment -

          Cleanup, reopen if you still care.

          Show
          Michael Osipov added a comment - Cleanup, reopen if you still care.

            People

            • Assignee:
              Unassigned
              Reporter:
              Tim O'Brien
            • Votes:
              6 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: