Commit Graph

153 Commits

Author SHA1 Message Date
Tamas Cservenak 76794c0237
[MNG-8043] Dependency properties should be provided by Maven (#1399)
Followup of MRESOLVER-484:
* move off deprecated resolver bits
* introduce non-deprecated replacements
* move existing to code to those new bits

---

https://issues.apache.org/jira/browse/MNG-8043
2024-02-07 10:51:56 +01:00
Tamas Cservenak 3f9fec2307
[MNG-8026] Maven drives regarding scopes (#1391)
Changes:
* new types for build path, path scope, dependency scope, language
* introduce "extensible enum" and provides registries, SPI providers, etc...
---------
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2024-02-05 10:42:51 +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
Guillaume Nodet b6a84fcac6
[MNG-8014] Fix multithreaded builder (#1386) 2024-01-22 18:27:48 +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 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
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 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
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 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 eee9514d3d
[MNG-7963] Clean up the build (#1340)
* [MNG-7963] Clean up the build

Changes:
* remove hamcrest 1.3 from scope
* set proc:none to prevent warnings (Sisu APT is on classpath),
  we do not use annotation processing, we produce Sisu index
  explicitly.
* remove some redundant elements from POMs
2023-12-13 23:19:20 +01:00
Guillaume Nodet bdafe22f01 [maven-release-plugin] prepare for next development iteration 2023-12-08 16:05:14 +01:00
Guillaume Nodet 8c116306b6 [maven-release-plugin] prepare release maven-4.0.0-alpha-9 2023-12-08 16:04:57 +01:00
Tamas Cservenak 2411c81a9b
Preparations for resolver alpha-3 (#1328)
Updates Maven to Resolver 2.0.0-alpha-3, that is mostly about renames and config changes. 

Related changes for ITs are here: https://github.com/apache/maven-integration-testing/pull/322

---

https://issues.apache.org/jira/browse/MNG-7946
https://issues.apache.org/jira/browse/MNG-7948
2023-12-06 15:08:35 +01:00
Tamas Cservenak eee037e676
[MNG-7924] Better control over and better integration with Resolver (#1299)
Integrate better and obtain better control over Resolver. These changes did stem from "JPMS module experiment" and are considered improvement but does not implement any functionality related to JPMS module support.

Changes:
* Maven4 should stop "disconnected coexistence" of two type systems (ArtifactHandlers and Resolver ArtifactTypeRegistry), it should unify them.
* Maven4 Core should provide generic and extensible means to introduce new artifact types (fully in extension, and extension should get extended data via "roundtrip" in core/resolver)

---

https://issues.apache.org/jira/browse/MNG-7924
2023-11-27 20:18:14 +01:00
Tamas Cservenak e89b6fd53f
[MNG-7653] Integrate Resolver 2.x onSessionClose (#1301)
Implement onSessionClose and "resolver 2.x way for sessions"...

As digging happens in same area, some other "resolver configuration" issues resolved as well.

Important: contains a "hack" to fix issue in alpha-2, that is marked with TODO to remove once alpha-3+ used.

---

https://issues.apache.org/jira/browse/MNG-7653
https://issues.apache.org/jira/browse/MNG-7935
https://issues.apache.org/jira/browse/MNG-7936
2023-11-21 12:04:01 +01:00
Tamas Cservenak e6d1b4c5de
[MNG-7909] Upgrade to Resolver 2.0.0-alpha-1 (#1282)
Upgrade to Resolver 2.0.0.

Changes:
* many UT code used `new DefaultRepositorySystem()` ctor that is gone (was present due SL only), replaced with mocks
* dropped MavenResolverModule Guice module (as AetherGuice module is gone as well)
* updated Resolver version to 2.0.0-alpha-1
* added jdk transport (that prevails apache on Java 11)
* rename of "native" into "apache", deprecate "native" name
* introduce "jdk" transport

---

https://issues.apache.org/jira/browse/MNG-7909
2023-11-07 16:06:40 +01:00
Guillaume Nodet 54ca01c779 [MNG-7615] Use lambas to access ModelCache 2023-11-07 09:20:52 +01:00
Guillaume Nodet 3fc399318e [maven-release-plugin] prepare for next development iteration 2023-10-20 21:20:23 +02:00
Guillaume Nodet a2cbf4873a [maven-release-plugin] prepare release maven-4.0.0-alpha-8 2023-10-20 21:20:23 +02:00
Guillaume Nodet 10487d7b5d
[MNG-7820] Get rid of plexus-utils (#1255) 2023-09-22 10:59:31 +02:00
Guillaume Nodet 34b0591f03
[MNG-7820] Remove dependency on plexus-utils StringUtils / FileUtils (#1243)
Co-authored-by: crazyhzm <crazyhzm@apache.org>
2023-09-14 13:48:15 +02:00
Tamas Cservenak 0ea8879eea [MNG-7874] Use name constants instead of free string literals (#1229)
Maven Resolver Provider: get rid of name free string literals.

Forward port of bbd84c6c87

---

https://issues.apache.org/jira/browse/MNG-7874
2023-09-08 16:15:43 +02:00
Guillaume Nodet 0b3246381d
Remove useless @author tags (#1226)
This information is usually more accurately given by the GIT history
2023-09-06 10:39:32 +02:00
Guillaume Nodet 06938249a7
[MNG-7792] Use a standalone asm version (#1126) 2023-09-05 23:09:03 +02:00
Tamas Cservenak 60781caa06 Fix javadoc issues. 2023-09-05 22:43:13 +02:00
Tamas Cservenak 9dd7b01a89 [MNG-7856] Maven Resolver Provider ctor and other minor code changes (#1223)
Maven Resolver Provider gets similar change as other Resolver components had in MRESOLVER-386.

Also, some minor code updates like adding Override and other cosmetic stuff.

Forward port of 1ac8be50c8

---

https://issues.apache.org/jira/browse/MNG-7856
2023-09-05 21:50:10 +02:00
Guillaume Nodet e39142b77a
[MNG-7830] Switch from plexus-xml to stax / woodstox (#1185) 2023-06-29 12:03:50 +02:00
Guillaume Nodet 5b540821f2 [maven-release-plugin] prepare for next development iteration 2023-06-24 10:52:55 +02:00
Guillaume Nodet bf699a388c [maven-release-plugin] prepare release maven-4.0.0-alpha-7 2023-06-24 10:52:47 +02:00
Guillaume Nodet a279289bc3 [maven-release-plugin] prepare for next development iteration 2023-06-23 15:08:35 +02:00
Guillaume Nodet a3f0f12fab [maven-release-plugin] prepare release maven-4.0.0-alpha-6 2023-06-23 15:08:27 +02:00
Guillaume Nodet 124033bc04
[MNG-7548] Kill off "legacy" repository metadata support (#1138) 2023-06-05 10:45:36 +02:00
Guillaume Nodet e08c95a673
[MNG-7655] Switch to plexus-utils / plexus-xml 4 (#1093) 2023-06-04 21:03:41 +02:00
Karl Heinz Marbaise c49c4e0b18
[MNG-7451] - Remove public modifier from test methods / test classes 2023-04-15 19:24:20 +02: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 10128b4484
Remove references to Xpp3DomBuilder and use XmlNodeBuilder instead (#1045) 2023-03-09 16:26:58 +01: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
Andrey Bruykhov 6e25a2674b [MNG-7686] Speed up by replacing non-pattern #replaceAll() with #replace() or precompiled patterns
This closes #984
2023-02-07 21:55:12 +01:00