Skip to content

Commit

Permalink
Small changes from #10090.
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Bordet <[email protected]>
  • Loading branch information
sbordet committed Jul 14, 2023
1 parent 0879f6b commit 9a476e2
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,10 @@ public CommandLineBuilder getMainArgs(Set<String> parts) throws IOException

if (parts.contains("path"))
{
Classpath classpath = jettyEnvironment.getClasspath();
if (isJPMS())
{
Map<Boolean, List<Path>> dirsAndFiles = StreamSupport.stream(jettyEnvironment.getClasspath().spliterator(), false)
Map<Boolean, List<Path>> dirsAndFiles = StreamSupport.stream(classpath.spliterator(), false)
.collect(Collectors.groupingBy(Files::isDirectory));

List<Path> paths = dirsAndFiles.get(false);
Expand Down Expand Up @@ -605,10 +606,10 @@ public CommandLineBuilder getMainArgs(Set<String> parts) throws IOException

generateJpmsArgs(cmd);
}
else
else if (!classpath.isEmpty())
{
cmd.addOption("--class-path");
cmd.addArg(jettyEnvironment.getClasspath().toString());
cmd.addArg(classpath.toString());
}
}

Expand Down Expand Up @@ -685,7 +686,7 @@ else if (properties.size() > 0)
// TODO module path

for (Prop property : environment.getProperties())
cmd.addArg(property.key + "=" + property.value);
cmd.addArg(property.key, property.value);

for (Path xmlFile : environment.getXmlFiles())
cmd.addArg(xmlFile.toAbsolutePath().toString());
Expand Down

0 comments on commit 9a476e2

Please sign in to comment.