Commit Graph

12044 Commits

Author SHA1 Message Date
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
Guillaume Nodet eec44b4ace
[MNG-7971] Add Artifact#getBaseVersion (#1345) 2023-12-15 16:48:33 +01:00
Michael Bien 3c65873b58
[MNG-7970] Remove extra space in MavenSimpleLogger stack trace formatter (#1342)
Regular formatted stack traces do not have a space before the file/line
section.

before:
at java.util.zip.ZipFile$Source.get (ZipFile.java:1426)

after:
at java.util.zip.ZipFile$Source.get(ZipFile.java:1426)
2023-12-15 07:39:42 +01:00
Guillaume Nodet 2cccc0a476
[MNG-7966] Augment api to provide a Map<Dependency, Path> in the resolution result (#1343) 2023-12-15 07:34:19 +01:00
Guillaume Nodet d9a49e6ff7
[MNG-7965] Fix duplicate tags not rejected (#1344) 2023-12-15 07:33:11 +01:00
Tamas Cservenak a1fe9fc387
[MNG-7962] Return language to Type (#1341)
Returns the language property to Type

---

https://issues.apache.org/jira/browse/MNG-7962
2023-12-14 11:51:16 +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
Tamas Cservenak 9cd232fc78
Up japicmp baseline (#1338)
From 3.8.7 to 3.8.8, but these two minors have binary incompatibilities (in ctor), so ignores updated as well.

---

https://issues.apache.org/jira/browse/MNG-7961
2023-12-13 16:20:22 +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
Guillaume Nodet f2803ab5b7 Fix javadoc generation 2023-12-08 15:22:25 +01:00
Guillaume Nodet 2f91c7e9c6
Version resolver API (#1335) 2023-12-08 10:10:49 +01:00
Guillaume Nodet bd849b54ad
Dependency collection / resolution API (#1333) 2023-12-08 09:42:44 +01:00
Guillaume Nodet 71eb6de7e5
Better internal helper methods (#1334) 2023-12-07 21:05:02 +01:00
Tamas Cservenak c4f62ff7c8
[MNG-7953] Classpath ordering delegated to Resolver (#1332)
Remove all ordering from Maven and delegate it to Resolver.

Supersedes https://github.com/apache/maven/pull/1212

This PR makes Maven completely rely on Resolver to order artifacts on classpath (before this PR it was several spots where explicit ordering was applied without ability to affect it). This PR makes now Maven completely rely on Resolver, never "sort" artifacts on it's own, but use resolver result, that in turn depends on session config.

Example invocation:
```
$ mvn -X package -Daether.system.dependencyVisitor=levelOrder
```

Would make Maven use "levelOrder".

Example of default (preOrder, as before) and new levelOlder (new in 2.0): notice how tree is same, but resulting artifact list (and hence, order on classpath) is different:
https://gist.github.com/cstamas/c88ca550006e53edad5b16973b54c349

The new resolver configuration is documented here:
https://maven.apache.org/resolver-archives/resolver-2.0.0-alpha-3/configuration.html
(property No 62)

---

https://issues.apache.org/jira/browse/MNG-7953
2023-12-07 16:07:51 +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
huazhongming 4af662f7b3
[MNG-7920] Fix usage of packaging BOM fails in maven-install-plugin (#1305)
Signed-off-by: crazyhzm <crazyhzm@apache.org>
2023-12-05 10:23:26 +01:00
Guillaume Nodet 23bca281fc
[MNG-7947] Plugin API (#1309)
* Add an InternalSession interface to avoid casting to the implementation in various places
* Upgrade to Guice 6.0.0 and add support for jakarta.inject annotations
* Maven 4 Plugin API
2023-12-05 09:11:33 +01:00
Tamas Cservenak 63927175d9 Update DOAP w/ Maven 3.9.6 release 2023-12-01 12:47:44 +01:00
Guillaume Nodet 69bc993b80
[MNG-7945] Fix profile settings being injected into consumer POM (#1323) 2023-11-28 18:17:10 +01:00
huazhongming 3927ca1843
[MNG-7919] Change the log of unable to find the root directory to info (#1325)
Signed-off-by: crazyhzm <crazyhzm@apache.org>
2023-11-28 00:13:26 +01:00
Guillaume Nodet 05fcf5b2d3
[MNG-6036] Add namespace to XmlNode (#1318) 2023-11-28 00:11:34 +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
Guillaume Nodet 143af9b085
Fix not closed ForkJoinPools (#1319) 2023-11-20 13:44:59 +01:00
Guillaume Nodet 3c68106b7b
improve exception docs (#1316)
Co-authored-by: Elliotte Rusty Harold <elharo@ibiblio.org>
2023-11-20 07:44:19 +01:00
Slawomir Jaranowski 644a15c323 [MNG-7939] Allow to exclude plugins from validation 2023-11-19 22:11:13 +01:00
Slawomir Jaranowski 1a61b80dee
Improve build on s390 (#1313)
* Use JDK 11 as default for s390 builds
* Checkout the same branch name for ITs as for build
2023-11-19 16:46:24 +01:00
Slawomir Jaranowski 9d65e2b240
Use JDK 11 as default for s390 builds 2023-11-19 10:58:31 +01:00
Karl Heinz Marbaise b08b62f8de
[MNG-7940] - Maven embedder CLI output contains nulls. 2023-11-18 14:15:19 +01:00
Slawomir Jaranowski ba8cbd9685
[MNG-7932] - Upgrade maven-parent to v41 in maven-bom 2023-11-17 22:35:36 +01:00
Guillaume Nodet 29e239000b
Add some love to the API (#1310) 2023-11-17 16:52:15 +01:00
Guillaume Nodet 518b988a09
Remove reference to plexus XmlStreamReader (#1308) 2023-11-17 16:51:47 +01:00
Guillaume Nodet f92fdb86c2
Fix XML parsing problem with empty namespace (#1307) 2023-11-17 16:51:28 +01:00
Guillaume Nodet 3cebbf7a15
Remove usage of old StringTokenizer (#1306) 2023-11-17 16:50:51 +01:00
Guillaume Nodet d62113772e
Clean up dependencies versions (#1300) 2023-11-17 16:31:11 +01:00
Karl Heinz Marbaise a68443f4e9
[MNG-7932] - Upgrade maven-parent to v41 2023-11-13 20:47:38 +01:00
Karl Heinz Marbaise c613d7ab4b
Upgrade Build Requirements
+ Minimum JDK11
 + Minimum Maven 3.6.3
2023-11-13 15:03:09 +01:00
Karl Heinz Marbaise 2876dc32fe
[MNG-7931] - Upgrade asm version to 9.6 2023-11-13 13:16:58 +01:00
Karl Heinz Marbaise 0287c7aa55
[MNG-7930] - Get rid of WARNING Parameter 'systemProperties' is deprecated 2023-11-13 12:26:04 +01:00