-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MNG-8594] Add atFile option #2131
Conversation
Where user can create ad-hoc command line parms. The difference between .mvn/maven.conf and this file is that this file allws goals as well. The CLI and atFile are merged, in this order, hence, goals in atFile will come AFTER goals specified on CLI. --- https://issues.apache.org/jira/browse/MNG-8594
Looks good, that can be handy ! |
@gnodet Added IT, that revealed precedence issue in case of User Properties ( |
@@ -181,7 +181,9 @@ protected Optional<Map<String, String>> collectMapIfPresentOrEmpty( | |||
Optional<Map<String, String>> up = getter.apply(option); | |||
if (up.isPresent()) { | |||
had++; | |||
items.putAll(up.get()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was putAll, meaning property coming from lower precedence (they are in-order), overwrote already present (higher precedence) property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Where user can create ad-hoc command line parms. The difference between .mvn/maven.conf and this file is that this file allows goals as well. The CLI and atFile are merged, in this order, hence, goals in atFile will come AFTER goals specified on CLI, if CLI has them.
Source order (first wins for options, while goals are collected/aggregated from sources):
Note: option is called
af
or longat-file
for similarity withjavac @file
, but commons CLI does not support options without leading hyphen.https://issues.apache.org/jira/browse/MNG-8594