maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <>
Subject [jira] (MNG-5091) Add option to fail build if WARNING's appear in POM
Date Sun, 02 Jun 2013 16:45:03 GMT


Robert Scholte closed MNG-5091.

    Resolution: Won't Fix

I think it is much easier to solve this with an enforcer rule.
The {{fail-on-warning}} option is probably not the correct solution right now, because there
will be a big chance people will expect the build to fail when any warning is logged. Up to
Maven-3.0.5 there's not enough control over the logging, but that might change with 3.1.x
Since you want such validation for every time you do the build (and not just by an additional
cmd-line option) it should be solved with a maven-plugin: another reason to add this as an

> Add option to fail build if WARNING's appear in POM
> ---------------------------------------------------
>                 Key: MNG-5091
>                 URL:
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Command Line, POM
>    Affects Versions: 3.0.3
>            Reporter: Karl Heinz Marbaise
>            Priority: Minor
>             Fix For: 3.1.x
>         Attachments: MNG-5091-maven-embedder.patch
> It would be nice to have the option to let a build fail if something like this will appear:
> {code}
> [INFO] Scanning for projects...
> [WARNING] Some problems were encountered while building the effective model for
> [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique:
org.slf4j:slf4j-api:jar -> duplicate declaration of version 1.6.1 @ line 28, column 14
> [WARNING] It is highly recommended to fix these problems because they threaten the stability
of your build.
> [WARNING] For this reason, future Maven versions might no longer support building such
malformed projects.
> {code}
> This shoud be done for WARNING's in case of missing versions for plugins etc.
> Currently it is possible to set the Validation leven in Jenkins/Hudson already but it
is not possible on command line. So an option on command line like:
> {code}
> mvn --fail-warning ...
> {code}
> would be great. Or may be a good supplemental option to set the validation level like:
> {code}
> mvn --validation-level MINIMAL
> mvn --validation-level MAVEN20
> mvn --validation-level MAVEN30
> mvn --validation-level MAVEN31
> mvn --validation-level DEFAULT
> {code}
> or may be both. May this might be an enhancement for Maven 3.0.4 ?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message