From fd887839a325196de2522a172521a4db2bbb82bf Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 26 Apr 2024 16:21:11 +0100 Subject: [PATCH] Avoid calling getProject() during execution of pMPTPR Closes gh-40543 --- .../springframework/boot/build/MavenRepositoryPlugin.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/java/org/springframework/boot/build/MavenRepositoryPlugin.java b/buildSrc/src/main/java/org/springframework/boot/build/MavenRepositoryPlugin.java index 915c3448e4a..e08af1285cf 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/MavenRepositoryPlugin.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/MavenRepositoryPlugin.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +33,8 @@ import org.gradle.api.plugins.JavaPlugin; import org.gradle.api.publish.PublishingExtension; import org.gradle.api.publish.maven.plugins.MavenPublishPlugin; +import org.springframework.util.FileSystemUtils; + /** * A plugin to make a project's {@code deployment} publication available as a Maven * repository. The repository can be consumed by depending upon the project using the @@ -112,7 +114,7 @@ public class MavenRepositoryPlugin implements Plugin { @Override public void execute(Task task) { - task.getProject().delete(this.location); + FileSystemUtils.deleteRecursively(this.location); } }