Skip to content

Commit 08768b5

Browse files
committed
Join compile classpath using system-dependent separator
See gh-30525
1 parent 6c01b34 commit 08768b5

File tree

1 file changed

+2
-2
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven

1 file changed

+2
-2
lines changed

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AotGenerateMojo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ private void compileSourceFiles(URL[] classpathUrls) throws IOException {
155155
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
156156
try (StandardJavaFileManager fm = compiler.getStandardFileManager(null, null, null)) {
157157
List<String> options = List.of("-cp",
158-
Arrays.stream(classpathUrls).map(URL::toString).collect(Collectors.joining(":")), "-d",
159-
this.classesDirectory.toPath().toAbsolutePath().toString());
158+
Arrays.stream(classpathUrls).map(URL::toString).collect(Collectors.joining(File.pathSeparator)),
159+
"-d", this.classesDirectory.toPath().toAbsolutePath().toString());
160160
Iterable<? extends JavaFileObject> compilationUnits = fm.getJavaFileObjectsFromPaths(sourceFiles);
161161
Errors errors = new Errors();
162162
CompilationTask task = compiler.getTask(null, fm, errors, options, null, compilationUnits);

0 commit comments

Comments
 (0)