* Provide a weak cache for objects from the main model
* Fix infinite loops caused by circular references when interpolating model
* Add javadoc and unit tests
* Include the list of <Source> elements in the path translation.
* Add a `SourceRoot` interface for the properties declared in the POM's `<Source>` element.
The API use method names without `get` prefix in anticipation for possible use of records in the future.
In the `MavenProject` class, the `compileSourceRoots`, `testCompileSourceRoots` and `scriptSourceRoots`
fields are replaced by redirections to the new `sources` field with paths wrapped in `SourceRoot` objects.
The getters and setters methods for the previous fields are deprecated.
This commit contains other opportunistic deprecations on methods working with deprecated interfaces.
In the POM file, the above-cited properties are ignored if a corresponding `<Source>` element exists.
This rule exits because Maven sets default values to those fields, which can interfer with user's setting.
* Deprecate POM elements that are replaced by <Source> elements.
* Add @Deprecated annotation on model elements flagged as @deprecated in the documentation.
* Update `ProjectManager` API using `SourceRoot`:
- Add `addSourceRoot(Project, …)` methods.
- Add `getSourceRoots()` and `getEnabledSourceRoots(ProjectScope, Language)`.
- Remove `get/addResource(Project, …)` methods.
- Remove `get/addCompileSourceRoots(Project, …)` methods.
---------
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
As Central has POMs using wrong values, causing even dependency collation to fail. For now plugin/pluginMtg is handled, but it seems extensions, ReportPlugins and ReportSets are not even validated...
---
https://issues.apache.org/jira/browse/MNG-8513
* Add a <Source> element in the model. Properties are:
- directory (inherited from FileSet)
- includes (inherited from PatternSet)
- excludes (inherited from PatternSet)
- scope
- lang
- module
- targetVersion
- targetPath (taken from <Resource>)
- filtering (taken from <Resource>)
- enabled
This commit also renames `source` parameter value in `reader-stax.vm`
for avoiding name collision with the new `Source` model element.
https://github.com/apache/maven/pull/1936
* Resolve an ambiguity in the description of `target` behavior.
Rename `filtering` as `stringFiltering` for avoiding confusion with file filtering.
* Corrections in the comment about mapping from old elements to <Source>.
Maven4 site cleanup: make all new modules generating models also document them, expose them all and redirect all links to new documentation.
Lifecycle is the only thing missing, as it is generated on the fly, there is no more source to "point at"...
---
https://issues.apache.org/jira/browse/MNG-8473
Make execution flow never invoke path.toFile, at least what model-builder and maven-resolver-provider matters. Using new methods from Resolver 2 alpha8 and also adding in relevant maven bits, as half of the work was already done.
---
https://issues.apache.org/jira/browse/MNG-8059