Commit Graph

15197 Commits

Author SHA1 Message Date
Martin Desruisseaux 023b014938
[MNG-8395] Add a <Source> element in the model. (#1936)
* 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>.
2025-01-26 15:11:52 +01:00
Jermaine Hua dda614de4c
[MNG-8524] DefaultInterpolator should be used by injection (#2049)
Signed-off-by: crazyhzm <crazyhzm@apache.org>
2025-01-25 20:25:27 +08:00
Guillaume Nodet 8134aa24b1
[MNG-8508] Move content of maven-impl to the org.apache.maven.impl package (#2060) 2025-01-24 18:29:44 +01:00
Guillaume Nodet ab4149fa22
[MNG-8520] Add cache for model resolution during project building (#2047) 2025-01-23 10:16:26 +01:00
Jermaine Hua e9805bb1a8
[MNG-8512] Fix org.slf4j.simpleLogger.defaultLogLevel Configuration conflict (#2042)
Signed-off-by: crazyhzm <crazyhzm@apache.org>
2025-01-22 22:39:19 +08:00
Elliotte Rusty Harold 99f2b645da
[MNGSITE-393] Remove references to Maven 2.x (#2024) 2025-01-22 11:03:29 +00:00
Guillaume Nodet e33e900469
[MNG-6113] Restore 'Maven Central Repository' name (lost with #1139) (#2054) 2025-01-22 08:44:50 +01:00
dependabot[bot] ee8b8187b8
[MNG-8529] Bump net.bytebuddy:byte-buddy from 1.15.11 to 1.16.1 (#2052)
Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.15.11 to 1.16.1.
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.15.11...byte-buddy-1.16.1)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---

https://issues.apache.org/jira/browse/MNG-8529
2025-01-20 10:46:39 +01:00
dependabot[bot] d7e5f75bf6
[MNG-8528] Bump org.assertj:assertj-core from 3.27.2 to 3.27.3 (#2053)
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.27.2 to 3.27.3.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.2...assertj-build-3.27.3)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---

https://issues.apache.org/jira/browse/MNG-8528
2025-01-20 10:45:43 +01:00
Guillaume Nodet 8a9c244a98
[MNG-8522] Deprecate maven-builder-support artifact and its classes (#2043) 2025-01-15 19:51:29 +01:00
Guillaume Nodet aeec37f8e7
[MNG-8478] Fix formatting of timestamp in logger (#2046) 2025-01-15 07:28:29 +01:00
Guillaume Nodet 81b7565c20 [MNG-8484] Use List.copyOf to make a defensive immutable copy of the input collection 2025-01-13 20:22:00 +01:00
Guillaume Nodet f5a407cf79 [MNG-8515] Use specialized methods
* UnaryOperator<String> instead of Function<String, String>
* BinaryOperator<String> instead of BiFunction<String, String, String>
2025-01-13 17:14:35 +01:00
Guillaume Nodet 8af006a931 [MNG-8515] Replace plexus interpolator with the new interpolator service 2025-01-13 17:14:35 +01:00
Guillaume Nodet 82f159adb9
[MNG-8510] Remove Utils class from maven-di (#2040) 2025-01-13 16:38:27 +01:00
Guillaume Nodet 28f6047464
[MNG-8514] Improve VersionRangeResolverResult (#2039) 2025-01-13 15:49:18 +01:00
Guillaume Nodet d4be73bb1e
[MNG-8513] Be stricter about xml combination modes (#2038) 2025-01-13 08:11:18 +01:00
stellar 0a588ea174
[MNG-8493] 'serialVersionUID' can be annotated with '@Serial' annotation (#2034) 2025-01-10 18:34:05 +01:00
Elliotte Rusty Harold 03cca08d8d
[MNG-8483] Prefer Objects.requireNonNull (#2019)
* Prefer Objects.requireNonNull
2025-01-10 17:14:24 +00:00
dependabot[bot] 529b78ebda
[MNG-8506] Bump com.github.siom79.japicmp:japicmp-maven-plugin (#2035)
Bumps [com.github.siom79.japicmp:japicmp-maven-plugin](https://github.com/siom79/japicmp) from 0.23.0 to 0.23.1.
- [Release notes](https://github.com/siom79/japicmp/releases)
- [Changelog](https://github.com/siom79/japicmp/blob/master/release.py)
- [Commits](https://github.com/siom79/japicmp/compare/japicmp-base-0.23.0...japicmp-base-0.23.1)

---
updated-dependencies:
- dependency-name: com.github.siom79.japicmp:japicmp-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---

https://issues.apache.org/jira/browse/MNG-8506
2025-01-10 10:22:06 +01:00
Nils Breunese a1f4955dda
[MNG-8482] Use instanceof assignments to get rid of casting expressions (#2018)
Co-authored-by: Nils Breunese <nbreunese@bol.com>
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2025-01-10 09:42:00 +01:00
Guillaume Nodet 5cef91e402
[MNG-8494] Restore Maven 3 compatibility (#2031) 2025-01-10 08:09:12 +01:00
Tamas Cservenak 71c662fa4c
[MNG-8473] Site fixes (#2010)
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
2025-01-08 23:14:18 +01:00
Jermaine Hua 7546361a0d
[MNG-8475] In the loop scenario, StringBuilder is used instead of concatenation (#2014)
Signed-off-by: crazyhzm <crazyhzm@apache.org>

---

https://issues.apache.org/jira/browse/MNG-8475
2025-01-08 18:20:28 +01:00
Tamas Cservenak 209cd7fbe4
[MNG-8502] Embedded executor should obey MAVEN_ARGS env variable (#2032)
Salvaged from the "split repo for ITs" experiment. The experiment failed but this improvement is good to have, as makes the embedded executor behave more closely like forked executor.

Embedded so far did not obey MAVEN_ARGS env variable while forked did.

---

https://issues.apache.org/jira/browse/MNG-8502
2025-01-08 17:01:07 +01:00
Elliotte Rusty Harold 99452bb868
Fix comparisons against null in PathSource.equals (#2026)
* Fix comparisons against null
2025-01-08 15:51:49 +00:00
Elliotte Rusty Harold b99eac7246
Copy edits in comments, API doc, and messages (#2020)
* Copy edits
2025-01-07 12:02:00 +00:00
Tamas Cservenak a2ee8f8bc2 Fix for HelperImplTest
The UT runs for 60 sec that is unacceptable. This fix
returns its runtime to 10+ sec.
2025-01-07 12:34:28 +01:00
dependabot[bot] 43e25b5e89
[MNG-8499] Bump mockitoVersion from 5.14.2 to 5.15.2 (#2017)
Bumps `mockitoVersion` from 5.14.2 to 5.15.2.

Updates `org.mockito:mockito-bom` from 5.14.2 to 5.15.2
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.14.2...v5.15.2)

Updates `org.mockito:mockito-junit-jupiter` from 5.14.2 to 5.15.2
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.14.2...v5.15.2)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-bom
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---

https://issues.apache.org/jira/browse/MNG-8499
2025-01-07 11:42:35 +01:00
Scott Kurz 900839135d
[MNG-8479] Use 'ejb' not 'ejb3' as type in ReactorReader artifact resolution for compile phase (#2016)
Use 'ejb' not 'ejb3' as type in ReactorReader artifact resolution for compile phase

Signed-off-by: Scott Kurz <skurz@us.ibm.com>

---

https://issues.apache.org/jira/browse/MNG-8479
2025-01-07 11:19:29 +01:00
dependabot[bot] e78a3cdaa6
[MNG-8498] Bump org.assertj:assertj-core from 3.27.0 to 3.27.2 (#2027)
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.27.0 to 3.27.2.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.0...assertj-build-3.27.2)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---

https://issues.apache.org/jira/browse/MNG-8498
2025-01-07 11:15:24 +01:00
dependabot[bot] 0ac67e00f7
[MNG-8497] Bump ch.qos.logback:logback-classic from 1.5.15 to 1.5.16 (#2028)
Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.5.15 to 1.5.16.
- [Commits](https://github.com/qos-ch/logback/compare/v_1.5.15...v_1.5.16)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---

https://issues.apache.org/jira/browse/MNG-8497
2025-01-07 11:14:22 +01:00
Tamas Cservenak 0176ffb825
[MNG-8487] Completely isolate UTs (#2021)
UTs were using real user home, and in case user had user-wide extensions.xml, it resulted in failure. Goal: make sure all UTs are properly protected and isolated from user env, by providing "fake" user home (to not have user-wide extensions in real user home affect test outcome).

---

https://issues.apache.org/jira/browse/MNG-8487
2025-01-06 11:32:18 +01:00
Konrad Windszus 0b7235c094
Clarify that packaging is never inherited 2025-01-03 09:42:52 +01:00
Tamas Cservenak 1f157ad601
[MNG-8469] Fix interpolation precedence order (#2011)
Restore precedence as it was in Maven3:
- basedir
- buildTime
- prefixed model
- user props
- model props
- system props
- env
- prefixless model

---

https://issues.apache.org/jira/browse/MNG-8469
2024-12-28 14:34:58 +01:00
Tamas Cservenak 677e3b01bb
[MNG-8461] Integrate reproducer as IT (#2009)
Integrate the reproducer into ITs.

---

https://issues.apache.org/jira/browse/MNG-8461
2024-12-28 14:27:01 +01:00
dependabot[bot] ee5741d8cd
[MNG-8468] Bump ch.qos.logback:logback-classic from 1.5.14 to 1.5.15 (#2008)
Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.5.14 to 1.5.15.
- [Commits](https://github.com/qos-ch/logback/compare/v_1.5.14...v_1.5.15)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---

https://issues.apache.org/jira/browse/MNG-8468
2024-12-23 12:30:09 +01:00
Guillaume Nodet 98dedaf0e3
[MNG-8465] Add support for project.rootDirectory in repositories and fix other expressions (#2007)
Valid expressions in repositories are:
* ${project.basedir}
* ${project.basedir.uri}
* ${project.rootDirectory}
* ${project.rootDirectory.uri}
2024-12-22 17:42:34 +01:00
Tamas Cservenak bebc3d4a2e
[MNG-8461] Initial settings method must restore context state (#2004)
Effective settings are (should be) created twice, once for "early boot" of Plexus when extensions are loaded up, and then again when Maven "boots".

Bug was that early call "corrupted" (inited settings) in context causing that 2nd required call (due spy) was omitted. This resulted in lack of settings related spy events firing (as we do have IT for spy but it does not test settings events).

---

https://issues.apache.org/jira/browse/MNG-8461
Related: https://github.com/alextu/maven4-reproducer/issues/1
2024-12-22 14:43:47 +01:00
Tamas Cservenak 751d3f18c9
[MNG-8463] Update plugins (#2005)
All the plugins referenced by Maven Core.

---

https://issues.apache.org/jira/browse/MNG-8463
2024-12-22 13:24:35 +01:00
Tamas Cservenak 80107b05d8
[MNG-8460] Implement flush() (#2006)
LoggingOutputStream used by default as sysout and syserr
were NOT flushing (def method is empty), and flush happened
only when EOL was printed.

Still, prompts and help:evaluate does print out unterminated
strings.

---

https://issues.apache.org/jira/browse/MNG-8460
2024-12-22 13:24:10 +01:00
Tamas Cservenak 575ad3719c
[MNG-8454] Force the FileSizeFormat UT to US Locale (#2003)
As it uses now String.format that produces different
decimal separator based on local, most notable DE

---

https://issues.apache.org/jira/browse/MNG-8454
2024-12-20 12:28:29 +01:00
dependabot[bot] 5f19dae0ce
[MNG-8458] Bump org.assertj:assertj-core from 3.26.3 to 3.27.0 (#2002)
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.26.3 to 3.27.0.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.26.3...assertj-build-3.27.0)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---

https://issues.apache.org/jira/browse/MNG-8458
2024-12-20 12:25:24 +01:00
dependabot[bot] 83dd275fff
[MNG-8457] Bump ch.qos.logback:logback-classic from 1.5.13 to 1.5.14 (#2001)
Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.5.13 to 1.5.14.
- [Commits](https://github.com/qos-ch/logback/compare/v_1.5.13...v_1.5.14)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---

https://issues.apache.org/jira/browse/MNG-8457
2024-12-20 12:24:29 +01:00
Tamas Cservenak 0222aff6c9
[MNG-8447] Lossy ProblemCollector (#1994)
Historically (from Maven3) "problem collection" (in various scenarios, like building effective settings and toolchains, to building models) were done by passing around `List<Problem>` structure. This proved quite ineffective, as in case of (really) huge projects with quite big count of problems reported choked Maven (but also produced unusable output). We are aware of projects producing 3 million warnings! Dumping all of them onto console/log makes really no sense.

This PR changes Maven that by default it reports "problems" (settings building, toolchains building, or model building) as one liner warnings: how much and where were problems collected. This produces much more less overwhelming output than happens on master. User can control "build errors" using `-e`, so `mvn -e` will dump errors on screen/log.

The new `org.apache.maven.api.services.ProblemCollector<P>` class, that is somewhat "drop in" replacement for `List`, but with huge difference: it is "lossy", in a way, it maintains counters precisely, but actual problem instances are simply dropped after threshold `maven.builder.maxProblems` is surpassed (default 100). See `org.apache.maven.api.Constants#MAVEN_BUILDER_MAX_PROBLEMS`.

Rules:
* on problem addition counters are always updated
* if below threshold, store the problem (and will be reported later to the user)
* if above threshold, try to drop one problem with severity lower than currently reported problem, if succeeded, store the current problem, otherwise drop it

---

https://issues.apache.org/jira/browse/MNG-8447
2024-12-19 15:50:21 +01:00
dependabot[bot] 5599934016
[MNG-8452] Bump ch.qos.logback:logback-classic from 1.5.12 to 1.5.13 (#1999)
Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.5.12 to 1.5.13.
- [Commits](https://github.com/qos-ch/logback/commits)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---

https://issues.apache.org/jira/browse/MNG-8452
2024-12-19 15:49:35 +01:00
dependabot[bot] 6c2adf7ecc
[MNG-8448] Bump com.google.guava:guava from 33.3.1-jre to 33.4.0-jre (#1995)
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.3.1-jre to 33.4.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---

https://issues.apache.org/jira/browse/MNG-8448
2024-12-18 10:36:54 +01:00
Guillaume Nodet 8a69678007
[MNG-8446] Project cannot start due to too many warnings (#1993)
JIRA issue: [MNG-8446](https://issues.apache.org/jira/browse/MNG-8446)

This will help (but is not sufficient) to make [camel-quarkus](https://github.com/apache/camel-quarkus) buildable with maven 4.x.

---

https://issues.apache.org/jira/browse/MNG-8446
2024-12-17 18:44:55 +01:00
Guillaume Nodet a68b52fcba
[MNG-8444] Exclude maven-xml and maven-xml-impl (the artifact has been renamed) (#1992)
Exclude the transitives.

---

https://issues.apache.org/jira/browse/MNG-8444
2024-12-17 11:30:28 +01:00
Guillaume Nodet 698614e3cc
[MNG-8436] Fix wrong transfer rates displayed in console (#1985)
```
Downloaded from central: https://repo.maven.apache.org/maven2/org/graalvm/compiler/compiler/24.1.1/compiler-24.1.1.pom (1.7 kB at 9223372036854775807 GB/s)
```

---

https://issues.apache.org/jira/browse/MNG-8436
2024-12-17 10:57:01 +01:00