You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Maven User <ma...@gmail.com> on 2013/09/04 23:43:58 UTC

Fail the maven build on arbitrary string output in the log

Hi all -

Is there a way to fail the build if an arbitrary string shows up in the log?

We have quite the cocktail of plugins and instead of editing each one
to catch different problems, it'd be cooler to have an enforcer plugin
run at the VERY end and fail if the build has previously logged a
particular regex.

Is there a way to do this?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Fail the maven build on arbitrary string output in the log

Posted by Anders Hammar <an...@hammar.net>.
You should be able to write your own enforcer rule to do this.
However, to me, it sounds like the wrong way to do this. Being forced to
add the enforcer-plugin to a project's build to catch errors in a plugin is
not "convention over configuration" in my mind. A plugin should catch
errors related to what it is doing.

/Anders


On Wed, Sep 4, 2013 at 11:43 PM, Maven User <ma...@gmail.com> wrote:

> Hi all -
>
> Is there a way to fail the build if an arbitrary string shows up in the
> log?
>
> We have quite the cocktail of plugins and instead of editing each one
> to catch different problems, it'd be cooler to have an enforcer plugin
> run at the VERY end and fail if the build has previously logged a
> particular regex.
>
> Is there a way to do this?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>