[ 
https://issues.apache.org/jira/browse/MNG-6797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16985381#comment-16985381
 ] 

Václav Haisman commented on MNG-6797:
-------------------------------------

I have attached a pom.xml with produces these Maven warnings. Normally, they 
would be ignored.

{noformat}
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for 
org.example:problems-test:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for 
org.apache.maven.plugins:maven-install-plugin is missing. @ line 13, column 21
[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]
{noformat}

But with the attached Enforcer rule, I get this:

{noformat}
[INFO] --- maven-enforcer-plugin:3.0.0-SNAPSHOT:enforce (require-no-problems) @ 
problems-test ---
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireNoMavenModelProblems 
failed with message:
There are problems with effective model of this project.
{noformat}

> Remember in MavenSession that there were problems detected when building 
> Maven model
> ------------------------------------------------------------------------------------
>
>                 Key: MNG-6797
>                 URL: https://issues.apache.org/jira/browse/MNG-6797
>             Project: Maven
>          Issue Type: Improvement
>          Components: Bootstrap & Build
>    Affects Versions: 3.6.2
>            Reporter: Václav Haisman
>            Priority: Major
>         Attachments: RequireNoMavenModelProblems.java, pom.xml
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently, Maven only prints few lines regarding Maven model problems it 
> encounters when it is building the model. No plugin or code can retrieve the 
> information anywhere. I would like to change that so that at least a boolean 
> flag is used to remember that there were or were not problems when building 
> Maven model. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to