diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AotGenerateMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AotGenerateMojo.java index e7eb3a30cf..6864f6668f 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AotGenerateMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AotGenerateMojo.java @@ -155,8 +155,8 @@ public class AotGenerateMojo extends AbstractRunMojo { JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); try (StandardJavaFileManager fm = compiler.getStandardFileManager(null, null, null)) { List options = List.of("-cp", - Arrays.stream(classpathUrls).map(URL::toString).collect(Collectors.joining(":")), "-d", - this.classesDirectory.toPath().toAbsolutePath().toString()); + Arrays.stream(classpathUrls).map(URL::toString).collect(Collectors.joining(File.pathSeparator)), + "-d", this.classesDirectory.toPath().toAbsolutePath().toString()); Iterable compilationUnits = fm.getJavaFileObjectsFromPaths(sourceFiles); Errors errors = new Errors(); CompilationTask task = compiler.getTask(null, fm, errors, options, null, compilationUnits);