Skip to content

Commit 249865a

Browse files
authored
Merge branch 'spring-projects:main' into fix_alias_x509_extended_key_manager
2 parents 5e82fdb + 86a8c9e commit 249865a

File tree

322 files changed

+4899
-2047
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

322 files changed

+4899
-2047
lines changed

.github/actions/publish-gradle-plugin/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ runs:
2121
using: composite
2222
steps:
2323
- name: Set Up JFrog CLI
24-
uses: jfrog/setup-jfrog-cli@f748a0599171a192a2668afee8d0497f7c1069df # v4.5.6
24+
uses: jfrog/setup-jfrog-cli@45d604504ed4cf717138383936c447afab73a0be # v4.5.10
2525
env:
2626
JF_ENV_SPRING: ${{ inputs.jfrog-cli-config-token }}
2727
- name: Download Artifacts

.github/actions/sync-to-maven-central/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020
using: composite
2121
steps:
2222
- name: Set Up JFrog CLI
23-
uses: jfrog/setup-jfrog-cli@f748a0599171a192a2668afee8d0497f7c1069df # v4.5.6
23+
uses: jfrog/setup-jfrog-cli@45d604504ed4cf717138383936c447afab73a0be # v4.5.10
2424
env:
2525
JF_ENV_SPRING: ${{ inputs.jfrog-cli-config-token }}
2626
- name: Download Release Artifacts

.github/workflows/build-and-deploy-snapshot.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Build and Deploy Snapshot
22
on:
3+
workflow_dispatch:
34
push:
45
branches:
56
- main

.github/workflows/release-milestone.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
build-and-stage-release:
1111
name: Build and Stage Release
1212
if: ${{ github.repository == 'spring-projects/spring-boot' }}
13-
runs-on: ${{ vars.UBUNTU_MEDIUIM || 'ubuntu-latest' }}
13+
runs-on: ${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }}
1414
steps:
1515
- name: Check Out Code
1616
uses: actions/checkout@v4
@@ -56,7 +56,7 @@ jobs:
5656
runs-on: ${{ vars.UBUNTU_SMALL || 'ubuntu-latest' }}
5757
steps:
5858
- name: Set up JFrog CLI
59-
uses: jfrog/setup-jfrog-cli@f748a0599171a192a2668afee8d0497f7c1069df # v4.5.6
59+
uses: jfrog/setup-jfrog-cli@45d604504ed4cf717138383936c447afab73a0be # v4.5.10
6060
env:
6161
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
6262
- name: Promote build

.github/workflows/release.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ jobs:
3636
signing-passphrase: ${{ secrets.GPG_PASSPHRASE }}
3737
uri: ${{ vars.COMMERCIAL_DEPLOY_REPO_URL || 'https://repo.spring.io' }}
3838
username: ${{ vars.COMMERCIAL && secrets.COMMERCIAL_ARTIFACTORY_USERNAME || secrets.ARTIFACTORY_USERNAME }}
39+
- name: Send Notification
40+
if: failure()
41+
uses: ./.github/actions/send-notification
42+
with:
43+
run-name: ${{ format('{0} | Release Staging | {1}', github.ref_name, inputs.version) }}
44+
status: ${{ job.status }}
45+
webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
3946
outputs:
4047
version: ${{ steps.build-and-publish.outputs.version }}
4148
verify:
@@ -78,7 +85,7 @@ jobs:
7885
runs-on: ${{ vars.UBUNTU_SMALL || 'ubuntu-latest' }}
7986
steps:
8087
- name: Set up JFrog CLI
81-
uses: jfrog/setup-jfrog-cli@f748a0599171a192a2668afee8d0497f7c1069df # v4.5.6
88+
uses: jfrog/setup-jfrog-cli@45d604504ed4cf717138383936c447afab73a0be # v4.5.10
8289
env:
8390
JF_ENV_SPRING: ${{ vars.COMMERCIAL && secrets.COMMERCIAL_JF_ARTIFACTORY_SPRING || secrets.JF_ARTIFACTORY_SPRING }}
8491
- name: Promote open source build

.sdkmanrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Enable auto-env through the sdkman_auto_env config
22
# Add key=value pairs of SDKs to use below
3-
java=17.0.14-librca
3+
java=17.0.15-librca

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2025 the original author or authors.
2+
* Copyright 2012-2025 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.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2023 the original author or authors.
2+
* Copyright 2012-2025 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.

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
* <li>{@link Test} tasks are configured:
7474
* <ul>
7575
* <li>to use JUnit Platform
76-
* <li>with a max heap of 1024M
76+
* <li>with a max heap of 1536M
7777
* <li>to run after any Checkstyle and format checking tasks
7878
* <li>to enable retries with a maximum of three attempts when running on CI
7979
* <li>to use predictive test selection when the value of the
@@ -186,7 +186,7 @@ private String determineImplementationTitle(Project project, Set<String> sourceJ
186186
private void configureTestConventions(Project project) {
187187
project.getTasks().withType(Test.class, (test) -> {
188188
test.useJUnitPlatform();
189-
test.setMaxHeapSize("1024M");
189+
test.setMaxHeapSize("1536M");
190190
project.getTasks().withType(Checkstyle.class, test::mustRunAfter);
191191
project.getTasks().withType(CheckFormat.class, test::mustRunAfter);
192192
configureTestRetries(test);

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024-2025 the original author or authors.
2+
* Copyright 2012-2025 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.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021-2024 the original author or authors.
2+
* Copyright 2012-2025 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.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2023 the original author or authors.
2+
* Copyright 2012-2025 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.

buildSrc/src/main/java/org/springframework/boot/build/architecture/ArchitectureCheck.java

+38-8
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@
1818

1919
import java.io.File;
2020
import java.io.IOException;
21+
import java.net.URL;
22+
import java.net.URLClassLoader;
2123
import java.nio.file.Files;
2224
import java.nio.file.Path;
2325
import java.nio.file.StandardOpenOption;
26+
import java.util.ArrayList;
2427
import java.util.Collections;
2528
import java.util.List;
29+
import java.util.concurrent.Callable;
2630
import java.util.function.Supplier;
2731
import java.util.stream.Stream;
2832

@@ -33,11 +37,13 @@
3337
import org.gradle.api.DefaultTask;
3438
import org.gradle.api.Task;
3539
import org.gradle.api.Transformer;
40+
import org.gradle.api.file.ConfigurableFileCollection;
3641
import org.gradle.api.file.DirectoryProperty;
3742
import org.gradle.api.file.FileCollection;
3843
import org.gradle.api.file.FileTree;
3944
import org.gradle.api.provider.ListProperty;
4045
import org.gradle.api.provider.Property;
46+
import org.gradle.api.tasks.Classpath;
4147
import org.gradle.api.tasks.IgnoreEmptyDirectories;
4248
import org.gradle.api.tasks.Input;
4349
import org.gradle.api.tasks.InputFiles;
@@ -58,6 +64,7 @@
5864
* @author Scott Frederick
5965
* @author Ivan Malutin
6066
* @author Phillip Webb
67+
* @author Dmytro Nosan
6168
*/
6269
public abstract class ArchitectureCheck extends DefaultTask {
6370

@@ -80,14 +87,17 @@ private List<String> asDescriptions(List<ArchRule> rules) {
8087
}
8188

8289
@TaskAction
83-
void checkArchitecture() throws IOException {
84-
JavaClasses javaClasses = new ClassFileImporter().importPaths(classFilesPaths());
85-
List<EvaluationResult> violations = evaluate(javaClasses).filter(EvaluationResult::hasViolation).toList();
86-
File outputFile = getOutputDirectory().file("failure-report.txt").get().getAsFile();
87-
writeViolationReport(violations, outputFile);
88-
if (!violations.isEmpty()) {
89-
throw new VerificationException("Architecture check failed. See '" + outputFile + "' for details.");
90-
}
90+
void checkArchitecture() throws Exception {
91+
withCompileClasspath(() -> {
92+
JavaClasses javaClasses = new ClassFileImporter().importPaths(classFilesPaths());
93+
List<EvaluationResult> violations = evaluate(javaClasses).filter(EvaluationResult::hasViolation).toList();
94+
File outputFile = getOutputDirectory().file("failure-report.txt").get().getAsFile();
95+
writeViolationReport(violations, outputFile);
96+
if (!violations.isEmpty()) {
97+
throw new VerificationException("Architecture check failed. See '" + outputFile + "' for details.");
98+
}
99+
return null;
100+
});
91101
}
92102

93103
private List<Path> classFilesPaths() {
@@ -98,6 +108,22 @@ private Stream<EvaluationResult> evaluate(JavaClasses javaClasses) {
98108
return getRules().get().stream().map((rule) -> rule.evaluate(javaClasses));
99109
}
100110

111+
private void withCompileClasspath(Callable<?> callable) throws Exception {
112+
ClassLoader previous = Thread.currentThread().getContextClassLoader();
113+
try {
114+
List<URL> urls = new ArrayList<>();
115+
for (File file : getCompileClasspath().getFiles()) {
116+
urls.add(file.toURI().toURL());
117+
}
118+
ClassLoader classLoader = new URLClassLoader(urls.toArray(new URL[0]), getClass().getClassLoader());
119+
Thread.currentThread().setContextClassLoader(classLoader);
120+
callable.call();
121+
}
122+
finally {
123+
Thread.currentThread().setContextClassLoader(previous);
124+
}
125+
}
126+
101127
private void writeViolationReport(List<EvaluationResult> violations, File outputFile) throws IOException {
102128
outputFile.getParentFile().mkdirs();
103129
StringBuilder report = new StringBuilder();
@@ -126,6 +152,10 @@ final FileTree getInputClasses() {
126152
return this.classes.getAsFileTree();
127153
}
128154

155+
@InputFiles
156+
@Classpath
157+
public abstract ConfigurableFileCollection getCompileClasspath();
158+
129159
@Optional
130160
@InputFiles
131161
@PathSensitive(PathSensitivity.RELATIVE)

buildSrc/src/main/java/org/springframework/boot/build/architecture/ArchitecturePlugin.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 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.
@@ -49,6 +49,7 @@ private void registerTasks(Project project) {
4949
TaskProvider<ArchitectureCheck> checkPackageTangles = project.getTasks()
5050
.register("checkArchitecture" + StringUtils.capitalize(sourceSet.getName()), ArchitectureCheck.class,
5151
(task) -> {
52+
task.getCompileClasspath().from(sourceSet.getCompileClasspath());
5253
task.setClasses(sourceSet.getOutput().getClassesDirs());
5354
task.getResourcesDirectory().set(sourceSet.getOutput().getResourcesDir());
5455
task.dependsOn(sourceSet.getProcessResourcesTaskName());

buildSrc/src/main/java/org/springframework/boot/build/architecture/ArchitectureRules.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024-2025 the original author or authors.
2+
* Copyright 2012-2025 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.
@@ -136,8 +136,11 @@ private static void allBeanPostProcessorBeanMethodsShouldBeStaticAndNotCausePrem
136136

137137
private static DescribedPredicate<JavaClass> notAnnotatedWithRoleInfrastructure() {
138138
return is("not annotated with @Role(BeanDefinition.ROLE_INFRASTRUCTURE", (candidate) -> {
139+
if (!candidate.isAnnotatedWith(Role.class)) {
140+
return true;
141+
}
139142
Role role = candidate.getAnnotationOfType(Role.class);
140-
return (role == null) || (role.value() != BeanDefinition.ROLE_INFRASTRUCTURE);
143+
return role.value() != BeanDefinition.ROLE_INFRASTRUCTURE;
141144
});
142145
}
143146

buildSrc/src/main/java/org/springframework/boot/build/bom/ResolvedBom.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025-2025 the original author or authors.
2+
* Copyright 2012-2025 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.

buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/MoveToSnapshots.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021-2025 the original author or authors.
2+
* Copyright 2012-2025 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.

buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/ReleaseSchedule.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2023 the original author or authors.
2+
* Copyright 2012-2025 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.

buildSrc/src/main/java/org/springframework/boot/build/classpath/CheckClasspathForUnconstrainedDirectDependencies.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 the original author or authors.
2+
* Copyright 2012-2025 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.

buildSrc/src/main/java/org/springframework/boot/build/properties/BuildProperties.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024-2024 the original author or authors.
2+
* Copyright 2012-2025 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.

buildSrc/src/main/java/org/springframework/boot/build/properties/BuildType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024-2024 the original author or authors.
2+
* Copyright 2012-2025 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.

0 commit comments

Comments
 (0)