mirror of https://github.com/apache/maven.git
[MNG-7698] Support comments in maven.config (#1134)
This commit is contained in:
parent
84e133df7c
commit
c124554316
|
@ -388,7 +388,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