Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
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 add WARNs to model building result 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.
This change is really only to make Maven emit WARNINGs if project being built has some "far POMs" (like parent pom of a dependency of a first level dependency, as in reproducer). If model builder cannot be "100% sure" it built model correctly, it should be reported. Moreover, WARNs of model building result were simply neglected so fat (lost). Having warnings like these would reveal "invalid parent POM" early, as it is case in issue MNG-8131 for example.
Attachments
Issue Links
- relates to
-
MNG-8131 Property replacement in dependency pom no longer works
- Closed
- links to