Commit Graph

864 Commits

Author SHA1 Message Date
Tamas Cservenak 4b9e350985 [maven-release-plugin] prepare for next development iteration 2024-10-19 20:11:20 +02:00
Tamas Cservenak 6e78fcf6f5 [maven-release-plugin] prepare release maven-4.0.0-beta-5 2024-10-19 20:10:56 +02:00
Tamas Cservenak 3ecf9124ca Revert "[maven-release-plugin] prepare release maven-4.0.0-beta-5"
This reverts commit d82ef1a372.
2024-10-19 20:08:03 +02:00
Tamas Cservenak 87912b6554 Revert "[maven-release-plugin] prepare for next development iteration"
This reverts commit f4eeca2472.
2024-10-19 20:07:37 +02:00
Tamas Cservenak f4eeca2472 [maven-release-plugin] prepare for next development iteration 2024-10-18 17:54:38 +02:00
Tamas Cservenak d82ef1a372 [maven-release-plugin] prepare release maven-4.0.0-beta-5 2024-10-18 17:54:23 +02:00
Tamas Cservenak 076c4dfeb7 Revert "[maven-release-plugin] prepare release maven-4.0.0-beta-5"
This reverts commit 2bcd571b56.
2024-10-18 17:05:06 +02:00
Tamas Cservenak ec2a8054c1 Revert "[maven-release-plugin] prepare for next development iteration"
This reverts commit 1813f06f86.
2024-10-18 17:04:56 +02:00
Tamas Cservenak 1813f06f86 [maven-release-plugin] prepare for next development iteration 2024-10-18 16:34:31 +02:00
Tamas Cservenak 2bcd571b56 [maven-release-plugin] prepare release maven-4.0.0-beta-5 2024-10-18 16:34:04 +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 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
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 2efeaf75f5 [MNG-8264] Deprecate maven-model-builder 2024-09-28 20:56:59 +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 368ddec0e4
[MNG-8233] Client should handle modelIds as "opaque" (#1701)
Javadoc states wrong things (about format of modelId, they are
paths in reality), but also these all are "implementation details".
Crafting modelIds to "walk" lineage is wrong, there is a dedicated
method that provide "opaque" key Strings in defined order to
do that. And client should not care (nor assume) anything
about format of the key String.

---

https://issues.apache.org/jira/browse/MNG-8233
2024-09-19 19:38:41 +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
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
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
Guillaume Nodet 40e41153c2
[MNG-8172] Fix site building (#1594) 2024-08-16 23:03:30 +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
Guillaume Nodet f2a0865c7a
[MNG-8178] Fall back to system properties for missing profile activation context properties (#1609)
A call to context.getSystemProperties() may yield an empty map, or
one missing the desired key, which makes a subsequent call of
toLowerCase fail with a NullPointerException.

Fall-back to using system properties with the Os.OS_NAME and 
similar values instead.

---------

Co-authored-by: Christian Kohlschütter <christian@kohlschutter.com>
2024-07-11 07:24:58 +02:00
Slawomir Jaranowski d35864e348 [MNG-8179] Upgrade Parent to 43 2024-07-10 22:52:34 +02:00
Guillaume Nodet df94ee0d2c Remove hardcoded references to woodstox stax implementation 2024-06-14 00:26:16 +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
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