diff --git a/daemon-m39/src/main/java/org/apache/maven/cli/DaemonMavenCli.java b/daemon-m39/src/main/java/org/apache/maven/cli/DaemonMavenCli.java index 53301faa3..0ab193323 100644 --- a/daemon-m39/src/main/java/org/apache/maven/cli/DaemonMavenCli.java +++ b/daemon-m39/src/main/java/org/apache/maven/cli/DaemonMavenCli.java @@ -272,7 +272,8 @@ void cli(CliRequest cliRequest) throws Exception { if (configFile.isFile()) { try (Stream 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()) {