Skip to content

Commit 1be8c8f

Browse files
committed
Merge branch '2.4.x'
See gh-26261
2 parents c548693 + 4417e16 commit 1be8c8f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.io.InputStream;
2222
import java.nio.file.Files;
2323
import java.nio.file.Path;
24+
import java.nio.file.StandardCopyOption;
2425
import java.util.Arrays;
2526
import java.util.Collections;
2627
import java.util.List;
@@ -154,14 +155,13 @@ private void configureTestConventions(Project project) {
154155
project.getTasks().withType(Test.class, (test) -> {
155156
test.useJUnitPlatform();
156157
test.setMaxHeapSize("1024M");
157-
CopyJdk8156584SecurityProperties copyJdk8156584SecurityProperties = new CopyJdk8156584SecurityProperties(
158-
project);
159158
if (buildingWithJava8(project)) {
159+
CopyJdk8156584SecurityProperties copyJdk8156584SecurityProperties = new CopyJdk8156584SecurityProperties(
160+
project);
160161
test.systemProperty("java.security.properties",
161162
"file:" + test.getWorkingDir().toPath().relativize(copyJdk8156584SecurityProperties.output));
162-
test.setDebug(true);
163+
test.doFirst(copyJdk8156584SecurityProperties);
163164
}
164-
test.doFirst(copyJdk8156584SecurityProperties);
165165
});
166166
project.getPlugins().withType(JavaPlugin.class, (javaPlugin) -> project.getDependencies()
167167
.add(JavaPlugin.TEST_RUNTIME_ONLY_CONFIGURATION_NAME, "org.junit.platform:junit-platform-launcher"));
@@ -251,7 +251,7 @@ private CopyJdk8156584SecurityProperties(Project project) {
251251
public void execute(Task task) {
252252
try (InputStream input = getClass().getClassLoader()
253253
.getResourceAsStream(CopyJdk8156584SecurityProperties.SECURITY_PROPERTIES_FILE_NAME)) {
254-
Files.copy(input, this.output);
254+
Files.copy(input, this.output, StandardCopyOption.REPLACE_EXISTING);
255255
}
256256
catch (IOException ex) {
257257
throw new RuntimeException(ex);

0 commit comments

Comments
 (0)