Merge branch '3.4.x'

Closes gh-44346
This commit is contained in:
Phillip Webb 2025-02-18 12:11:54 -08:00
commit a3eccf63a1
3 changed files with 7 additions and 3 deletions

View File

@ -147,7 +147,7 @@ public abstract class AbstractAotMojo extends AbstractDependencyFilterMojo {
JavaCompilerPluginConfiguration compilerConfiguration = new JavaCompilerPluginConfiguration(this.project);
List<String> options = new ArrayList<>();
options.add("-cp");
options.add(ClasspathBuilder.forURLs(classPath).build().argument());
options.add(ClasspathBuilder.forURLs(classPath).build().toString());
options.add("-d");
options.add(outputDirectory.toPath().toAbsolutePath().toString());
String releaseVersion = compilerConfiguration.getReleaseVersion();

View File

@ -335,8 +335,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
try {
Classpath classpath = ClasspathBuilder.forURLs(getClassPathUrls()).build();
if (getLog().isDebugEnabled()) {
getLog().debug("Classpath for forked process: "
+ classpath.elements().map(Object::toString).collect(Collectors.joining(File.separator)));
getLog().debug("Classpath for forked process: " + classpath);
}
args.add("-cp");
args.add(classpath.argument());

View File

@ -186,6 +186,11 @@ class ClasspathBuilder {
return this.elements.stream();
}
@Override
public String toString() {
return elements().map(Path::toString).collect(Collectors.joining(File.pathSeparator));
}
}
}