More readable formatting in the warning advising users to not publish a project having auto-named dependencies.

Note: this warning is questionable. Should it be removed?
This commit is contained in:
Martin Desruisseaux 2024-08-03 12:15:47 +02:00 committed by Guillaume Nodet
parent 2efeaf75f5
commit 8f34ea4ce0
1 changed files with 4 additions and 3 deletions

View File

@ -178,10 +178,11 @@ class PathModularizationCache {
if (automodulesDetected.isEmpty()) {
return Optional.empty();
}
String lineSeparator = System.lineSeparator();
var joiner = new StringJoiner(
", ",
"Filename-based automodules detected on the module-path: ",
"Please don't publish this project to a public artifact repository.");
lineSeparator + " - ",
"Filename-based automodules detected on the module-path: " + lineSeparator + " - ",
lineSeparator + "Please don't publish this project to a public artifact repository.");
automodulesDetected.forEach(joiner::add);
return Optional.of(joiner.toString());
}