Commit Graph

1207 Commits

Author SHA1 Message Date
Guillaume Nodet 45721a4c9b Fix possible NPE 2023-06-16 13:38:46 +02:00
Karl Heinz Marbaise 5ebbb8ff50
[MNG-7764] Small code improvements (#1088) 2023-06-16 10:54:09 +02:00
Guillaume Nodet a2d435b74a
Get rid of maven-shared-utils (#1158)
Given maven-shared-utils is being deprecated (see MSHARED-1269), we need to remove its usage in maven.  Maven core only uses the logging/message related classes from maven-shared-utils, so this PR enhance the initial v4 api with the needed interfaces and move the jansi specific code into maven-embedder.
2023-06-15 16:51:32 +02:00
Martin Kanters ac0bc5541e
[MNG-7338] Automatically activate batch-mode and make output quiet when running in CI. (#869) 2023-06-08 15:44:17 +02:00
Guillaume Nodet c124554316
[MNG-7698] Support comments in maven.config (#1134) 2023-06-04 07:10:57 +02:00
Guillaume Nodet b2953c52d5
[MNG-7795] IllegalArgumentException: 'other' has different root during plugin validation (#1133)
Checks the paths before relativizing them.
Normalize and relative before adding to result
Rename local vars
Apply to ExecutionEventLogger

---

https://issues.apache.org/jira/browse/MNG-7795

Co-authored-by: Andreas Dangel <adangel@apache.org>
2023-06-01 19:05:48 +02:00
Guillaume Nodet ba3d3516eb
[MNG-7796] Be lenient when using toRealPath (#1130) 2023-05-31 09:40:42 +02:00
Tim te Beek a8319821a9
[MNG-6829] Replace any StringUtils#isEmpty(String) and #isNotEmpty(String) (#1104)
* [MNG-6829] Replace any StringUtils#isEmpty(String) and #isNotEmpty(String)

Use this link to re-run the recipe: https://public.moderne.io/recipes/org.openrewrite.java.migrate.apache.commons.lang.IsNotEmptyToJdk?organizationId=QXBhY2hlIE1hdmVu

Co-authored-by: Moderne <team@moderne.io>

* Apply Spotless

---------

Co-authored-by: Moderne <team@moderne.io>
2023-05-09 19:46:02 -04:00
Guillaume Nodet a1fa3eb534
[MNG-6303] Interpolate all arguments using system and user supplied properties (#1062) 2023-05-05 15:12:12 +02:00
Tamas Cservenak bec53b34e3
[MNG-7038] Fixes for topDirectory (#1100)
Changes:
* resolve file argument against workingDirectory explicitly
* the check Files.isRegularFile should happen against path
2023-05-02 20:37:56 +02:00
Guillaume Nodet 2db7c85b64
[MNG-7038] Introduce public properties to point to the root and top directories of (multi-module) project (#1061)
This commit introduces three properties:

 * project.rootDirectory: the project's directory or parent directory containing a .mvn subdirectory or a pom.xml flagged with the root="true" attribute. If no such directory can be found, accessing the rootDirectory property will throw an IllegalStateException.

 * session.topDirectory : the directory of the topmost project being built, usually the current directory or the directory pointed at by the -f/--file command line argument. The topDirectory is similar to the executionRootDirectory property available on the session, but renamed to make it coherent with the new rootDirectory and to avoid using root in its name. The topDirectory property is computed by the CLI as the directory pointed at by the -f/--file command line argument, or the current directory if there's no such argument.

 * session.rootDirectory : the rootDirectory for the topDirectory project.

The topDirectory and rootDirectory properties are made available on the MavenSession / Session and deprecate the executionRootDirectory and multiModuleProjectDirectory properties. The rootDirectory should never change for a given project and is thus made available for profile activation and model interpolation (without the project. prefix, similar to basedir). The goal is also to make the rootDirectory property also available during command line arguments interpolation.

A root boolean attribute is also added to the model to indicate that the project is the root project. This attribute is only supported if the buildconsumer feature is active and removed before the pom is installed or deployed. It can be used as an alternative mechanism to the .mvn directory.
2023-04-20 12:58:12 +02:00
Karl Heinz Marbaise c49c4e0b18
[MNG-7451] - Remove public modifier from test methods / test classes 2023-04-15 19:24:20 +02:00
Guillaume Nodet b2ee29e03e [MNG-6825] Get rid of commons-lang 2023-04-06 10:51:18 +02:00
Guillaume Nodet 26056b9b20 [MNG-7756] The degree of concurrency does not support "2." as a factor
Also fix the thrown exception to report valid syntaxes without assuming the user intent (for example "0.5c" would say it's not an int...)
2023-04-06 10:51:18 +02:00
Elliotte Rusty Harold cadeab53f6
MNG-7738 don't dump raw stack traces to System.err (#1064) 2023-03-22 12:44:37 +00:00
Tim te Beek 703f814e34
[MNG-6825] Replace FileUtils with Commons IO (#1067)
* [MNG-6825] Replace FileUtils with Commons IO

Co-authored-by: Moderne <team@moderne.io>

* Minor fixes and reverts where cases are not handled yet

* Drop explicit dependencies on plexus-utils

---------

Co-authored-by: Moderne <team@moderne.io>
2023-03-19 20:19:22 +00:00
Guillaume Nodet 8052c720e7 [maven-release-plugin] prepare for next development iteration 2023-03-15 17:06:58 +01:00
Guillaume Nodet 26d10a4bf9 [maven-release-plugin] prepare release maven-4.0.0-alpha-5 2023-03-15 17:06:43 +01:00
Elliotte Rusty Harold 2d85d13ee8
MNG-7724 don't warn about unsupported SLF4J configs; no one cares (#1051) 2023-03-11 19:13:02 +00:00
Guillaume Nodet 10128b4484
Remove references to Xpp3DomBuilder and use XmlNodeBuilder instead (#1045) 2023-03-09 16:26:58 +01:00
Tamas Cservenak da64ee9c91
[MNG-7713] Make Maven fail if option present (#1021) (#1022)
As with previous PR (simple removal) the `-llr` got
interpreted as `-l lr`, it logged all output to `lr`
file. This would maean that use of `-llr` would still
sneakily 'work' and probably cause surprise down the
road to users.

Returned the option, and expicitly checking for it's
presence to be able to fail with meaningful message.

---

https://issues.apache.org/jira/browse/MNG-7713
2023-03-01 13:51:51 +01:00
Tamas Cservenak afc1a2bd86
[MNG-7713] Drop legacy-local-repository option (#1020)
There is really no need for it, and there is a resolver option if really must (but really should not, local repo is and should be considered as transient).

---

https://issues.apache.org/jira/browse/MNG-7713
2023-03-01 11:17:55 +01:00
Andrey Bruykhov b17c968a0b Close stream with try-with-resources
This closes #997
2023-02-17 20:59:36 +01:00
Andrey Bruykhov 6e25a2674b [MNG-7686] Speed up by replacing non-pattern #replaceAll() with #replace() or precompiled patterns
This closes #984
2023-02-07 21:55:12 +01:00
Guillaume Nodet fbeefb85ab [maven-release-plugin] prepare for next development iteration 2023-01-27 16:33:47 +01:00
Guillaume Nodet 009cf4a721 [maven-release-plugin] prepare release maven-4.0.0-alpha-4 2023-01-27 16:33:38 +01:00
Hervé Boutemy a7399a4d52
[MNG-7652] switch to Modello Velocity (#944) 2023-01-03 22:08:35 +01:00
Guillaume Nodet a00a44f75b
[MNG-7660] Rename Dom to XmlNode in the v4 api (#946)
* Rename Dom to XmlNode and Xpp3Dom to XmlNodeImpl
* Use XmlNodeBuilder instead of DomBuilder
2023-01-03 16:52:23 +01:00
Michael Osipov c2c6dd0921 Add TODO about property source of maven.repo.local 2023-01-01 20:00:18 +01:00
Hervé Boutemy fbdf109b34
[MNG-7571] add Maven API javadoc (#830) 2022-12-31 17:32:07 +01:00
Michael Osipov 5af08d0052 [MNG-7651] Simplify and document merge of maven.config file and CLI args
This closes #939
2022-12-29 21:27:59 +01:00
Guillaume Nodet 8150c62749 [MNG-7650] Reformat 2022-12-26 16:12:32 +01:00
Guillaume Nodet 4e38415b67
[MNG-7624] Use groupId:artifactId instead of empty goal (#911) 2022-12-15 21:18:29 +01:00
Konrad Windszus ce18c56206
[MNG-7598] Enforce binary backwards-compatibility (#874)
For now only enabled in core and plugin-api

Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
2022-12-15 10:50:39 +01:00
Guillaume Nodet 0e82026f2a [maven-release-plugin] prepare for next development iteration 2022-12-12 11:37:35 +01:00
Guillaume Nodet 2ccf57baa5 [maven-release-plugin] prepare release maven-4.0.0-alpha-3 2022-12-12 11:36:07 +01:00
Guillaume Nodet dc47da4366
[MNG-7618] Use goalPrefix instead of artifactId 4to display mojos being executed (#898) 2022-12-05 16:46:15 +01:00
Guillaume Nodet de19cfcd2b [MNG-7601] Reformat sources 2022-11-22 14:26:01 +01:00
Michael Osipov 9c60138915 [MNG-7556] Clean up notion between user properties and system properties
This closes #810
2022-10-29 20:44:15 +02:00
Guillaume Nodet 77312f323b [maven-release-plugin] prepare for next development iteration 2022-10-15 01:41:39 +02:00
Guillaume Nodet c07700ffc9 [maven-release-plugin] prepare release maven-4.0.0-alpha-2 2022-10-15 01:41:31 +02:00
Guillaume Nodet a492c9a4ff
Fix the repackaged plexus-utils groupId (#829)
* Fix plexus gav
* Install maven instead of just building it

The plugins need to be available in the local repo, else the build may download old snapshots
2022-10-15 01:20:24 +02:00
Guillaume Nodet 66851463f6 [maven-release-plugin] prepare for next development iteration 2022-10-14 22:57:05 +02:00
Guillaume Nodet 0d973fb624 [maven-release-plugin] prepare release maven-4.0.0-alpha-1 2022-10-14 22:36:41 +02:00
Martin Kanters c178b2fc1a
[MNG-7098] Keep the project counter intact when resuming a multi-module project. (#804) 2022-10-14 10:29:08 +02:00
Guillaume Nodet 3f90e7028e
Restore compatibility on SettingsBuilder, ToolchainsBuilder and MojoDescriptorCreator (#820) 2022-10-11 16:31:57 +02:00
Guillaume Nodet 2a9f39336c
[MNG-7553] New clean API with immutable model (#703) 2022-10-02 10:41:25 +02:00
Martin Kanters 1ca65c79fa Revert "[MNG-7098] Keep the project counter intact when resuming a multi-module project."
This reverts commit 4a06f1f5c3.
2022-09-16 14:51:55 +02:00
Martin Kanters 4a06f1f5c3 [MNG-7098] Keep the project counter intact when resuming a multi-module project. 2022-09-16 14:38:44 +02:00
Sylwester Lachiewicz 5502c0c8db [MNG-7502] Upgrade to Guice 5.1.0 2022-09-10 21:27:25 +02:00