Skip to content

Commit a65c641

Browse files
committed
Disable Grade Build caching for release steps.
Closes #69
1 parent 61cc755 commit a65c641

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/org/springframework/data/release/build/MavenRuntime.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package org.springframework.data.release.build;
1717

18+
import static org.springframework.data.release.build.CommandLine.Argument.*;
19+
1820
import lombok.RequiredArgsConstructor;
1921
import lombok.SneakyThrows;
2022
import lombok.extern.slf4j.Slf4j;
@@ -155,6 +157,7 @@ private String runVersionCommand() throws MavenInvocationException {
155157

156158
public MavenInvocationResult execute(Project project, CommandLine arguments) {
157159

160+
158161
logger.log(project, "📦 Executing mvn %s", arguments.toString());
159162

160163
try (MavenLogger mavenLogger = getLogger(project, arguments.getGoals())) {
@@ -170,7 +173,9 @@ public MavenInvocationResult execute(Project project, CommandLine arguments) {
170173
mavenLogger.info(String.format("Java Home: %s", jdk));
171174
mavenLogger.info(String.format("Executing: mvn %s", arguments));
172175

173-
mvn.setGoals(arguments.toCommandLine(it -> properties.getFullyQualifiedPlugin(it.getGoal())));
176+
CommandLine disabledGradleBuildCache = arguments.and(arg("gradle.cache.local.enabled=false")).and(arg("gradle.cache.remote.enabled=false"));
177+
178+
mvn.setGoals(disabledGradleBuildCache.toCommandLine(it -> properties.getFullyQualifiedPlugin(it.getGoal())));
174179
});
175180

176181
if (result.getExitCode() != 0) {

0 commit comments

Comments
 (0)