mirror of https://github.com/apache/maven.git
[MNG-7698] Allow comments in .mvn/maven.config (#1141)
Backport of https://github.com/apache/maven/pull/1134 --- https://issues.apache.org/jira/browse/MNG-7698
This commit is contained in:
parent
76b27ec321
commit
3c29fa5e74
|
@ -382,7 +382,8 @@ public class MavenCli {
|
|||
|
||||
if (configFile.isFile()) {
|
||||
try (Stream<String> lines = Files.lines(configFile.toPath(), Charset.defaultCharset())) {
|
||||
String[] args = lines.filter(arg -> !arg.isEmpty()).toArray(String[]::new);
|
||||
String[] args = lines.filter(arg -> !arg.isEmpty() && !arg.startsWith("#"))
|
||||
.toArray(String[]::new);
|
||||
mavenConfig = cliManager.parse(args);
|
||||
List<?> unrecognized = mavenConfig.getArgList();
|
||||
if (!unrecognized.isEmpty()) {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# a comment
|
||||
-T
|
||||
3
|
||||
-Drevision=1.3.0
|
||||
|
|
Loading…
Reference in New Issue