Hi all, I've been writing a report plug-in to generate some statistics. If it detects issues with the data which I consider to be serious, I then want to abort the build. I can do this by throwing a MavenReportException from the report however this also aborts the flushing of the report contents to the report file, thus leaving the log as the only means of outputting the issue.
What I want to do is still generate the html report, and preferably the whole site, then cause the build to abort. I've tried/thought of .... 1. Adding getSink().flush() and getSink().close() to the report in the hopes that it would flush and close the html file before I threw the MavenreportException. Didn't work, still got a blank file. 2. Creating a check plug-in to check the results of the report. Won't work as site is not part of the default life cycle and therefore the only way to run the check is to explicitly run it's goal i.e. mvn project-name clean install site check-data. Not an ideal solution at all. 3. Creating a second report plug-in which does the check. Works but because the site is still not generated, there are no css files etc. to make the report look good. So does anyone have a solution to this ? ciao Derek -- View this message in context: http://www.nabble.com/Howo-to-abort-after-reports-have-run---tf4009718s177.html#a11387202 Sent from the Maven Developers mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]