Commit Graph

847 Commits

Author SHA1 Message Date
Tamas Cservenak 79556ddc6b
[MNG-7774] Maven config and command line interpolation (#1098)
Reuse as much as possible from master, but keep existing stuff like multiModuleProjectDirectory alone.

Changes:
* interpolate user properties and arguments
* introduce session.topDirectory and session.rootDirectory expressions (for interpolation only)
* Maven fails to start if any of the new properties are undefined but their use is attempted
* leave everything else untouched

---

https://issues.apache.org/jira/browse/MNG-7774
2023-05-05 14:01:38 +02:00
Tamas Cservenak 5a552315f1
[MNG-7713] Make Maven fail if option present (#1021)
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:30:04 +01:00
Tamas Cservenak 175b35c374
[maven-3.9.x] [MNG-7713] Drop legacy-local-repository option (#1018)
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:20:19 +01:00
Andrey Bruykhov 0a299275e3 Close stream with try-with-resources
This closes #997
2023-02-17 21:03:21 +01:00
Andrey Bruykhov fbf6bdaf01 [MNG-7686] Speed up by replacing non-pattern #replaceAll() with #replace() or precompiled patterns
This closes #984
2023-02-07 22:10:29 +01:00
Tamas Cservenak e9d570889f Reformat 2023-01-31 10:22:08 +01:00
Michael Osipov a3f88234d4 Add TODO about property source of maven.repo.local 2023-01-01 20:01:37 +01:00
Michael Osipov 074879ff28 [MNG-7651] Simplify and document merge of maven.config file and CLI args
This closes #939
2022-12-29 21:30:04 +01:00
Michael Osipov 331c5c3435 [MNG-7131] maven.config doesn't handle arguments with spaces in them
Since we don't have a clear specification of the file format change
reading of the file to a one-arg-per-line basis just like Java's
@argfiles or Python's argparse would handle it.
Consider that jvm.config suffers from the same issue its parsing is not
portable between Bourne shell and Windows Command prompt.
2022-12-26 21:00:34 +01:00
Tamas Cservenak a23ff0f9a2
[MNG-7618][MNG-7624] Backport to Maven 3.9.x (#937)
These changes are making IT suite to fail with maven-3.9.x.

OTOH, the change is nearly trivial, while value is high, so let's
backport them.

---

https://issues.apache.org/jira/browse/MNG-7618
https://issues.apache.org/jira/browse/MNG-7624
2022-12-26 20:01:32 +01:00
Slawomir Jaranowski 693814f0a5 [MNG-7613] Parent POM 38 - code reformat 2022-12-02 12:54:12 +01:00
Michael Osipov 0f4387543d [MNG-7556] Clean up notion between user properties and system properties 2022-10-29 20:19:49 +02:00
Josef Cacek e1e4f5bda0 [MNG-7511] Ensure the degreeOfConcurrency is a positive number in MavenExecutionRequest
This closes #767
2022-07-18 22:35:28 +02:00
Hervé Boutemy c9a3e0e45b [MNG-7501] add relative path to pom.xml in module build start output 2022-06-26 18:38:40 +02:00
Guillaume Nodet 115febf29b [MNG-7160] Ability to customize core extensions classloaders (#616) 2022-06-18 12:30:40 +02:00
Karl Heinz Marbaise 7d6f281fe3 [MNG-6826] Remove condition check for JDK8+ in FileSizeFormatTest 2022-03-06 21:12:40 +01:00
Christoph Läubrich a5acd3ec60 [MNG-7395] Support interpolation in extensions.xml
This adds support for property interpolation in extensions.xml to allow
advanced use cases where one wants to contribute certain things via the
commandline.

This closes #673
2022-02-19 21:41:18 +01:00
Guillaume Nodet 8456294977
[MNG-6326] Make the build fail if core extensions can not be loaded (#648) 2022-01-07 09:51:21 +01:00
Michael Osipov 7a8acdd8e6 [MNG-7181] Make --version support -q 2021-07-03 19:20:23 +02:00
Michael Osipov 7b355f7223 [MNG-7180] Make --color option behave more like BSD/GNU grep's --color option 2021-07-03 18:53:54 +02:00
Artem Krosheninnikov 9ae1d95a58 [MNG-6844] Use StandardCharsets and remove outdated @SuppressWarnings
This closes #312
2021-07-02 14:53:16 +02:00
huangkaifeng 2a2392f15e [MNG-6873] Align JUnit version to 4.13
Closes #331
2021-07-02 14:50:25 +02:00
Rostislav Krasny 01780c0ff3 [MNG-6853] - Don't box primitives where it's not needed
Closes #318
2021-07-02 10:42:27 +02:00
Carlos Chacin 484e502737 [MNG-7127] fix MavenCliTest.testStyleColors test in JDK 16
The MavenCliTest.testStyleColors is not failing when the build
is under JDK 8 or JDK 11.

After changing to JDK 16, the test fails, this commit is to fix
the NullPointerException.

Tested on JDK 8, 11 adn 16 with:

`mvn clean verify`
2021-06-30 22:30:37 +02:00
Guillaume Nodet f98e632108 [MNG-7080] Add a --color option to simplify color support 2021-06-30 22:16:22 +02:00
Guillaume Nodet 39254860d6 [MNG-7032] Evaluate --help and --version after configuring the logging/color 2021-06-30 21:57:55 +02:00
Artem Krosheninnikov d4ad077ef5 [MNG-6816] Prefer System.lineSeparator() over system properties
This closes #300
2021-06-26 23:41:16 +02:00
Sylwester Lachiewicz 68e02c27e1 [MNG-6071] Normalize relative paths for working directory 2021-06-26 21:11:40 +02:00
Hervé Boutemy 53ccee3486 [MNG-6778] use https for schema location 2019-11-09 13:45:14 +01:00
Anatoly Zaretsky 877fcc9cd5
[MNG-6777] - Remove duplicate resolveFile methods
o MavenCli.resolveFile and
   configuration.SettingsXmlConfigurationProcessor.resolveFile
   utility methods are identical. Moving them into separate
   ResolveFile class.
2019-10-10 19:53:44 +02:00
Michael Osipov 400e7e5979 [MNG-6747] Generalize 'resume from' message when build reactor fails 2019-08-27 09:08:57 +02:00
Joseph Walton 353d3eaa8f [MNG-6685] Convert Maven Model Builder to JSR 330
This closes #256
2019-06-23 00:20:54 +02:00
Sylwester Lachiewicz 59bd396e6e [MNG-6686] Convert Maven Embedder to JSR 330
This closes #257
2019-06-21 23:57:49 +02:00
rfscholte ff8c5c8706 MNG-6069: unittest with compact and spaced -D options 2019-05-17 22:09:48 +02:00
Joseph Walton 658301276a [MNG-6069] Avoid (some) deprecated commons-cli methods
Switch from OptionBuilder to Option.Builder. Confirm by
inspection that the resulting Option objects are the same.

For now, leave GnuParser. Despite the upgrade advice in the GnuParser
Javadoc ("since 1.3, use the DefaultParser instead"), it behaves
differently.

Closes #247
2019-05-17 22:09:48 +02:00
Raymond Auge 95401cf7a6 [MNG-6605] Unable to suppress download/upload messages (in interactive mode)
This closes #239
2019-04-01 08:47:10 +02:00
Sylwester Lachiewicz b7249aff22 Revert [MNG-6069] Migrate to non deprecated parts of Commons CLI
This reverts commit 396291bba0 due to regression
2019-02-01 21:41:23 +01:00
Guy Brand 15c647182a [MNG-6558] ToolchainsBuildingResult event is not sent on EventSpy
Closes #231
2019-01-27 12:01:35 +01:00
Sylwester Lachiewicz 396291bba0 [MNG-6069] Migrate to non deprecated parts of Commons CLI (#153) 2019-01-13 21:19:39 +01:00
HoaPhan ba74b96633
[MNG-6492] - Minor improvement on Array construction, conversion performance 2018-10-24 18:07:13 +02:00
Karl Heinz Marbaise 23f5c88d11
[MNG-6391] - Printout version of last built module in reactor build 2018-10-20 10:12:45 +02:00
Christian Schulte 44826ab446 [MNG-6164] Collections inconsistently immutable
Make non-empty collections returned immutable just like those returned by
java.util.Collections.
2018-10-09 22:12:50 +02:00
rfscholte 72dca39807 Replace org.apache.commons.lang3.Validate#notNull with java.util.Objects#requireNonNull 2018-07-15 10:36:08 +02:00
Łukasz Dywicki 864d180edf [MNG-6410] Add groupId to --resume-from suggestion if artifactId is not unique in reactor
This closes #166
2018-05-20 21:50:17 +02:00
Michael Osipov 9abfc88425 [MNG-5756] Java home output in mvn -v is misleading
The Java home displayed corresponds to the property 'java.home' which points to
the JRE installation running the given Maven instance. It is not the value of
$JAVA_HOME which causes confusion.

Ref: https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html

This closes #115 and #117.
2018-05-07 23:42:20 +02:00
Karl Heinz Marbaise 9c118d34c9
[MNG-6363] - Remove secret thread configuration property from code 2018-04-22 22:55:33 +02:00
Karl Heinz Marbaise 8f619acd3a [MNG-6352] - Printout version information at the end of the build 2018-02-17 19:27:52 +01:00
rfscholte cd34b08df1 Merge remote-tracking branch 'remotes/origin/MNG-6353' 2018-02-11 18:29:43 +01:00
Sylwester Lachiewicz b8c06e61ab Remove Google Guava usage (move to Java7) 2018-02-11 11:54:17 +01:00
Sylwester Lachiewicz d925081794 Reduce number of global checkstyle rule violations
Fix code for following checkstyle rules:
ConstantName, FileLength, InnerAssignment, JavadocType, MagicNumber, MethodLength, MethodName, NewlineAtEndOfFile, ParameterNumber, RedundantThrows, VisibilityModifier

Fixes #149
2018-02-11 11:41:16 +01:00