You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Florian Fray (JIRA)" <ji...@codehaus.org> on 2011/05/13 03:38:22 UTC

[jira] Updated: (MNG-5091) Add option to fail build if WARNING's appear in POM

     [ http://jira.codehaus.org/browse/MNG-5091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Fray updated MNG-5091:
------------------------------

    Attachment: MNG-5091-maven-embedder.patch


Indeed I'd like the fail-on-warning - behaviour better, as it does not point to any specific Maven version,
but I've created a small patch adding the suggested {{--validation-level}} switches.

Anyway I'd prefer to be able to toggle this behaviour via the POM or the settings.


There are just minor changes to the proposed solution, as there are:
- option values are all lower-case and
- an additional {{strict}} argument-value supporting {{ModelBuildingRequest.VALIDATION_LEVEL_STRICT}}.

I'd like to change printing the error-message right after the help, but I didn't really know if that would be okay.

Hopefully I spotted the proper locations for adding this little enhancement, so I'm looking forward for a review.


Best regards,

Florian

> Add option to fail build if WARNING's appear in POM
> ---------------------------------------------------
>
>                 Key: MNG-5091
>                 URL: http://jira.codehaus.org/browse/MNG-5091
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Command Line, POM
>    Affects Versions: 3.0.3
>            Reporter: Karl Heinz Marbaise
>            Priority: Minor
>         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] 
> [WARNING] Some problems were encountered while building the effective model for com.soebes.training.module:050-project-without-warnings:jar:0.1.0-SNAPSHOT
> [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] 
> [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
> [WARNING] 
> [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
> [WARNING] 
> {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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira