Issue Details (XML | Word | Printable)

Key: MPIR-35
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Tim O'Brien
Votes: 4
Watchers: 6
Operations

If you were logged in you would be able to see more operations.
Maven 2.x Project Info Reports Plugin

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

Created: 10/Mar/06 10:23 AM   Updated: 24/Nov/09 12:20 AM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 2.x

Time Tracking:
Not Specified

File Attachments: 1. Text File maven-project-info-reports.patch (45 kB)
2. Zip Archive project-info-itest.zip (11 kB)

Issue Links:
Related
 


 Description  « Hide

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).



Adam Leggett added a comment - 24/Nov/07 06:36 AM

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


Rodrigo Ruiz added a comment - 22/Apr/08 09:01 AM - 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.