Commit Graph

12083 Commits

Author SHA1 Message Date
Guillaume Nodet 0a1117854c
[MNG-8036] [MNG-8017] [MNG-8022] Upgrade JLine to 3.25.1 (#1390) 2024-01-29 16:51:24 +01:00
Tamas Cservenak 2452a6488a
[MNG-8035] Update to Resolver 2.0.0-alpha-7 (#1394)
Update to Resolver 2.0.0-alpha-7, sort out TODO.

This is also one simple change "sneaked in" for RAT, to ignore local `.mvn` that is unrelated to all this, but does not make any harm. In turn, it allows dev local checkout to have various stuff set without
decorating those with headers or fighing RAT plugin.

---

https://issues.apache.org/jira/browse/MNG-8035
2024-01-29 16:27:43 +01:00
Tamas Cservenak 20f7cfc361
[MNG-8026] Maven drives regarding scopes (#1392)
Maven should be fully in control regarding dependency scope definitions and their interpretations (and transformations). 
This PR makes following changes:
* no change in behaviour (all works as before), but
* maven codebase contains now all the code related to scopes
* no resolver code is in use that was deprecated (as it was wrong to have it in resolver), see issue [MRESOLVER-471](https://issues.apache.org/jira/browse/MRESOLVER-471)
* this also stops scope definitions duplication as well, they are now defined in one single project: Maven

---

https://issues.apache.org/jira/browse/MNG-8026
2024-01-25 14:58:24 +01:00
Tamas Cservenak f2595c83d9
[MNG-8023] New method + javadoc on Project (#1387)
Introduce new method that returns POM and project Artifact in sensible manner (so install or deploy and other does not need to figure out anything).

Also, javadoc the class.

---

https://issues.apache.org/jira/browse/MNG-8023
2024-01-23 13:06:56 +01:00
Guillaume Nodet b6a84fcac6
[MNG-8014] Fix multithreaded builder (#1386) 2024-01-22 18:27:48 +01:00
Tamas Cservenak 6afa4770cb
[MNG-8006] [MNG-8021] SPI to contribute properties and more (#1384)
Create _aether internal_ "extenders" components to serve several purposes:
* extender to meddle with exec request, for example to mediate between effective properties SPI (exec request extender)
* extender to meddle with prepped session and related bits, for example to move out deprecated code from session factory (session extender)

This PR implements M4 API SPI for contributing effective properties and exposes method for effective properties on `Session`.
* `Session` should expose properties service "ready" for interpolation, otherwise each interpolating code (plugin, etc) would need to construct the "effective" ones themselves, repeating same steps over and over again.
* SPI can contribute to user properties
* `Session` exposed properties are all immutable (sans effective, that is computed on each call).
* and lastly, a cleanup: all packages within `o.a.m.internal.aether` are now package protected, to tighten internal encapsulation. New core package `o.a.m.resolver` introduced that contains 2 publicly accessible classes.

---

https://issues.apache.org/jira/browse/MNG-8006
https://issues.apache.org/jira/browse/MNG-8021
2024-01-19 12:00:28 +01:00
Tamas Cservenak 3f47580dcc
[MNG-8005] Fix workspace reader drop bug (#1385)
Maven4 seems sets but then drops/overrides some workspace readers. Partially due hazy borders who or what manages them, as role is split between session factory and session factory caller.

Changes:
* session factory does NOTHING re workspace readers, it becomes fully the caller duty
* two spots calling session factory (default maven, extension bootstrap) are now fully in charge to properly setup workspace readers

Co-authored-by: Jonas Rutishauser <jonas.rutishauser@alumni.ethz.ch>

---

https://issues.apache.org/jira/browse/MNG-8005
2024-01-18 12:51:16 +01:00
Guillaume Nodet b44856d0dc
Simplify model builder internal Graph (#1380) 2024-01-15 17:49:26 +01:00
Guillaume Nodet e15170ba0e
[MNG-8014] Workaround for deadlocks in model building (#1376) 2024-01-15 13:14:56 +01:00
Guillaume Nodet 7f70467aa3
[MNG-8016] Simplify ModelCache (#1377)
The `ModelCache` is now bloated and can be simplified a lot.

---

https://issues.apache.org/jira/browse/MNG-8016
2024-01-13 14:02:40 +01:00
Guillaume Nodet 0d046da6f1 [maven-release-plugin] prepare for next development iteration 2024-01-12 10:41:50 +01:00
Guillaume Nodet e627879aed [maven-release-plugin] prepare release maven-4.0.0-alpha-12 2024-01-12 10:41:41 +01:00
Guillaume Nodet 18c0d9aecd [MNG-8003] Fix BOM groupId 2024-01-12 10:40:22 +01:00
Guillaume Nodet 8ce99bdbf2 [maven-release-plugin] prepare for next development iteration 2024-01-12 09:24:56 +01:00
Guillaume Nodet aa7994890b [maven-release-plugin] prepare release maven-4.0.0-alpha-11 2024-01-12 09:24:48 +01:00
Guillaume Nodet 2084b0e499 [MNG-8003] Do not import the BOM within the reactor 2024-01-12 09:09:46 +01:00
Tamas Cservenak a952c9ee10
[MNG-7960] Artifact collection filtering (#1353)
Make Maven more friendly (and tunable) when ranges are being used. There new options are merely affecting range processing, allowing different narrowing strategies. Relies on latest Resolver alpha-6 features.

https://issues.apache.org/jira/browse/MNG-7960
2024-01-11 18:47:28 +01:00
Tamas Cservenak 63a207a0f6
[MNG-8007] Maven TransferListener wrapper (#1371)
A wrapper listener that can receive events even from multiple threads, and passes them to wrapped delegate listener on single thread, keeping delegate implementation simple.

---

https://issues.apache.org/jira/browse/MNG-8007
2024-01-11 18:35:13 +01:00
Tamas Cservenak 5261ba9203
[MNG-7982] Switch to enable transitivity in depMgr used by Maven (#1357)
Resolver 2.0.0-alpha-6 introduced "transitive" switch to dependency Manager, make use of it.

---

https://issues.apache.org/jira/browse/MNG-7982
2024-01-11 17:55:21 +01:00
Guillaume Nodet f1c53cbfdf
[MNG-8003] The Maven BOM should have a cleaner parent (#1374) 2024-01-11 16:12:49 +01:00
huazhongming 6c20e8e85c
[MNG-8000] DefaultArtifact lacks constructors for version and optional (#1368)
Signed-off-by: crazyhzm <crazyhzm@apache.org>
2024-01-11 13:35:01 +01:00
Tamas Cservenak c4ccba7bf9
[MNG-7994] Update to Resolver 2.0.0-alpha-6 (#1373)
Update to alpha-6. Also, move off from deprecated default ctor of def repo session in tests.

---

https://issues.apache.org/jira/browse/MNG-7994
2024-01-11 13:16:51 +01:00
Tamas Cservenak cfa13f5cc7
[MNG-7999] Confine Plexus Container as much as possible (#1367)
This is an ongoing effort to confine Plexus, but also perform a bit of cleanup in Maven Core and around. No logic changes, just replacing Plexus with Lookup (that is a thin wrapper around it), and removing unused members, redundant checks, etc. Module maven-compat omitted on purpose.

---

https://issues.apache.org/jira/browse/MNG-7999
2024-01-10 13:55:54 +01:00
Tamas Cservenak 2c06637fb4
[MNG-8001] Expose CoreRealm internally (#1369)
Expose internally (not for plugin API) CoreRealm.

---

https://issues.apache.org/jira/browse/MNG-8001
2024-01-10 13:53:42 +01:00
Tamas Cservenak 076b346c0c
[MNG-7998] Minor cleanup regarding "tasks" (#1366)
Just a minor cleanup regarding internals of "tasks".

---

https://issues.apache.org/jira/browse/MNG-7998
2024-01-09 21:57:17 +01:00
Guillaume Nodet 33aec13b84
[MNG-7996] Remove experimental flag from build-consumer feature (#1364) 2024-01-09 14:04:57 +01:00
Guillaume Nodet 8460021f02 Remove useless comment which was introduced when wrapper was included 2024-01-09 08:24:07 +01:00
Olivia Lucca Fraser 804cfea8f6
Fixed a copy-paste error in ComparableVersionTest.java (#1363)
Co-authored-by: Olivia Lucca Fraser <lucca@mushussu.local>
2024-01-09 07:39:47 +01:00
Guillaume Nodet 979fc9a5b6
[MNG-7983] Switch to slf4j-api 2 (#1358) 2024-01-09 07:36:58 +01:00
Guillaume Nodet 5baa2f4098
[MNG-7977] Fix reactor reader to not resolve any artifacts from projects being built outside the reactor (#1330) 2024-01-08 11:38:13 +01:00
Guillaume Nodet 782e8679bf
[MNG-7995] Switch to JLine to provide line editing (#1279) 2024-01-08 11:37:09 +01:00
Guillaume Nodet 47fc18faf9
[MNG-7992] Fix windows identified as dos (#1360) 2024-01-08 09:52:00 +01:00
Karl Heinz Marbaise 23d13fb322
[MNG-7989] - Making this build non-interactive, because the environment variable CI equals true. 2023-12-22 19:12:21 +01:00
Tamas Cservenak 437f34f8dc
[MNG-7957] Checksum API (backed by Resolver) (#1359)
Expose checksumming API (backed by Resolver).

---

https://issues.apache.org/jira/browse/MNG-7957
2023-12-21 09:05:10 +01:00
Guillaume Nodet b4e78d7c43
[MNG-7985] Provide project access to modified resources / test-resources and to the executionProject (#1356) 2023-12-21 06:31:27 +01:00
Tamas Cservenak 732e3649e1
[MNG-7980] CLI switch to ignore transitive repositories. (#1354)
If set, Maven will ignore all remote repositories introduced by
transitive dependencies POM.

---

https://issues.apache.org/jira/browse/MNG-7980
2023-12-20 14:03:57 +01:00
Tamas Cservenak 00d243a92e
[MNG-7978] Decouple maven-artifact from maven-resolver-provider (#1352)
As it is actually not needed. This also "pulls in" all of VersionParser into model version parser, so Core implementation now 100% just delegates over there.

---

https://issues.apache.org/jira/browse/MNG-7978
2023-12-20 14:03:35 +01:00
Tamas Cservenak a381970609
[MNG-7969][MNG-7981] Add missing information on Maven 4 version api to fix an exception (#1355)
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2023-12-19 20:08:55 +01:00
Guillaume Nodet fe71f7d8aa [maven-release-plugin] prepare for next development iteration 2023-12-18 17:27:24 +01:00
Guillaume Nodet 89d3c0321d [maven-release-plugin] prepare release maven-4.0.0-alpha-10 2023-12-18 17:27:16 +01:00
Guillaume Nodet e6cd7b1ac4 Break dependency cycle 2023-12-18 17:25:17 +01:00
Tamas Cservenak ad5e085ebe
[MNG-7959] User controlled rewrite (#1351)
Extra handling if redirection happens within same GAV.

---

https://issues.apache.org/jira/browse/MNG-7959
2023-12-18 16:31:24 +01:00
Tamas Cservenak 9596255cbf
[MNG-7959] User controlled relocations Addendum (#1350)
Name the things.

---

https://issues.apache.org/jira/browse/MNG-7959
2023-12-18 13:26:49 +01:00
Tamas Cservenak 57effdd16e
[MNG-7959] User controlled relocations Addendum (#1349)
The "ban" was unfinished and wrong: what is actually needed is
to have exception with proper explanation instead.

---

https://issues.apache.org/jira/browse/MNG-7959
2023-12-18 13:01:04 +01:00
Tamas Cservenak 8001c30b69
[MNG-7974] Upgrade to Resolver 2.0.0-alpha-5 Addendum (#1348)
There was a TODO in code that I missed.

---

https://issues.apache.org/jira/browse/MNG-7974
2023-12-18 13:00:26 +01:00
Tamas Cservenak a1fdd89745
[MNG-7974] Update Resolver 2.0.0-alpha-5 (#1337)
Update to Resolver alpha-5 and apply some cleanups.

Notable changes:
* update resolver to 2.0.0-alpha-5
* detach model-builder from maven-artifact (this is important)
* introduce model builder own VersionParser iface (implemented in resolver-provider)
* API VersionParser implementation reuses VersionParser from resolver-provider to implement the service
* various other cleanups, removal of old plexus, etc

---

https://issues.apache.org/jira/browse/MNG-7974
2023-12-18 12:03:17 +01:00
Tamas Cservenak e34afc897a
[MNG-7959] User controlled relocations (#1339)
With some improvements. It accepts user property with CSV entries for relocations.

To toy with it, use `-Dmaven.relocations.entries` user property, for example create `.mvn/maven.config` file with contents:
```
-Dmaven.relocations.entries=entry1,entry2,...
```
It accepts CSV (comma delimited) of entries, while entry form is as:
```
GAV>GAV
```
Where left GAV can contain `*` for any elem (so `*:*:*` would mean ALL, something you don't want). Right GAV is either fully specified, or also can contain `*`, then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact. Finally, if right hand GAV is absent (line looks like "GAV>"). the left hand matching GAV is banned fully (from resolving).

Note: the ">" means project level, while ">>" means global (whole session level, so even plugins will get relocated artifacts) relocation.

Examples:
```
-Dmaven.relocations.entries=org.foo:*:*>,org.here:*:*>org.there:*:*,javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5
```

Meaning: 3 entries, ban `org.foo` group (exactly, so `org.foo.bar` is allowed), relocate `org.here` to `org.there` and finally **globally relocate** (see ">>") `javax.inject:javax.inject:1` to `jakarta.inject:jakarta.inject:1.0.5`

---

https://issues.apache.org/jira/browse/MNG-7959
2023-12-18 11:34:30 +01:00
Tamas Cservenak 6e192fbb54
[MNG-7972] Artifact coordinate out of "standard string" (#1347)
Expose ArtifactCoordinate creation out of standard string.

---

https://issues.apache.org/jira/browse/MNG-7972
2023-12-18 11:30:20 +01:00
Tamas Cservenak 84a48a8bf2
[MNG-7968] Expose Maven Version as Version (not String) (#1346)
Change existing API to expose Version instead of String.

---

https://issues.apache.org/jira/browse/MNG-7968
2023-12-18 10:56:08 +01:00
dependabot[bot] ab09661c64
[MNG-7975] Bump ch.qos.logback:logback-classic from 1.2.11 to 1.2.13 (#1331)
Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.2.11 to 1.2.13.
- [Commits](https://github.com/qos-ch/logback/compare/v_1.2.11...v_1.2.13)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
...

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-7975
2023-12-17 18:46:41 +01:00