Commit Graph

3527 Commits

Author SHA1 Message Date
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 034ef155da
[MNG-8263] Remove last remnants of wrapper integration (#1736)
Last two bits to be removed:
* wrapper lifecycle
* exploded scripts

---

https://issues.apache.org/jira/browse/MNG-8263
2024-09-24 09:54:24 +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
Tamas Cservenak 7ea795b789
[MNG-8256] FilteredProjectDependencyGraph fix for non-transitive case (#1723)
The `FilteredProjectDependencyGraph` class fix for non-transitive case and an UT. Also contains some improvement in classes, making them immutable as intended.

---

https://issues.apache.org/jira/browse/MNG-8256
2024-09-12 22:50:39 +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 bcd5d9c9f9
DI improvements (#1717)
* Code cleanup
* Provide build path with causes when an exception occur
* Fix toString to display meaningful info
* Javadoc
* Add @NonNull and @Overrides annotations
* Support for @Nullable on fields and parameters
2024-09-12 08:14:46 +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 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 0c311e3da1 [MNG-8090] Fix missing repositories during parent artifact resolution 2024-08-30 11:17:17 +02:00
Guillaume Nodet cdaf86cfe9 [MNG-8229] Fix interpolation of CI friendly versions 2024-08-30 11:17:17 +02:00
Guillaume Nodet c0813a2b53
[MNG-7838] Fix usage of older packaged artifacts from project local repository (#1199) 2024-08-29 22:34:39 +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 e11b475e8b
[MNG-8052] Concurrently lifecycle executor (#1429) 2024-08-29 19:44:53 +02:00
Guillaume Nodet 40fe1dc167
[MNG-8220] Fix loading DI-powered beans from extensions (#1683) 2024-08-29 17:32:53 +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
Guillaume Nodet 40e41153c2
[MNG-8172] Fix site building (#1594) 2024-08-16 23:03:30 +02:00
Stefan Oehme e417e45e91
[MNG-8196] Make exception messages match Maven 3 again (#1628)
* Make exception messages match Maven 3 again

The boxing of `MojoException` into a `MojoExecutionException` brought two issues:

1. It added another layer to the stacktrace, making it a bit less readable for users and breaking test expectations for Maven extension authors (this was my main motivation for this change)
2. It lost the `longMessage`, which meant that this message was no longer shown at the end of the build.

This change fixes both problems by passing through the original `MavenException` and treating this new exception type directly in `DefaultExceptionHandler` and `MojoExecutor`

* Broaden to MavenException

---------

Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2024-08-16 11:25:16 +02:00
Guillaume Nodet 2a709dc038
[MNG-8176] Restrict classloader for Maven 4 plugins (#1336) 2024-08-12 23:57:01 +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 5ec110672e
[MNG-8182] Resolved errors were created based on collect exceptions (#1635)
Hence, they missed resolution errors.

---

https://issues.apache.org/jira/browse/MNG-8182
2024-08-09 23:10:29 +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 ab457d814f
Fix Toolchain toString() method (#1593) 2024-07-06 06:24:05 +02:00
Piotrek Żygieło 57fd0dc69b
[MNG-7194] Test missing property evaluation (#1573)
Co-authored-by: Piotrek Żygieło <pzygielo@users.noreply.github.com>
2024-06-26 05:22:09 +02:00
Guillaume Nodet c3f1cd6f76
[MNG-8160] Recreate the transformed artifact if it has been deleted (by the clean goal for example) (#1587) 2024-06-19 10:46:28 +02:00
Guillaume Nodet df94ee0d2c Remove hardcoded references to woodstox stax implementation 2024-06-14 00:26:16 +02:00
Slawomir Jaranowski 768ebbc263
[MNG-7758] Report dependency problems for all repository (#1563) 2024-06-12 09:49:10 +02:00
Guillaume Nodet e9ece0c9c9 Remove commons-io dependency 2024-06-11 11:06:12 +02:00
Guillaume Nodet b852f74084 [MNG-8134] Add a @Resolution annotation to mojos to inject project dependencies collection / resolution result 2024-06-11 09:23:04 +02:00
Guillaume Nodet 8d483f922b [MNG-8152] Implement @SessionScoped and @MojoExecutionScoped from the DI API 2024-06-11 09:23:04 +02:00
Guillaume Nodet 5d139bdd12 [MNG-8151] Merge DependencyCollector into DependencyResolver 2024-06-11 09:23:04 +02:00
Tamas Cservenak dd670bf9a1 [MNG-8140] Always tell why model was discarded as "invalid" (#1555)
The info is there, but we redirect user to rinse-repeat in debug mode, that that creates a TON of output.

All is there, just tell why.

---

https://issues.apache.org/jira/browse/MNG-8140
2024-06-06 21:10:58 +02:00
Tamas Cservenak 9ce85ef4f4 [MNG-8066] Default exception handler does not handle recursion (#1558)
If there is a recursion in throwable causes, Maven will hang forever, instead to return.

---

https://issues.apache.org/jira/browse/MNG-8066
2024-06-06 12:31:03 +02:00
Tamas Cservenak 5e97703456
[MNG-8136] Update Eclipse Sisu to 0.9.0.M3 (#1546)
Update Eclipse Sisu to 0.9.0.M3

---

https://issues.apache.org/jira/browse/MNG-8136
2024-06-04 08:45:16 +02:00
Elliotte Rusty Harold 1af5368b23
Remove unhelpful links that don't describe failure reasons from output (#1545) 2024-06-03 15:15:36 -04:00
Yueh Chun Wu dd9679450e
[MNG-7902] Sort plugins in the validation report (#1510)
Co-authored-by: Yueh Chun Wu <kevinwu@YuehdeMBP.attlocal.net>
2024-05-23 14:25:04 +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 accbbcf5a0
Fix packaging not found (#1507)
* Fix packaging not found
* Always keep Projects in cache
2024-05-16 10:45:24 +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
Guillaume Nodet bde81a4d85 [MNG-8108] Fix problem when building the consumer pom 2024-05-13 18:34:29 +02:00
Guillaume Nodet d296927de2
[MNG-8119] Remove build section from profiles in the consumer pom (#1503) 2024-05-13 14:04:39 +02:00