Ensure all dependencies end up in the model. Avoid work when there are no dependencies. Extract method, re-introduce optimization to return original model
---
https://issues.apache.org/jira/browse/MNG-8331
Generate both skinny and fat BOMs BOM automatically
Add support for import a BOM w/ classifier in Model 4.1.0+
---------
Co-authored-by: Tamas Cservenak <tamas@cservenak.net>
First, `rootDirectory` is nullable, CLIng code was not assuming this, fixed.
Second, emit the "no root found" warning ONLY when appropriate (when we have a POM in picture).
---
https://issues.apache.org/jira/browse/MNG-8302
Actually use TransitiveDependencyManager when maven.resolver.dependencyManagerTransitivity=true
Co-authored-by: DidierLoiseau <didierloiseau+github@gmail.com>
It seems Maven is eager to get POM from rootDirectory to support
CI Friendly versions. This change makes it "best effort", as in
if there is no POM, just walk away.
---
https://issues.apache.org/jira/browse/MNG-8288
* Sus method that nullifies model
* Make it clear
* Same change in new API
* Fix the logic to return the old value when unchanged
---------
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
With the introduction of the build pom and raw -> build pom transformation, the construction of the effective poms in two steps become very problematic. Over the time, multiple caches have been added to the ProjectBuilder and ModelBuilder related classes which are often redundant.
This PR thus changes things and move the recursive construction of the models fully into the ModelBuilder in a single call. When building build poms, a first step is done by parsing the file models from the root, then building all needed effective models from those. All the inference can be cleanly done because the builder has all the file models ready. The result will be used by the ProjectBuilder to build the projects.
During model building, we do not cache any hierarchy inheritance due to profiles that may be activated based on properties from the child projects.
So there's no way to cache the effective parent and just inject it into the child, the whole hierarchy need to be taken into account.
However, flattening the parent (i.e. inject the flattened parent's parent into the raw parent) should provide a parent model which has no parents anymore, not activated and not interpolated, but which can be cached and reused.