Skip to content

Commit

Permalink
[MNG-7698] Allow comments in .mvn/maven.config
Browse files Browse the repository at this point in the history
  • Loading branch information
cstamas committed Jun 2, 2023
1 parent 23a3a91 commit b36d634
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ void cli(CliRequest cliRequest) throws Exception {

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()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# a comment
-T
3
-Drevision=1.3.0
Expand Down

0 comments on commit b36d634

Please sign in to comment.