Commit Graph

92 Commits

Author SHA1 Message Date
Guillaume Nodet 7e550efae0
[MNG-8215] Add location tracking for toolchains (#1608) 2024-08-16 23:04:46 +02:00
Guillaume Nodet 40e41153c2
[MNG-8172] Fix site building (#1594) 2024-08-16 23:03:30 +02:00
Martin Desruisseaux 008d0b4d5b
Add `getModuleName(Path)` and `getModuleDescription(Path)` methods in `DependencyResolverResult`. (#1625)
Those methods are helpful for plugins that need to provide `--add-reads` and similar options,
as they allow to reuse the cached values instead of decoding `module-info.class` many times.
2024-08-16 11:19:34 +02:00
Jan-Jelle Kester 5b61e95f23
[MNG-7344] Track dependencyManagement import location in effective Model for MPH-183 (#603)
Co-authored-by: Maarten Mulders <mthmulders@apache.org>
Co-authored-by: Juul Hobert <juul.hobert@infosupport.com>
Co-authored-by: Giovanni van der Schelde <gvdschelde@gmail.com>
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2024-08-15 15:24:49 +02:00
Tamas Cservenak 10e2fba0fb
[MNG-8177] Add contextual info for model warnings (#1636)
As they really can come from anywhere. In case of this issue even from some eliminated POM that was read while collecting dirty tree, and was later eliminated. So confusing for users.

---

https://issues.apache.org/jira/browse/MNG-8177
2024-08-12 13:51:34 +02:00
Tamas Cservenak ad04d2c1fc
[MNG-8180] Back out from failing the build (#1645)
Just warn the user for now.

Port of accepted change from 3.9.x: https://github.com/apache/maven/pull/1642

---

https://issues.apache.org/jira/browse/MNG-8180
2024-08-12 13:06:59 +02:00
Tamas Cservenak da7c2110e4
[MNG-8180] Handle NPE due non-existent tags (#1639)
There was an NPE possibility when plugin.xml had no expected tags present.

Also: maven-compat has plugin.xml (!) w/o "name" tag, it NPEd and failed build. This was NOT picked up by CI as "rebuild itself" step does not install (just verify).

---

https://issues.apache.org/jira/browse/MNG-8180
2024-08-11 18:56:11 +02:00
Guillaume Nodet 182b87c246
[MNG-8132] Fix BOM dependency exclusions (#1622)
The original patch from MNG-5600 had not been ported to the new model builder
2024-08-11 00:42:29 +02:00
Guillaume Nodet 4369fa8dff
[API] Expose InputLocation formatter in the XmlFactory (#1616) 2024-08-11 00:21:50 +02:00
Martin Desruisseaux 473b5374f0
[MNG-8197] Use default classifier when Eclipse Aether specifies none (#1621)
* Use default classifier when Eclipse Aether specifies none.
The important change in this commit is in the implementation of `getClassifier()` methods.
However, this commit opportunistically refactors the code with a base class shared by `DefaultDependency` and `DefaultDependencyCoordinate` implementations.

* Preserve the type declared in the dependency (e.g. "modular-jar") when wrapping the object from Maven model.
2024-08-11 00:20:04 +02:00
Tamas Cservenak c0012c08aa
[MNG-8180] Fail install/deploy if rogue Maven Plugin metadata found (#1612)
Resolver handles transparently the repository metadata, and in case of plugins it peeks into META-INF/maven/plugin.xml of given artifact JAR to figure out needed metadata bits (prefix, name, etc).

But, this was done "blindly", while it is expected that GA of JAR artifact without classifier (requirement for maven plugins) and GA in embedded plugin metadata must be same.

Decision here is to fail hard, prevent this being installed and deployed, as this is most probably wrong (unsure what maven-indexer or even Sonatype search would do in this case).

---

https://issues.apache.org/jira/browse/MNG-8180
2024-07-11 18:47:20 +02:00
Slawomir Jaranowski d35864e348 [MNG-8179] Upgrade Parent to 43 2024-07-10 22:52:34 +02:00
Guillaume Nodet fd8f99ed90
Fix Maven 4 extensions (#1601)
* Add rootDirectory to XmlReaderRequest and fix maven-core exported artifacts
* Set the thread context classloader to the container realm to fix class loading from extensions
2024-07-09 14:10:26 +02:00
Guillaume Nodet 5b4e17736b
[MNG-8164] Session#collectDependencies(Project) does not obey exclusions (#1591) 2024-06-25 22:07:29 +02:00
Guillaume Nodet df94ee0d2c Remove hardcoded references to woodstox stax implementation 2024-06-14 00:26:16 +02:00
Guillaume Nodet 5d139bdd12 [MNG-8151] Merge DependencyCollector into DependencyResolver 2024-06-11 09:23:04 +02:00
Tamas Cservenak bea3e72cdb
[MNG-8141] Model Builder report issues during build (#1569)
And ArtifactDescriptorReader should not "toss away" but report WARNings (as in case of ERROR or FATAL MB throws).

Part 1: port ArtifactDescriptorReader to not lose WARNs
Part 2: make model validator report Profile ID duplications even in MIN level (as model WARNs)

---

https://issues.apache.org/jira/browse/MNG-8141
2024-06-10 13:04:53 +02:00
Guillaume Nodet 33010af039
Move modelVersion inference to model builder so that it is also effective on consumer models (#1566) 2024-06-07 09:31:02 +02:00
Tamas Cservenak 9db546ddb9 [MNG-8142] Hidden bug: JDK profile activator throw NumberFormatEx (#1557)
If property `java.version` is in unexpected format, the activator throws `NumberFormatEx`, that in turn, is caught and reported by `DefaultProfileSelector` w/o any cause.

These should be cleanly reported instead: report that `java.version` property is in "unexpected format", and also report why was there are failure to evaluate a property activation.

Note 1: Maven allows `-Djava.version` override (!!!), this is exactly what IT MNG-3746 does, but the `NumberFormatEx` went unnoticed, was swallowed, no cause reported.

Note 2: This bug was revealed by #1555 as it reported the issue, and later "asserted error free log" which was not error-free. Hence, this bug was simply revealed by improved logging on unrelated issue.

---

https://issues.apache.org/jira/browse/MNG-8142
2024-06-06 18:51:39 +02:00
Michael Keppler 808884a85d Fix typo in validation message 2024-06-06 08:13:27 +02:00
Guillaume Nodet 6e9889b1ad [maven-release-plugin] prepare for next development iteration 2024-05-22 16:07:09 +02:00
Guillaume Nodet e92f645c27 [maven-release-plugin] prepare release maven-4.0.0-beta-3 2024-05-22 16:06:59 +02:00
Guillaume Nodet 2942aadcc3
[MNG-8123] Fix Lifecycle in v3 (#1524) 2024-05-22 15:45:13 +02:00
Guillaume Nodet 9acbed7d4f [maven-release-plugin] prepare for next development iteration 2024-05-13 18:36:30 +02:00
Guillaume Nodet 828faba819 [maven-release-plugin] prepare release maven-4.0.0-beta-2 2024-05-13 18:36:20 +02:00
Martin Desruisseaux 583667a869
[MNG-8015] Adjustments in new API related to PathType (#1501)
* Javadoc cleanup and replacement of some `System.getProperty("...")` by more specific standard methods.

* Add Type.PROCESSOR, MODULAR_PROCESSOR and CLASSPATH_PROCESSOR.

* Modification of the path type API:

* Add a `warningForFilenameBasedAutomodules()` method in `DependencyResolverResult`.
* Add relationships from `JavaPathType` to `javax.tool` location API.
* Modify the `PathType.option(Iterable<? extends Path>)` return type
  because the option and the value need to be two separated arguments.

* Fixes according some comments on the pull request.
2024-05-13 11:53:45 +02:00
Hervé Boutemy d8199bf3b9
[MNG-8084] add system properties to test (#1500)
fixes ./${user.home} directory creation during tests execution
2024-05-06 07:31:23 +02:00
Guillaume Nodet 7451585a19
Fix reactor loading problems (#1497) 2024-05-03 10:48:38 +02:00
Guillaume Nodet febfd2b5c9
Resolver updates (#1495) 2024-05-02 18:33:18 +02:00
Guillaume Nodet 64e9447926
Fix consumer pom builder (#1491) 2024-05-02 17:10:38 +02:00
Matt Benson 399f8b4ffc
[MNG-8081] interpolate available properties during default profile selection (Maven 4.x) (#1446)
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2024-05-02 15:13:07 +02:00
Tamas Cservenak 8fbbbc978c
[MNG-8107] Update Resolver 2.0.0-alpha-11 (#1488)
Update to Resolver 2.0.0-alpha-11 and restore renamed class.

---

https://issues.apache.org/jira/browse/MNG-8107
2024-04-26 15:10:42 +02:00
Guillaume Nodet 6fddd97513
Use the new resolver provider (#1483) 2024-04-25 16:13:36 +02:00
Tamas Cservenak 854589b131
[MNG-8106] Fix metadata merge (#1481)
As currently if given metadata serves multiple roles (G, A or V level), data loss occurs.

---

https://issues.apache.org/jira/browse/MNG-8106
2024-04-25 12:10:21 +02:00
Tamas Cservenak 81e2b3c1ee
Make Maven 4.0.0 be beta-1 (#1484) 2024-04-25 10:48:58 +02:00
Guillaume Nodet 5d1cfd47f3 Cleanup dependencies 2024-04-25 07:46:50 +02:00
Hervé Boutemy 41d1950a6d [MNG-8084] add di & api-impl
drop model-transform deleted in MNG-7877
2024-04-24 18:01:00 +02:00
Guillaume Nodet 52c5659b25
Fix nasty concurrency issue in AbstractSession (#1479)
* Register the session explicitely
* Fix thread interrupted
2024-04-23 14:55:57 +02:00
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 691e3780e6
This is NOT a component (#1462)
See org.apache.maven.internal.impl.DefaultTransportProvider
2024-04-01 17:17:46 +02:00
Guillaume Nodet 003a5bc06d
[MNG-8084] Make the v4 api usable outside the Maven runtime (#1441) 2024-03-25 11:50:01 +01:00