Commit Graph

92 Commits

Author SHA1 Message Date
Tamas Cservenak 2bcd571b56 [maven-release-plugin] prepare release maven-4.0.0-beta-5 2024-10-18 16:34:04 +02:00
Tamas Cservenak 583efaa1cf
Sort out dependency issues (#1819)
Changes:
* fix typo, assertj is not compile dependency
* exclude error_prone_annos that come in via gson in Resolver
  SPI (RFC 9457)
2024-10-18 13:48:19 +02:00
Guillaume Nodet c06965db88 [MNG-8326] The ModelBuilder cannot import BOM with classifiers 2024-10-18 12:59:35 +02:00
Guillaume Nodet d5c8280658
[MNG-8312] Generate the BOM automatically (#1797)
Generate both skinny and fat BOMs BOM automatically
Add support for import a BOM w/ classifier in Model 4.1.0+
---------

Co-authored-by: Tamas Cservenak <tamas@cservenak.net>
2024-10-17 17:07:55 +02:00
Sergey Ponomarev 989f798c9f
[MNG-8258] Change the fixed reproducible build outputTimestamp to 1 Feb 1980 (#1813)
The Maven used the year 2001 (beginning of 21st century).
But the Gradle already use the 1 Feb 1980 for preserveFileTimestamps.

The 1 Jan 1980 is a minimal date in Zip archive but the 1 Jan has some special treatment by Java that's why the Gradle team used the 1 Feb.

See more detailed description in CONSTANT_TIME_FOR_ZIP_ENTRIES
https://github.com/gradle/gradle/blob/master/platforms/core-runtime/files/src/main/java/org/gradle/api/internal/file/archive/ZipEntryConstants.java#L39

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2024-10-17 17:05:39 +02:00
Guillaume Nodet 107f81da51 Avoid double profile injection 2024-10-17 16:35:42 +02:00
Guillaume Nodet 4da2eb9622 Fix superpom info location 2024-10-17 16:35:42 +02:00
Guillaume Nodet 69b34f4f3c
[MNG-8322] Use the new ToolchainsBuilder and SettingsBuilder (#1778) 2024-10-17 11:25:53 +02:00
Tamas Cservenak 95e59f2437
[MNG-8302] Warn when appropriate (#1810)
First, `rootDirectory` is nullable, CLIng code was not assuming this, fixed.
Second, emit the "no root found" warning ONLY when appropriate (when we have a POM in picture).

---

https://issues.apache.org/jira/browse/MNG-8302
2024-10-17 10:06:47 +02:00
Guillaume Nodet 1cff5947ac
Revert "Make rootDirectory really mandatory" (#1800)
This reverts commit 608a99fb08.

---

https://issues.apache.org/jira/browse/MNG-8302
2024-10-16 16:22:26 +02:00
Guillaume Nodet 0d04bb9a21
[MNG-8041] Move PathScope into the dependency collection request (#1807)
JIRA issue: [MNG-8041](https://issues.apache.org/jira/browse/MNG-8041)
IT PR: https://github.com/apache/maven-integration-testing/pull/390
2024-10-16 16:15:37 +02:00
Guillaume Nodet d742fd624c
[MNG-8295] Dependency Manager Transitivity (now default) handles dependency management inconsistently (#1788)
Actually use TransitiveDependencyManager when maven.resolver.dependencyManagerTransitivity=true

Co-authored-by: DidierLoiseau <didierloiseau+github@gmail.com>
2024-10-15 14:26:16 +02:00
Guillaume Nodet fee69f2f89
[MNG-8294] Consistency checks when loading parent (#1784) 2024-10-09 13:07:31 +02:00
Tamas Cservenak 445236398d
Make rootDirectory mandatory (#1787)
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2024-10-08 21:45:28 +02:00
Guillaume Nodet 6c8b808760
[MNG-5910] Warn if both exists and missing file activation are set (#1773) 2024-10-08 15:46:42 +02:00
Guillaume Nodet a6ecbde9e9
Fix concurrency issue in DefaultModelValidator (#1786) 2024-10-08 11:04:20 +02:00
Guillaume Nodet 954eae7b56
[MNG-8293] Fix resolution of reactor models (#1783) 2024-10-07 17:32:34 +02:00
Tamas Cservenak b2b868f864
[MNG-8288] "path cannot be null" (#1782)
It seems Maven is eager to get POM from rootDirectory to support
CI Friendly versions. This change makes it "best effort", as in
if there is no POM, just walk away.

---

https://issues.apache.org/jira/browse/MNG-8288
2024-10-07 14:19:01 +02:00
Guillaume Nodet 1f1a0f9a72
Fix phasing executor (#1770) 2024-10-03 22:56:36 +02:00
Guillaume Nodet 43c0a0ad53
Restore the default parallelism in the model builder (#1768) 2024-10-02 23:39:40 +02:00
Guillaume Nodet f6417e4944 [MNG-8281] Interpolator service 2024-10-02 23:26:05 +02:00
Tamas Cservenak 1062d05cb0
Probable bug: method that nullifies model (#1735)
* Sus method that nullifies model
* Make it clear
* Same change in new API
* Fix the logic to return the old value when unchanged

---------

Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2024-10-01 18:55:06 +02:00
Hervé Boutemy 82cf96094f
[MNG-8258] activate Reproducible Builds by default (#1726) 2024-10-01 16:51:06 +02:00
Guillaume Nodet fcb8147268 [MNG-8178] Fall back to system properties for missing profile activation context properties (#1609)
Missed port to the build implementation from f2a0865
2024-10-01 13:59:58 +02:00
Guillaume Nodet 885a4b3a26
[MNG-8230] Rewrite CI friendly versions (#1710) 2024-10-01 13:58:57 +02:00
Guillaume Nodet 3fdc54c975
Use Version and Severity directly (#1756) 2024-10-01 13:02:36 +02:00
Guillaume Nodet 0cff3ea22b
Improve model validator wrt modelVersion which is now set in the file model (#1757) 2024-10-01 13:02:25 +02:00
Guillaume Nodet e28283d81c Disable parallelism 2024-09-30 16:11:42 +02:00
Martin Desruisseaux 8f34ea4ce0 More readable formatting in the warning advising users to not publish a project having auto-named dependencies.
Note: this warning is questionable. Should it be removed?
2024-09-30 10:55:03 +02:00
Guillaume Nodet 2d224623a3
[MNG-8120] Refactor ModelBuilder and ProjectBuilder (#1700)
With the introduction of the build pom and raw -> build pom transformation, the construction of the effective poms in two steps become very problematic. Over the time, multiple caches have been added to the ProjectBuilder and ModelBuilder related classes which are often redundant.

This PR thus changes things and move the recursive construction of the models fully into the ModelBuilder in a single call. When building build poms, a first step is done by parsing the file models from the root, then building all needed effective models from those. All the inference can be cleanly done because the builder has all the file models ready. The result will be used by the ProjectBuilder to build the projects.
2024-09-28 11:03:24 +02:00
Tamas Cservenak 45f9b81b4a
Simple typo bugfix (NPE) (#1731)
No issue, just spotted.
2024-09-19 21:15:51 +02:00
Guillaume Nodet e1e23d9e26
[MNG-8242] Cache flattened parents during model building (#1703)
During model building, we do not cache any hierarchy inheritance due to profiles that may be activated based on properties from the child projects.
So there's no way to cache the effective parent and just inject it into the child, the whole hierarchy need to be taken into account.
However, flattening the parent (i.e. inject the flattened parent's parent into the raw parent) should provide a parent model which has no parents anymore, not activated and not interpolated, but which can be cached and reused.
2024-09-18 16:37:24 +02:00
Guillaume Nodet 2f5f61a043
[MNG-7255] Infer groupId for intra-reactor dependencies (#1696) 2024-09-18 14:26:20 +02:00
Guillaume Nodet 8d9f8da444
[MNG-8239] Add missing ModelCacheFactory (#1728) 2024-09-18 13:42:07 +02:00
Guillaume Nodet deb15be3b6
[MNG-8259] Improve Sisu / DI bridge (#1722) 2024-09-18 13:05:13 +02:00
Guillaume Nodet 2b13a43c09
[MNG-8235] Move remote repositories into requests (#1712) 2024-09-12 08:19:14 +02:00
Guillaume Nodet 625b4561f0
[MNG-8232] Introduce ModelTransformer (#1702) 2024-09-12 08:15:53 +02:00
Guillaume Nodet 237eeba760
[MNG-8252] Fully infer the parent coordinates if the location points to a valid model (#1706) (#1721) 2024-09-12 06:37:14 +02:00
Guillaume Nodet f137c13877
[MNG-8190] Restrict build pom feature to 4.1.0 model version (#1707) 2024-09-11 18:31:06 +02:00
Guillaume Nodet e6d038ac07
[MNG-8252] Fully infer the parent coordinates if the location points to a valid model (#1706) 2024-09-11 18:30:15 +02:00
Guillaume Nodet e0b01fb5a4
[MNG-8210] Fix broken inference of version when using -f option (#1720) 2024-09-11 16:57:21 +02:00
Guillaume Nodet 8a61f7d20a
[MNG-8249] Provide an annotation processor for DI (#1704) 2024-09-10 19:18:47 +02:00
Tamas Cservenak a98d530e33 [maven-release-plugin] prepare for next development iteration 2024-08-30 14:59:00 +02:00
Tamas Cservenak 697c543b4e [maven-release-plugin] prepare release maven-4.0.0-beta-4 2024-08-30 14:58:34 +02:00
Guillaume Nodet b370e5e929
[MNG-8210] Replace Maven "module" term by "subproject" (#1651)
Co-authored-by: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
2024-08-29 20:21:40 +02:00
Guillaume Nodet 57082737d8
[MNG-7897] Support ${project.rootDirectory} in file profile activation (#1687)
* [MNG-7897] Support ${project.rootDirectory} in file profile activation

* Add a test with the short ${basedir} expression
2024-08-29 17:33:49 +02:00
Guillaume Nodet acec540547
[MNG-8052] New lifecycle for Maven 4 (#1448) 2024-08-29 06:48:54 +01:00
Guillaume Nodet 30dc81227b
Renaming of `ArtifactCoordinate.getVersion()` + documentation (#1662)
* Rename ArtifactCoordinate.getVersion() as getVersionConstraint().
* Introduce DownloadedArtifact, DownloadedDependency and ProducedArtifact.
* Rename coordinate -> coordinates.
* Add documentation on Artifact, ArtifactCoordinates, Dependency and DependencyCoordinates and other classes.
* Remove `LATEST` and `SNAPSHOT` from documentation since they are deprecated.
* Opportunistic addition of some missing `@Override` annotations.

---------

Co-authored-by: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
2024-08-27 23:13:34 +02:00
Guillaume Nodet 6ac914d6f9
[MNG-7914] Provide a single entry point for configuration (#1595)
* [MNG-7914] Provide a single entry point for configuration
* [MNG-7914] Rename global -> installation
* [MNG-7914] Include time zone in Maven build timestamp
* [MNG-7914] Use a single place to document all maven properties
2024-08-22 16:47:43 +02:00
Tamas Cservenak 6668da3219
[MNG-8211] Fail the build if project effective version has expression (#1673)
As this is almost always source of confusion. If feature is used and there is no proper value set, fail the build, as users for sure does not plan to deploy artifacts with version `${revision}` (or any expression in project.version).

Still, to not be disruptive, the old behaviour can be achieved by setting `maven.build.allowExpressionInEffectiveProjectVersion`=true project property.

---

https://issues.apache.org/jira/browse/MNG-8211
2024-08-22 12:54:24 +02:00