Commit Graph

12018 Commits

Author SHA1 Message Date
huazhongming 4af662f7b3
[MNG-7920] Fix usage of packaging BOM fails in maven-install-plugin (#1305)
Signed-off-by: crazyhzm <crazyhzm@apache.org>
2023-12-05 10:23:26 +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
Tamas Cservenak 63927175d9 Update DOAP w/ Maven 3.9.6 release 2023-12-01 12:47:44 +01:00
Guillaume Nodet 69bc993b80
[MNG-7945] Fix profile settings being injected into consumer POM (#1323) 2023-11-28 18:17:10 +01:00
huazhongming 3927ca1843
[MNG-7919] Change the log of unable to find the root directory to info (#1325)
Signed-off-by: crazyhzm <crazyhzm@apache.org>
2023-11-28 00:13:26 +01:00
Guillaume Nodet 05fcf5b2d3
[MNG-6036] Add namespace to XmlNode (#1318) 2023-11-28 00:11:34 +01:00
Tamas Cservenak eee037e676
[MNG-7924] Better control over and better integration with Resolver (#1299)
Integrate better and obtain better control over Resolver. These changes did stem from "JPMS module experiment" and are considered improvement but does not implement any functionality related to JPMS module support.

Changes:
* Maven4 should stop "disconnected coexistence" of two type systems (ArtifactHandlers and Resolver ArtifactTypeRegistry), it should unify them.
* Maven4 Core should provide generic and extensible means to introduce new artifact types (fully in extension, and extension should get extended data via "roundtrip" in core/resolver)

---

https://issues.apache.org/jira/browse/MNG-7924
2023-11-27 20:18:14 +01:00
Tamas Cservenak e89b6fd53f
[MNG-7653] Integrate Resolver 2.x onSessionClose (#1301)
Implement onSessionClose and "resolver 2.x way for sessions"...

As digging happens in same area, some other "resolver configuration" issues resolved as well.

Important: contains a "hack" to fix issue in alpha-2, that is marked with TODO to remove once alpha-3+ used.

---

https://issues.apache.org/jira/browse/MNG-7653
https://issues.apache.org/jira/browse/MNG-7935
https://issues.apache.org/jira/browse/MNG-7936
2023-11-21 12:04:01 +01:00
Guillaume Nodet 143af9b085
Fix not closed ForkJoinPools (#1319) 2023-11-20 13:44:59 +01:00
Guillaume Nodet 3c68106b7b
improve exception docs (#1316)
Co-authored-by: Elliotte Rusty Harold <elharo@ibiblio.org>
2023-11-20 07:44:19 +01:00
Slawomir Jaranowski 644a15c323 [MNG-7939] Allow to exclude plugins from validation 2023-11-19 22:11:13 +01:00
Slawomir Jaranowski 1a61b80dee
Improve build on s390 (#1313)
* Use JDK 11 as default for s390 builds
* Checkout the same branch name for ITs as for build
2023-11-19 16:46:24 +01:00
Slawomir Jaranowski 9d65e2b240
Use JDK 11 as default for s390 builds 2023-11-19 10:58:31 +01:00
Karl Heinz Marbaise b08b62f8de
[MNG-7940] - Maven embedder CLI output contains nulls. 2023-11-18 14:15:19 +01:00
Slawomir Jaranowski ba8cbd9685
[MNG-7932] - Upgrade maven-parent to v41 in maven-bom 2023-11-17 22:35:36 +01:00
Guillaume Nodet 29e239000b
Add some love to the API (#1310) 2023-11-17 16:52:15 +01:00
Guillaume Nodet 518b988a09
Remove reference to plexus XmlStreamReader (#1308) 2023-11-17 16:51:47 +01:00
Guillaume Nodet f92fdb86c2
Fix XML parsing problem with empty namespace (#1307) 2023-11-17 16:51:28 +01:00
Guillaume Nodet 3cebbf7a15
Remove usage of old StringTokenizer (#1306) 2023-11-17 16:50:51 +01:00
Guillaume Nodet d62113772e
Clean up dependencies versions (#1300) 2023-11-17 16:31:11 +01:00
Karl Heinz Marbaise a68443f4e9
[MNG-7932] - Upgrade maven-parent to v41 2023-11-13 20:47:38 +01:00
Karl Heinz Marbaise c613d7ab4b
Upgrade Build Requirements
+ Minimum JDK11
 + Minimum Maven 3.6.3
2023-11-13 15:03:09 +01:00
Karl Heinz Marbaise 2876dc32fe
[MNG-7931] - Upgrade asm version to 9.6 2023-11-13 13:16:58 +01:00
Karl Heinz Marbaise 0287c7aa55
[MNG-7930] - Get rid of WARNING Parameter 'systemProperties' is deprecated 2023-11-13 12:26:04 +01:00
Karl Heinz Marbaise 7cfdedefb6
[MNG-7929] - Upgrade Mockito to 5.7.0 2023-11-13 12:02:12 +01:00
Karl Heinz Marbaise 6f0b5c0639
[MNG-7928] - Upgrade JUnit Jupiter Version 5.10.1 2023-11-13 11:39:39 +01:00
sebastien-doyon 94749041b4
[MNG-7899] Various memory usage improvements 4-1 (#1296)
* [MNG-7899] Various memory usage improvements

- BatchModeMavenTransferListener removed
- FileSizeFormat moved to top level class
- FileSizeFormat.formatProcess() refactored to accept an StringBuilder as argument
- FileSizeFormat refactored format() methods
- FileSizeFormat refactored, replace DecimalFormat with Math logic to
reduce memory allocation

---------

Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2023-11-10 00:47:54 +01:00
Guillaume Nodet 4bd12915c9
[MNG-7662] Use proxies for session scoped beans (#950) 2023-11-09 14:34:11 +01:00
Tamas Cservenak e6d1b4c5de
[MNG-7909] Upgrade to Resolver 2.0.0-alpha-1 (#1282)
Upgrade to Resolver 2.0.0.

Changes:
* many UT code used `new DefaultRepositorySystem()` ctor that is gone (was present due SL only), replaced with mocks
* dropped MavenResolverModule Guice module (as AetherGuice module is gone as well)
* updated Resolver version to 2.0.0-alpha-1
* added jdk transport (that prevails apache on Java 11)
* rename of "native" into "apache", deprecate "native" name
* introduce "jdk" transport

---

https://issues.apache.org/jira/browse/MNG-7909
2023-11-07 16:06:40 +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 4ddc4bf406
Use 4.0.99 as as intermediate model to keep 4.1.0 for the Maven 4.x model (#1297)
Also generates XSD for extensions 1.2.0 schema
2023-11-06 20:04:44 +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 61f08f326d Fix build/consumer pom transformation wrt attached artifacts 2023-10-20 21:18:46 +02:00
Guillaume Nodet 08a2c60d9e
[MNG-7916] Simply get rid of LifecycleMappingsXpp3Reader/Writer (#1295)
Since the v3 model has been replaced by the v4 model, that would be in line.  We can revisit and restore full compatibility later if needed.
2023-10-20 17:19:56 +02:00
Guillaume Nodet 066cb3dc17
[MNG-7917] Upgrade to Jansi 2.4.1 (#1294) 2023-10-20 17:19:20 +02:00
sebastien-doyon d362690a82
[MNG-7899] Various memory usage improvements 5 (#1270)
Multiple optimizations :
- renderLevel() method use static constants instead of rebuilding the strings on each call
- replace + operator usage with more PrintStream.print() calls to reduce temporary strings creation
- reduce usage of MessageBuilder.a() method usage with more PrintStream.print() calls to reduce temporary strings creation
- replace the builder() method with a static import
- replace String.format with a simple string concat to reduce memory allocation (garbage)
- change static constants to class member in MavenSimpleLogger
- add a setLength(int) method in MessageBuilder to enable reuse
2023-10-20 16:30:44 +02:00
sebastien-doyon 68bbc8f393
[MNG-7899] Various memory usage improvements 4 (#1269)
- Use the main StringBuilder to append string instead of using a separate one
- Use the StringBuilder.append() with index to avoid String.substring(), less temporary strings
- Reuse the FileSizeFormat object in the while loop avoiding multiple temporary instances creation
- Non-threadsafe FileSizeFormat instance can be make class instance since its formatProgress() method is only called in a synchronized block.
- add a test in a multi-threaded context
- Non-threadsafe StringBuilder instance 'buffer' can be make class instance since it is always called in synchronized methods
- remove synchronized block in transferProgressed() method, the method is synchronized and the block is not needed
- Remove the Collections.synchronizedMap since all methods that use the transfers map are synchronized
2023-10-20 14:16:34 +02:00
Guillaume Nodet 9abaf3aa1c
[MNG-7894] Consumer pom should not expose local workspace directory (#1291) 2023-10-20 12:38:57 +02:00
Slawomir Jaranowski a35ed073ab
[MNG-7904] Use SettingsStaxReader/Writer for SettingsXpp3Reader/Writer (#1285) 2023-10-20 09:44:51 +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 a734e2a336
Get rid of deprecated method in the v4 Session interface (#1292) 2023-10-20 07:54:44 +02:00
sebastien-doyon 16888062d0
[MNG-7899] Various memory usage improvements (#1268)
Reuse a StringBuilder in a for loop by setting its lenght to zero.
Help reduce temporary objects creation.
2023-10-19 14:19:37 +02:00
Guillaume Nodet 9663203821
Reuse the same repository so that ITs can access maven snapshot jars from the repository (#1277) 2023-10-19 13:53:44 +02:00
Tim te Beek 889ceb42a4
[MNG-6847] Use diamond operator (#1264)
Co-authored-by: Moderne <team@moderne.io>
2023-10-19 09:06:15 +02:00
juulhobert 7f86d1d996
[MNG-7772] Allow to register maven core extension in .m2 directory instead of MAVEN_HOME (#1280) 2023-10-18 20:06:57 +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