GeezerVison is showing github.com — [MNG-6797] Remember in MavenSession that there were problems detected when building Maven model · Issue #8485 · apache/maven
[MNG-6797] Remember in MavenSession that there were problems detected when building Maven model #8485DescriptionVáclav Haisman opened MNG-6797 and commented
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.
Affects: 3.6.2
Attachments:
Remote Links:
Activityjira-importer commented on Nov 29, 2019 Robert Scholte commented
Problems with the model are detected while creating the buildplan. This is way before the first plugin will be called. I don't see the benefit of this change, so without demonstration showing the need for this feature I'm going to close this issue as Won't Fix. jira-importer commented on Nov 29, 2019 Václav Haisman commented
The problems are detected and messages about the problems are printed. But they are regularly ignored by people (at least here). Remembering in MavenSessions that there were problems would allow me to write Maven Enforcer Plugin rule which could retrieve the problems flag and could fail the build if there were problems. I see a benefit in having this no build warnings policy. jira-importer commented on Nov 30, 2019 Robert Scholte commented
Can you provide a minimal pom.xml showing the issue and optionally the enforcer-rule you have in mind? jira-importer commented on Nov 30, 2019 Václav Haisman commented
I have attached a pom.xml with produces these Maven warnings. Normally, they would be ignored.
[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]
But with the attached Enforcer rule, I get this:
[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.
jira-importer commented on Dec 1, 2019 Robert Scholte commented
Right, now I see your point.
Not sure if it is fair, but this issue could also be discovered with the requirePluginVersions
For Maven 3.7.0 there's a chance we'll be able to have warning-less builds with MNG-6065, which will probably superseed this issue. jira-importer commented on Dec 1, 2019 Václav Haisman commented
MNG-6065 is interesting. I can see it working for some projects. But in my case it will not work well. It is impossible to fix all WARN messages logs in the project the size I maintain. added a commit that references this issue on Jul 29, 2026This issue will close once commit 1edef52 is merged into the 'master' branch.1edef52 added a commit that references this issue on Aug 24, 2026This issue will close once commit 98bdadb is merged into the 'master' branch.98bdadb added a commit that references this issue on Sep 4, 2026This issue will close once commit 54442ce is merged into the 'master' branch.54442ce added a commit that references this issue on Sep 15, 2026This issue will close once commit 676a69b is merged into the 'master' branch.676a69b gnodet commented on Oct 14, 2026 Closing as superseded by #12571, which introduces DiagnosticCollector — a session-scoped, thread-safe, deduplicated diagnostic collection service with severity, source, file/line, suggestion, and documentation URL. This is the proper API for remembering problems during the session.
Claude Code on behalf of Guillaume Nodet added a commit that references this issue on Nov 22, 2026This issue will close once commit bc5c9e2 is merged into the 'master' branch.bc5c9e2
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|