Issue Details (XML | Word | Printable)

Key: MPSITE-50
Type: Wish Wish
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Lukas Theussl
Reporter: Shinobu Kawai
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1.x Site Plugin

a way to ignore report failures

Created: 31/Mar/06 01:27 PM   Updated: 06/Apr/06 12:07 PM   Resolved: 06/Apr/06 12:07 PM
Return to search
Component/s: plugin
Affects Version/s: 1.6.1
Fix Version/s: 1.7

Time Tracking:
Not Specified

File Attachments: 1. Text File MPSITE-50-with-xdocs.patch (2 kB)
2. Text File MPSITE-50.patch (1 kB)
3. Text File MPSITE-50.patch (1 kB)



 Description  « Hide

It would be great if there was a way to ignore report failures. Something like a proprety called "maven.site.reports.failonerror".



Lukas Theussl added a comment - 31/Mar/06 01:34 PM

This can only be implemented in the corresponding reports, eg the pmd plugin has a maven.pmd.failonerror property, checkstyle has maven.checkstyle.fail.on.violation, etc.


Shinobu Kawai added a comment - 03/Apr/06 05:17 PM

I was thinking more along the lines of using the jelly:catch tag, and swallowing the BuildException (or whatever gets thrown).


Shinobu Kawai added a comment - 03/Apr/06 05:18 PM

Patch to ignore report failures.


Shinobu Kawai added a comment - 04/Apr/06 12:25 PM

Provide a better message.


Lukas Theussl added a comment - 04/Apr/06 12:29 PM

Can you provide a patch for the docs as well?
What will happen if you set eg maven.checkstyle.fail.on.violation=true but maven.site.reports.failonerror=false?


Shinobu Kawai added a comment - 05/Apr/06 11:13 AM

Patch including xdocs.


Shinobu Kawai added a comment - 05/Apr/06 11:21 AM

>> What will happen if you set eg maven.checkstyle.fail.on.violation=true but maven.site.reports.failonerror=false?

Haven't tried, but the checkstyle report will fail, but the site generation should continue. (The checkstyle report should become a broken link.)

The Use Case for this issue is when I don't need all of the reports to succeed before the site gets generated/deployed. For example, even if the source violated checkstyle, I still want to see my javadoc. As you commented earlier, not all plugins support don't-fail-on-error options.


Lukas Theussl added a comment - 06/Apr/06 12:07 PM

Patch applied with slight modifications. I renamed the property to maven.site.reports.ignoreErrors which appeared more logical
(eg the build did not fail with maven.checkstyle.fail.on.violation=false but maven.site.reports.failonerror=true). Thanks!