[
https://issues.apache.org/jira/browse/MNG-8141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17852933#comment-17852933
]
ASF GitHub Bot commented on MNG-8141:
-------------------------------------
cstamas opened a new pull request, #1565:
URL: https://github.com/apache/maven/pull/1565
And not rely that model was validated, which is not true in some cases.
Model builder can still easily detect issues with models while building them.
Provides "escape hatch" for projects stuck on invalid models in form of user
property that can be enabled with
`-Dmaven.modelBuilder.failOnInvalidModel=false`, this reverts to _old_
behaviour of maven, and the JavaFX reproducer goes back to error "unable to
resolve" errors with uninterpolated `${javafx.platform}` property as classifier.
---
https://issues.apache.org/jira/browse/MNG-8141
> Model Builder should not rely on "validity" of processed model
> --------------------------------------------------------------
>
> Key: MNG-8141
> URL: https://issues.apache.org/jira/browse/MNG-8141
> Project: Maven
> Issue Type: Improvement
> Components: Core
> Reporter: Tamas Cservenak
> Assignee: Tamas Cservenak
> Priority: Major
> Fix For: 4.0.0, 3.9.8, 4.0.0-beta-4
>
>
> ModelBuilder is component building models (POM + interpolating + parent
> inheritance and many many more things), but it should not rely that built
> model "was validated", as it MAY NOT been validated: for "furthest" models it
> builds, like a parent of a some-level-dependency we use MIN level of
> validation (minimal validation).
> Still, while the model builder builds, it relies on several aspects of the
> model, and it should ensure that the "output" (built model) is correct. Model
> Builder hence must be changed in way, that IF it detects any issue _during
> building_ of the model, and IF it appears with even slightest possibility
> that it cannot deliver "correct output", it must fail model building with
> proper messages.
> One typical case is when model building injects activated profiles (as they
> can deliver properties and extra plugins and what not) and activation code
> detects a "problem", like for example duplicated profile IDs being used (this
> IS catched by validation, but not on MIN level!), hence, model builder cannot
> guarantee that built model IS correct.
> Projects "stuck" on invalid models can use "escape hatch"
> {{-Dmaven.modelBuilder.failOnInvalidModel=false}} that reverts to original
> Maven behaviour, as reported in issue MNG-8131 for example.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)