Skip to content

Commit 8f34ea4

Browse files
desruisseauxgnodet
authored andcommitted
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?
1 parent 2efeaf7 commit 8f34ea4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

maven-api-impl/src/main/java/org/apache/maven/internal/impl/PathModularizationCache.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,11 @@ Optional<String> warningForFilenameBasedAutomodules(Collection<Path> modulePaths
178178
if (automodulesDetected.isEmpty()) {
179179
return Optional.empty();
180180
}
181+
String lineSeparator = System.lineSeparator();
181182
var joiner = new StringJoiner(
182-
", ",
183-
"Filename-based automodules detected on the module-path: ",
184-
"Please don't publish this project to a public artifact repository.");
183+
lineSeparator + " - ",
184+
"Filename-based automodules detected on the module-path: " + lineSeparator + " - ",
185+
lineSeparator + "Please don't publish this project to a public artifact repository.");
185186
automodulesDetected.forEach(joiner::add);
186187
return Optional.of(joiner.toString());
187188
}

0 commit comments

Comments
 (0)