Skip to content

Commit 75012c5

Browse files
committed
Attempt to fix Windows build error with Antora
See gh-33766
1 parent edfc5f6 commit 75012c5

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
7373
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
7474
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
75-
run: ./gradlew build ${{ runner.os == 'Windows' && '--exclude-task antora' || ''}}
75+
run: ./gradlew build
7676
- name: Send notification
7777
uses: ./.github/actions/send-notification
7878
if: always()

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,9 @@ private void configureAntoraExtension(Project project, AntoraExtension antoraExt
141141
if (project.getGradle().getStartParameter().getLogLevel() != LogLevel.DEBUG) {
142142
antoraExtension.getOptions().add("--quiet");
143143
}
144-
antoraExtension.getOptions().addAll("--stacktrace");
145-
antoraExtension.getOptions().addAll("--log-level", "all");
144+
else {
145+
antoraExtension.getOptions().addAll("--log-level", "all");
146+
}
146147
}
147148

148149
private void configureNodeExtension(Project project, NodeExtension nodeExtension) {

spring-boot-project/spring-boot-docs/build.gradle

+7-3
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,13 @@ def antoraRootAggregateContent = tasks.register("antoraRootAggregateContent", Zi
294294
}
295295
from(project.configurations.configurationProperties) {
296296
eachFile {
297-
it.path = it.file.toString()
298-
.replaceFirst('/build/(?:classes|resources)/java/main/', '/')
299-
.replaceFirst('^.*/([^/]+)/META-INF/(spring-configuration-metadata\\.json)$', 'modules/ROOT/partials/$1/$2')
297+
it.path = rootProject
298+
.projectDir
299+
.toPath()
300+
.relativize(it.file.toPath())
301+
.toString()
302+
.replace('\\', '/')
303+
.replaceAll('.*\\/([^\\/]+)\\/build.*', 'modules/ROOT/partials/$1/spring-configuration-metadata.json')
300304
}
301305
}
302306
from(runRemoteSpringApplicationExample) {

0 commit comments

Comments
 (0)