Commit Graph

820 Commits

Author SHA1 Message Date
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
Guillaume Nodet a2cbf4873a [maven-release-plugin] prepare release maven-4.0.0-alpha-8 2023-10-20 21:20:23 +02:00
Guillaume Nodet 4251e3f9c2
[MNG-7915] Use MavenStaxReader/Writer in MavenXpp3Reader/Writer (#1293)
This removes the generated v4 model reader/writer based on Xpp3 api and deprecates the v3 Xpp3 reader/writer.
2023-10-20 09:14:01 +02:00
Guillaume Nodet 251a316962
[MNG-7893] Fix exception loading superpom with invalid modelVersion (#1290)
Even though this should not be supported, Maven 3.x is always using the 4.0.0 superpom.  So if the version is not a supported model version, simply use 4.0.0.  Any invalid value will be later verified by the model validator and eventually throw a meaninful exception.
2023-10-18 15:31:36 +02:00
Guillaume Nodet 92a82dcefd
[MNG-6437] Better support for path and uri in property interpolation (#812) 2023-10-17 19:55:08 +02:00
Tamas Cservenak bd608d8cc9
[MNG-7910] DefaultProfileSelector empty ctor uses immutable list (#1283)
It uses immutable list and while it suggests it allows this below, it actually fails on constructs like this (runtime ONLY):
{noformat}
new DefaultProfileSelector()
                .addProfileActivator(new JdkVersionProfileActivator())
                .addProfileActivator(new PropertyProfileActivator())
{noformat}

As default ctor creates immutable list, but API kinda suggests this is ok.

---

https://issues.apache.org/jira/browse/MNG-7910
2023-10-16 13:26:42 +02:00
Guillaume Nodet 07db6ec76a
[MNG-7911] Require JDK 11 and support JDK 21 at build time (#1278) 2023-10-16 13:25:27 +02:00
Slawomir Jaranowski 5c2e671a06 [MNG-7895] Support ${project.basedir} in file profile activation 2023-09-26 19:50:21 +02:00
Guillaume Nodet 10fa5c713a
[MNG-7893] Allow versioning the superpom according to the model version (#1253) 2023-09-26 07:17:52 +02:00
Guillaume Nodet 35022a3616
Fix newlines and indentation in ModelBuildingException message (#1257) 2023-09-22 12:54:27 +02:00
Guillaume Nodet 10487d7b5d
[MNG-7820] Get rid of plexus-utils (#1255) 2023-09-22 10:59:31 +02:00
Guillaume Nodet f24266eb64
[MNG-7836] Support alternative syntaxes for POMs (#1197)
The IT associated with this PR is using the Maven model to generate a hocon POM parser.  This requires the maven-api-model module to attach the POM as an artifact, and the maven.yml change so that the model is present in the local repository.
2023-09-22 09:25:10 +02:00
Guillaume Nodet 89d3ac90d1 Make DefaultInheritanceAssembler#merger field final and reorder fields correctly 2023-09-22 08:34:51 +02:00
Guillaume Nodet 0c37cff681
[MNG-7820] Get rid of plexus-utils Os class (#1249) 2023-09-22 08:01:36 +02:00
Guillaume Nodet 1eae6684e3
[MNG-7881] Expose the rootDirectory for model processing (#1245) 2023-09-19 16:31:35 +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