Commit Graph

1279 Commits

Author SHA1 Message Date
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 64e9447926
Fix consumer pom builder (#1491) 2024-05-02 17:10:38 +02:00
Jermaine Hua 6814ba386d
Simplified redundant judgment (#1489)
Signed-off-by: crazyhzm <crazyhzm@apache.org>
2024-05-02 14:51:05 +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 3bad5068a2
[MNG-8025] Restore compatibility (#1467) 2024-04-23 15:29:46 +02:00
Guillaume Nodet 52c5659b25
Fix nasty concurrency issue in AbstractSession (#1479)
* Register the session explicitely
* Fix thread interrupted
2024-04-23 14:55:57 +02:00
Guillaume Nodet d075fe7e85 [MNG-8084] New model builder and resolver provider 2024-04-12 12:50:18 +02:00
Guillaume Nodet a6f52774eb Boot JLine in async mode 2024-04-03 19:49:40 +02:00
carrychair 267de063ee
remove repetitive words (#1436)
Signed-off-by: carrychair <linghuchong404@gmail.com>
2024-03-18 00:24:53 +00: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
Guillaume Nodet a9934f91fd
Extract JLine support into its own module (#1426) 2024-02-29 00:31:59 +01:00
Hervé Boutemy 54c1b2f28a [MNG-8029] improve documentation about mirror settings 2024-02-17 19:40:11 +01:00
Guillaume Nodet c88afd470f
Clean mdo schemas (#1365)
* fix namespace location
* remove unneeded CDATA
* code formatting
* use {@code xxx}
* generate location tracking classes
* add location tracking to toolchain model
* Fix javadoc
2024-02-07 22:28:01 +01:00
Tamas Cservenak 6afa4770cb
[MNG-8006] [MNG-8021] SPI to contribute properties and more (#1384)
Create _aether internal_ "extenders" components to serve several purposes:
* extender to meddle with exec request, for example to mediate between effective properties SPI (exec request extender)
* extender to meddle with prepped session and related bits, for example to move out deprecated code from session factory (session extender)

This PR implements M4 API SPI for contributing effective properties and exposes method for effective properties on `Session`.
* `Session` should expose properties service "ready" for interpolation, otherwise each interpolating code (plugin, etc) would need to construct the "effective" ones themselves, repeating same steps over and over again.
* SPI can contribute to user properties
* `Session` exposed properties are all immutable (sans effective, that is computed on each call).
* and lastly, a cleanup: all packages within `o.a.m.internal.aether` are now package protected, to tighten internal encapsulation. New core package `o.a.m.resolver` introduced that contains 2 publicly accessible classes.

---

https://issues.apache.org/jira/browse/MNG-8006
https://issues.apache.org/jira/browse/MNG-8021
2024-01-19 12:00:28 +01:00
Tamas Cservenak 3f47580dcc
[MNG-8005] Fix workspace reader drop bug (#1385)
Maven4 seems sets but then drops/overrides some workspace readers. Partially due hazy borders who or what manages them, as role is split between session factory and session factory caller.

Changes:
* session factory does NOTHING re workspace readers, it becomes fully the caller duty
* two spots calling session factory (default maven, extension bootstrap) are now fully in charge to properly setup workspace readers

Co-authored-by: Jonas Rutishauser <jonas.rutishauser@alumni.ethz.ch>

---

https://issues.apache.org/jira/browse/MNG-8005
2024-01-18 12:51:16 +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
Tamas Cservenak 63a207a0f6
[MNG-8007] Maven TransferListener wrapper (#1371)
A wrapper listener that can receive events even from multiple threads, and passes them to wrapped delegate listener on single thread, keeping delegate implementation simple.

---

https://issues.apache.org/jira/browse/MNG-8007
2024-01-11 18:35:13 +01:00
Tamas Cservenak c4ccba7bf9
[MNG-7994] Update to Resolver 2.0.0-alpha-6 (#1373)
Update to alpha-6. Also, move off from deprecated default ctor of def repo session in tests.

---

https://issues.apache.org/jira/browse/MNG-7994
2024-01-11 13:16:51 +01:00
Tamas Cservenak cfa13f5cc7
[MNG-7999] Confine Plexus Container as much as possible (#1367)
This is an ongoing effort to confine Plexus, but also perform a bit of cleanup in Maven Core and around. No logic changes, just replacing Plexus with Lookup (that is a thin wrapper around it), and removing unused members, redundant checks, etc. Module maven-compat omitted on purpose.

---

https://issues.apache.org/jira/browse/MNG-7999
2024-01-10 13:55:54 +01:00
Guillaume Nodet 979fc9a5b6
[MNG-7983] Switch to slf4j-api 2 (#1358) 2024-01-09 07:36:58 +01:00
Guillaume Nodet 782e8679bf
[MNG-7995] Switch to JLine to provide line editing (#1279) 2024-01-08 11:37:09 +01:00
Karl Heinz Marbaise 23d13fb322
[MNG-7989] - Making this build non-interactive, because the environment variable CI equals true. 2023-12-22 19:12:21 +01:00
Tamas Cservenak 732e3649e1
[MNG-7980] CLI switch to ignore transitive repositories. (#1354)
If set, Maven will ignore all remote repositories introduced by
transitive dependencies POM.

---

https://issues.apache.org/jira/browse/MNG-7980
2023-12-20 14:03:57 +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 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
Tamas Cservenak c4f62ff7c8
[MNG-7953] Classpath ordering delegated to Resolver (#1332)
Remove all ordering from Maven and delegate it to Resolver.

Supersedes https://github.com/apache/maven/pull/1212

This PR makes Maven completely rely on Resolver to order artifacts on classpath (before this PR it was several spots where explicit ordering was applied without ability to affect it). This PR makes now Maven completely rely on Resolver, never "sort" artifacts on it's own, but use resolver result, that in turn depends on session config.

Example invocation:
```
$ mvn -X package -Daether.system.dependencyVisitor=levelOrder
```

Would make Maven use "levelOrder".

Example of default (preOrder, as before) and new levelOlder (new in 2.0): notice how tree is same, but resulting artifact list (and hence, order on classpath) is different:
https://gist.github.com/cstamas/c88ca550006e53edad5b16973b54c349

The new resolver configuration is documented here:
https://maven.apache.org/resolver-archives/resolver-2.0.0-alpha-3/configuration.html
(property No 62)

---

https://issues.apache.org/jira/browse/MNG-7953
2023-12-07 16:07:51 +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
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
Karl Heinz Marbaise b08b62f8de
[MNG-7940] - Maven embedder CLI output contains nulls. 2023-11-18 14:15:19 +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 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
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
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
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 32d67322ef
[MNG-7891] Abstract ExtensionConfigurationModule from CliRequest (#1272)
Follow-up to MNG-7891 to make Maven Daemon integration easier.
2023-10-17 19:53:33 +02:00
Slawomir Jaranowski 523f8b7dc0 [MNG-7898] Missing .mvn directory should not be reported in quiet mode 2023-10-10 12:11:44 +02:00