Commit Graph

11805 Commits

Author SHA1 Message Date
Guillaume Nodet 2db7c85b64
[MNG-7038] Introduce public properties to point to the root and top directories of (multi-module) project (#1061)
This commit introduces three properties:

 * project.rootDirectory: the project's directory or parent directory containing a .mvn subdirectory or a pom.xml flagged with the root="true" attribute. If no such directory can be found, accessing the rootDirectory property will throw an IllegalStateException.

 * session.topDirectory : the directory of the topmost project being built, usually the current directory or the directory pointed at by the -f/--file command line argument. The topDirectory is similar to the executionRootDirectory property available on the session, but renamed to make it coherent with the new rootDirectory and to avoid using root in its name. The topDirectory property is computed by the CLI as the directory pointed at by the -f/--file command line argument, or the current directory if there's no such argument.

 * session.rootDirectory : the rootDirectory for the topDirectory project.

The topDirectory and rootDirectory properties are made available on the MavenSession / Session and deprecate the executionRootDirectory and multiModuleProjectDirectory properties. The rootDirectory should never change for a given project and is thus made available for profile activation and model interpolation (without the project. prefix, similar to basedir). The goal is also to make the rootDirectory property also available during command line arguments interpolation.

A root boolean attribute is also added to the model to indicate that the project is the root project. This attribute is only supported if the buildconsumer feature is active and removed before the pom is installed or deployed. It can be used as an alternative mechanism to the .mvn directory.
2023-04-20 12:58:12 +02:00
Guillaume Nodet 9e51a8fe95
[MNG-7763] Provide UTF-8 as a default value for project.build.sourceEncoding and project.reporting.outputEncoding (#1085) 2023-04-17 15:20:54 +02:00
Tamas Cservenak 0a67219271 [MNG-7753] Upgrade resolver to 1.9.8 (was 1.9.7).
---

https://issues.apache.org/jira/browse/MNG-7753
2023-04-17 14:23:50 +02:00
Karl Heinz Marbaise 5c750eacb4
[MNG-7766] - Migrate to use mockito-bom 4.11.0 2023-04-16 14:54:16 +02:00
Karl Heinz Marbaise c49c4e0b18
[MNG-7451] - Remove public modifier from test methods / test classes 2023-04-15 19:24:20 +02:00
Karl Heinz Marbaise d7d8544669
[MNG-7765] - Minimum Build Requirement is wrong 2023-04-14 10:42:02 +02:00
Guillaume Nodet b7a3d85713 Simplify logger creation leveraging Map.computeIfAbsent 2023-04-13 11:35:01 +02:00
Tamas Cservenak 432bd7af3a [MNG-7741] Track missing files, plugin and parent pom dependencies (#1058)
Add more information when using `-Dmaven.repo.local.recordReverseTree=true`.

Signed-off-by: Grzegorz Grzybek <gr.grzybek@gmail.com>

---

https://issues.apache.org/jira/browse/MNG-7741
2023-04-12 13:08:37 +02:00
Niels Basjes 328ea1be31
[MNG-7750] Ensure no unwanted interpolation in plugins from profiles. (#1076)
This is the port of https://github.com/apache/maven/pull/1075 to the master branch.

The good thing is that this is ONLY the tests because the maven 4 does not have the problem of MNG-7750.

A few small changes in the tests were needed to handle the internal differences between maven 3.x and maven 4.x.

---

https://issues.apache.org/jira/browse/MNG-7750
2023-04-12 12:26:40 +02:00
Tamas Cservenak 53b6473237 [MNG-7754] Improvement and extension of plugin validation (#1079)
This is general rework of current Maven 3.9.x line how it handles plugin and mojo validations.

Changes:
* added plugin validations for dependencies
* introduced pluginValidationManager that gathers violations
* manager creates a report at build end, with dense and non repeating data
* this is in spirit to lessen already too verbose logging, as current solution would report violations as many times plugin is used in reactor, and that can be many (ie. a plugin from parent for each module)

Example report of Maven 3.9.x build: https://gist.github.com/cstamas/b62fdcd53eaf316123cf183f5a24e6a5

---

https://issues.apache.org/jira/browse/MNG-7754
2023-04-12 11:55:40 +02:00
Guillaume Nodet b2ee29e03e [MNG-6825] Get rid of commons-lang 2023-04-06 10:51:18 +02:00
Guillaume Nodet 26056b9b20 [MNG-7756] The degree of concurrency does not support "2." as a factor
Also fix the thrown exception to report valid syntaxes without assuming the user intent (for example "0.5c" would say it's not an int...)
2023-04-06 10:51:18 +02:00
Tim te Beek 8421a36592
[MNG-6825] Replace StringUtils (#1078)
Co-authored-by: Moderne <team@moderne.io>
2023-04-01 01:56:03 +00:00
Slawomir Jaranowski b2b04d2e92 [MNG-7749] Upgrade animal-sniffer from 1.21 to 1.23 2023-03-27 19:21:33 +02:00
Elliotte Rusty Harold 38ba581634
correct comment (#1074) 2023-03-26 23:58:20 +00:00
Elliotte Rusty Harold 54afd174ef
remove unused branches in fake (#1069)
* remove unused branches in a fake object
2023-03-23 10:36:23 +00:00
Guillaume Nodet ae933fe68d
[MNG-7720] Simplify code (#1063) 2023-03-23 06:31:49 +01:00
Guillaume Nodet 2788849c37
Switch version to 4.0.0 for @since tags (#1068) 2023-03-23 06:29:39 +01:00
Elliotte Rusty Harold cadeab53f6
MNG-7738 don't dump raw stack traces to System.err (#1064) 2023-03-22 12:44:37 +00:00
Tim te Beek 703f814e34
[MNG-6825] Replace FileUtils with Commons IO (#1067)
* [MNG-6825] Replace FileUtils with Commons IO

Co-authored-by: Moderne <team@moderne.io>

* Minor fixes and reverts where cases are not handled yet

* Drop explicit dependencies on plexus-utils

---------

Co-authored-by: Moderne <team@moderne.io>
2023-03-19 20:19:22 +00:00
Tamas Cservenak f071094f34 Update DOAP with Maven 3.9.1 release 2023-03-18 11:26:07 +01:00
Guillaume Nodet 8052c720e7 [maven-release-plugin] prepare for next development iteration 2023-03-15 17:06:58 +01:00
Guillaume Nodet 26d10a4bf9 [maven-release-plugin] prepare release maven-4.0.0-alpha-5 2023-03-15 17:06:43 +01:00
Guillaume Nodet ade97d5a69
[MNG-7697] Fix assembly which should not include plexus-utils-3.5.0 (#1057) 2023-03-15 13:12:48 +01:00
Michael Osipov 814af33e67 Update DOAP with Maven 3.8.8 release 2023-03-14 16:50:46 +01:00
Slawomir Jaranowski e9e0a51738 [MNG-7725] Update surefire to 3.0.0 in default binding 2023-03-14 16:42:10 +01:00
Guillaume Nodet 9d851eea68
[MNG-7678] Settings (v3) and Settings.Builder() cannot unset a non-null field (#983) 2023-03-13 19:35:35 +01:00
Elliotte Rusty Harold 696cf37dc7
update a few URLs (#1052) 2023-03-13 00:17:09 +00:00
Elliotte Rusty Harold 993d863743
remove unused class (#1049) 2023-03-13 00:15:52 +00:00
Tamas Cservenak 31cc44f1cf
[MNG-7723] Upgrade to Maven Resolver 1.9.7 (#1046)
Upgrade to Maven Resolver 1.9.7

---

https://issues.apache.org/jira/browse/MNG-7723
2023-03-11 20:24:25 +01:00
Elliotte Rusty Harold 2d85d13ee8
MNG-7724 don't warn about unsupported SLF4J configs; no one cares (#1051) 2023-03-11 19:13:02 +00:00
Guillaume Nodet 57d5587cf8
[MNG-7727] Remove MavenProfilesBuilder and DefaultMavenProfilesBuilder (#1044) 2023-03-11 16:24:56 +01:00
Guillaume Nodet 116ca6a3ad
[MNG-7709] Regression in configuration merge (#1023) 2023-03-09 21:15:24 +01:00
Guillaume Nodet dc8ec4c973
Fix mutable api in PluginContainer (#1019) 2023-03-09 21:14:48 +01:00
Guillaume Nodet 93a0ecfd2d
Additional XmlNode tests from plexus-utils (#994) 2023-03-09 21:14:20 +01:00
Guillaume Nodet bb02d120a1
Fix callee closing streams and readers instead of callers (#1043)
For compatibility reason, the Xpp3DomBuilder will close those
2023-03-09 16:28:10 +01:00
Guillaume Nodet 10128b4484
Remove references to Xpp3DomBuilder and use XmlNodeBuilder instead (#1045) 2023-03-09 16:26:58 +01:00
Guillaume Nodet 1922e01831
[MNG-7710] Upgrade plexus-utils to 3.5.1 (#1042) 2023-03-09 06:24:50 +01:00
Hervé Boutemy 909c2cdf57 [MNG-7553] put documentation in reference site 2023-03-08 18:54:43 +01:00
Hervé Boutemy ea21d6f6fc [MNG-7666] update documentation 2023-03-08 18:45:23 +01:00
Tamas Cservenak 1ffd68b802
[MNG-7720] Wrong build order of forked projects (#1040)
The original fix MNG-7672 matched the "scope" but missed the "order". `project.collectedProjects` are in order as loaded (POM order), is not topologically sorted.

Fix is to use DAG of projects, ask for downstream projects (will return more then we need but sorted) and narrow that list to only contain collected projects.

---

https://issues.apache.org/jira/browse/MNG-7720
2023-03-08 09:04:35 +01:00
Elliotte Rusty Harold bec19ec41d
replace deprecated methods that don't properly handle encoding (#1033) 2023-03-08 00:11:30 +00:00
Andrey Bruykhov f7d3e30d10 Using Set<>() for contains()
This closes #998
2023-03-07 17:54:07 +01:00
Elliotte Rusty Harold 009ec5dc41
remove plexus utils dependency (#1032) 2023-03-07 10:44:46 -05:00
Tamas Cservenak c1dfb947b5
[MNG-7715] Update to resolver 1.9.6 (#1036)
Adjust some UTs as error message did change.

---

https://issues.apache.org/jira/browse/MNG-7715
2023-03-06 11:17:56 +01:00
Elliotte Rusty Harold 0dd9ebc126
restore src/mdo/reader.vm (#1034) 2023-03-05 12:43:42 +00:00
Elliotte Rusty Harold dcc916a9e3 Merge branch 'master' of github.com:apache/maven 2023-03-04 18:44:39 -05:00
Elliotte Rusty Harold d86cee4f90 revert accidental commit 2023-03-04 18:44:29 -05:00
Elliotte Rusty Harold 9e797f5e1b let hte XML parser detect th encoding 2023-03-04 18:42:08 -05:00
Christoph Läubrich f41d533e71 [MNG-7716] ConcurrencyDependencyGraph deadlock if no root is selected
If ConcurrencyDependencyGraph#getRootSchedulableBuilds returns an empty
list then MultiThreadedBuilder is locked forever as it never gets a
build result (because nothing is scheduled).

This changes the method, that in such case just the first project is
returned, this might not give the best performance, but ensures that
there is at least one build scheduled and the build-loop can proceed.

This closes #1029
2023-03-03 18:04:36 +01:00