Commit Graph

835 Commits

Author SHA1 Message Date
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
liutang123 0456c7c629 Caplital OS name can not activate profile 2024-06-05 16:16:41 +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
Martin Desruisseaux 39696f2fab
[MNG-8084] Change six remaining imports of `ModelVersionParser`. (#1527)
This commit aims to complete d075fe7e85, which moved `ModelVersionParser`
interface from the `org.apache.maven.model.version` package to `org.apache.maven.api.services.model`.
Completing this change is necessary for building `maven-plugin-tools` or `maven-plugin-testing`.

This commit deletes the old interface for making sure that there is no accidental use.
The old and new interfaces were identical except for the package names and the imports.
As a result of this change, the following implementation classes are identical except
for package names and imports:

* `maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelVersionParser.java`
* `maven-api-impl/src/main/java/org/apache/maven/internal/impl/DefaultModelVersionParser.java`
2024-05-21 11:54:32 +02:00
Konrad Windszus ac80eeabc4
[MNG-8050] emit warn in case of repo id clashes between settings and POM (#1412) 2024-05-18 16:09:22 +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
Guillaume Nodet 0564480440
[MNG-8118] Merge BOM exclusions instead of overwriting (#1504) 2024-05-13 08:24:14 +02:00
Guillaume Nodet febfd2b5c9
Resolver updates (#1495) 2024-05-02 18:33:18 +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 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
Guillaume Nodet d075fe7e85 [MNG-8084] New model builder and resolver provider 2024-04-12 12:50:18 +02:00
Slawomir Jaranowski 1fc87b8d0d [MNG-8075] Allow project.baseUri in repository.url 2024-03-15 19:09:08 +01:00
Tamas Cservenak 33788fd7fc [maven-release-plugin] prepare for next development iteration 2024-03-06 20:57:04 +01:00
Tamas Cservenak 0a6a5617fe [maven-release-plugin] prepare release maven-4.0.0-alpha-13 2024-03-06 20:56:36 +01:00
Tamas Cservenak 5029cc238c
[MNG-8012] Warn if in-reactor BOM import happens (#1434)
This should be in fact prevented IMHO. Also, model builder missed File uses are corrected.

---

https://issues.apache.org/jira/browse/MNG-8012
2024-03-01 18:27:21 +01:00
Konrad Windszus cf60940497
[MNG-5726] Support regular expression matching in profile activation for (#1421)
OS version

This requires using the reserved prefix "regex:" in the version element.
2024-02-28 19:04:58 +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
Guillaume Nodet 0c529f830a
[MNG-8053] Profile activation by packaging in the POM (#1410) 2024-02-15 09:42:00 +01:00
Tamas Cservenak 42559937d8
[MNG-7854] Warn if imported dep is ignored (#1370)
The artificial (or "bolted on") scope "import" behaves wildly differently that rest of Maven, causes surprise to our users. For start, we should emit "actionable" warnings about these, ultimate goal is to align this behaviour with "maven way" of working ("closest occurence wins" vs current weird "direct occurrence then first occurence wins" strategy).

Warnings are only created when the dependency is not directly managed. The warning also suggests to add a direct managed dependency to get rid of it, so it's now helpful and actionnable.

---

https://issues.apache.org/jira/browse/MNG-7854
2024-02-01 17:25:04 +01:00
Guillaume Nodet b6a84fcac6
[MNG-8014] Fix multithreaded builder (#1386) 2024-01-22 18:27:48 +01:00
Guillaume Nodet b44856d0dc
Simplify model builder internal Graph (#1380) 2024-01-15 17:49:26 +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
Guillaume Nodet 47fc18faf9
[MNG-7992] Fix windows identified as dos (#1360) 2024-01-08 09:52:00 +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 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 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
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
Guillaume Nodet 69bc993b80
[MNG-7945] Fix profile settings being injected into consumer POM (#1323) 2023-11-28 18:17:10 +01:00
Guillaume Nodet d62113772e
Clean up dependencies versions (#1300) 2023-11-17 16:31:11 +01:00
Guillaume Nodet 7fcdd32e87 [MNG-7615] Multithreaded project builder 2023-11-07 09:20:52 +01:00
Guillaume Nodet 2f6ec159fe [MNG-7615] Add a cycle detection to the transformer context 2023-11-07 09:20:52 +01:00
Guillaume Nodet 53ff1690de [MNG-7615] Add some methods for supporting Maven 4 api to ProfileInjector / ProfileSelector 2023-11-07 09:20:52 +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