Commit Graph

102 Commits

Author SHA1 Message Date
Guillaume Nodet d075fe7e85 [MNG-8084] New model builder and resolver provider 2024-04-12 12:50:18 +02:00
Tamas Cservenak 34863e6345
[MNG-8091] Update Resolver to 2.0.0-alpha-10 (#1460) 2024-04-04 11:51:19 +02:00
Tamas Cservenak c16f45d858
[MNG-8089] Introduce fat-JAR types (#1459)
These are dependency types to be used when dependency is "self contained", or is wanted be used as such: handle if like it has no dependencies, if any.

---

https://issues.apache.org/jira/browse/MNG-8089
2024-03-29 10:32:19 +01:00
Tamas Cservenak 2594047014
[MNG-8088] Using Resolver with MRESOLVER-512 (#1442)
This makes all the new scopes implemented out of the box, but MNG-8041 still stands (is unsolved).

Related PR https://github.com/apache/maven-resolver/pull/445

---

https://issues.apache.org/jira/browse/MRESOLVER-512
https://issues.apache.org/jira/browse/MNG-8088
2024-03-27 15:46:12 +01:00
Guillaume Nodet 9780ca1baf
[MNG-8015] Control the type of path where each dependency can be placed (#1401)
Co-authored-by: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
2024-03-01 18:18:13 +01:00
huazhongming 83949a7384
Use isEmpty instead of length (#1420)
Signed-off-by: crazyhzm <crazyhzm@apache.org>
2024-02-28 15:40:37 +08:00
Tamas Cservenak cf438ca624
[MNG-8059] Paths everywhere (#1413)
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
2024-02-26 18:04:44 +01:00
Hervé Boutemy 54c1b2f28a [MNG-8029] improve documentation about mirror settings 2024-02-17 19:40:11 +01:00
Tamas Cservenak 7b60c8d7dc
[MNG-8054] Ability to force build number (#1414)
For snapshot deploys

---

https://issues.apache.org/jira/browse/MNG-8054
2024-02-16 12:43:34 +01:00
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
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
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 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 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
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 124033bc04
[MNG-7548] Kill off "legacy" repository metadata support (#1138) 2023-06-05 10:45:36 +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 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
Hervé Boutemy fbdf109b34
[MNG-7571] add Maven API javadoc (#830) 2022-12-31 17:32:07 +01:00
Guillaume Nodet 8150c62749 [MNG-7650] Reformat 2022-12-26 16:12:32 +01:00
Michael Osipov 968c1a25f5 [MNG-7634] Revert MNG-5982 and MNG-7417
This closes #916
2022-12-20 09:10:10 +01:00
Guillaume Nodet de19cfcd2b [MNG-7601] Reformat sources 2022-11-22 14:26:01 +01:00
Konrad Windszus 431e2b3eec
[MNG-7561] never resolve version ranges with same lower and upper bound (#823)
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2022-11-07 17:03:59 +01:00
Michael Osipov 9c60138915 [MNG-7556] Clean up notion between user properties and system properties
This closes #810
2022-10-29 20:44:15 +02:00
Tamas Cservenak 3bc2cf6a7a
[MNG-7547] Simpler G level metadata generation (#806) 2022-10-11 14:11:17 +02:00
Guillaume Nodet 2a9f39336c
[MNG-7553] New clean API with immutable model (#703) 2022-10-02 10:41:25 +02:00
Henning Schmiedehausen e410a6ce1d
MNG-7529 alternate fix (#795)
[MNG-7529] Maven resolver makes bad repository choices

Structure the version checks slightly different to make the separation
between repository versions and the version range resolution clearer.
2022-08-31 09:47:00 -07:00
Henning Schmiedehausen ce4579108d
[MNG-7529] Maven resolver makes bad repository choices (#786)
Ensure that any versions resolved as part of a version range request
only reference repositories that are actually enabled for the type of
version (SNAPSHOT versions against snapshot repos, release versions
against release repositories).
2022-08-24 21:26:19 -07:00
Guillaume Nodet b3d5c12c7a
[master][MNG-7350] Introduce a factory for ModelCache (#629)
* [MNG-7350] Introduce a factory for ModelCache
* [MNG-7350] Introduce a factory for ModelCache
Fix missing javadoc and binding
2022-03-09 13:29:51 +01:00
Sylwester Lachiewicz 69d6c6d5a2 [MNG-7417] Several classes do not set properties properly for building requests
This closes #306
2022-02-20 19:17:47 +01:00