in src/main/java/org/apache/maven/plugin/compiler/Options.java [383:416]
void format(final StringBuilder commandLine, final Appendable out) throws IOException {
boolean hasOptions = false;
for (String option : options) {
if (option.isBlank()) {
continue;
}
if (option.startsWith("-J")) {
if (commandLine.length() != 0) {
commandLine.append(' ');
}
commandLine.append(option);
continue;
}
if (hasOptions) {
if (option.charAt(0) == '-') {
out.append(System.lineSeparator());
} else {
out.append(' ');
}
}
boolean needsQuote = option.indexOf(' ') >= 0;
if (needsQuote) {
out.append('"');
}
out.append(option);
if (needsQuote) {
out.append('"');
}
hasOptions = true;
}
if (hasOptions) {
out.append(System.lineSeparator());
}
}