Skip to content

Commit fd88783

Browse files
committed
Avoid calling getProject() during execution of pMPTPR
Closes gh-40543
1 parent 3e6a9b3 commit fd88783

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

buildSrc/src/main/java/org/springframework/boot/build/MavenRepositoryPlugin.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,6 +33,8 @@
3333
import org.gradle.api.publish.PublishingExtension;
3434
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin;
3535

36+
import org.springframework.util.FileSystemUtils;
37+
3638
/**
3739
* A plugin to make a project's {@code deployment} publication available as a Maven
3840
* repository. The repository can be consumed by depending upon the project using the
@@ -112,7 +114,7 @@ private CleanAction(File location) {
112114

113115
@Override
114116
public void execute(Task task) {
115-
task.getProject().delete(this.location);
117+
FileSystemUtils.deleteRecursively(this.location);
116118
}
117119

118120
}

0 commit comments

Comments
 (0)