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.
The `FilteredProjectDependencyGraph` class fix for non-transitive case and an UT. Also contains some improvement in classes, making them immutable as intended.
---
https://issues.apache.org/jira/browse/MNG-8256
* Code cleanup
* Provide build path with causes when an exception occur
* Fix toString to display meaningful info
* Javadoc
* Add @NonNull and @Overrides annotations
* Support for @Nullable on fields and parameters
* Rename ArtifactCoordinate.getVersion() as getVersionConstraint().
* Introduce DownloadedArtifact, DownloadedDependency and ProducedArtifact.
* Rename coordinate -> coordinates.
* Add documentation on Artifact, ArtifactCoordinates, Dependency and DependencyCoordinates and other classes.
* Remove `LATEST` and `SNAPSHOT` from documentation since they are deprecated.
* Opportunistic addition of some missing `@Override` annotations.
---------
Co-authored-by: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
* [MNG-7914] Provide a single entry point for configuration
* [MNG-7914] Rename global -> installation
* [MNG-7914] Include time zone in Maven build timestamp
* [MNG-7914] Use a single place to document all maven properties
* Make exception messages match Maven 3 again
The boxing of `MojoException` into a `MojoExecutionException` brought two issues:
1. It added another layer to the stacktrace, making it a bit less readable for users and breaking test expectations for Maven extension authors (this was my main motivation for this change)
2. It lost the `longMessage`, which meant that this message was no longer shown at the end of the build.
This change fixes both problems by passing through the original `MavenException` and treating this new exception type directly in `DefaultExceptionHandler` and `MojoExecutor`
* Broaden to MavenException
---------
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
* Use default classifier when Eclipse Aether specifies none.
The important change in this commit is in the implementation of `getClassifier()` methods.
However, this commit opportunistically refactors the code with a base class shared by `DefaultDependency` and `DefaultDependencyCoordinate` implementations.
* Preserve the type declared in the dependency (e.g. "modular-jar") when wrapping the object from Maven model.
* Add rootDirectory to XmlReaderRequest and fix maven-core exported artifacts
* Set the thread context classloader to the container realm to fix class loading from extensions
The info is there, but we redirect user to rinse-repeat in debug mode, that that creates a TON of output.
All is there, just tell why.
---
https://issues.apache.org/jira/browse/MNG-8140