Attempt to fix Windows build error with Antora

See gh-33766
This commit is contained in:
Phillip Webb 2024-03-21 14:12:22 -07:00
parent edfc5f66c2
commit 75012c5173
3 changed files with 11 additions and 6 deletions

View File

@ -72,7 +72,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }} GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
run: ./gradlew build ${{ runner.os == 'Windows' && '--exclude-task antora' || ''}} run: ./gradlew build
- name: Send notification - name: Send notification
uses: ./.github/actions/send-notification uses: ./.github/actions/send-notification
if: always() if: always()

View File

@ -141,8 +141,9 @@ public class AntoraConventions {
if (project.getGradle().getStartParameter().getLogLevel() != LogLevel.DEBUG) { if (project.getGradle().getStartParameter().getLogLevel() != LogLevel.DEBUG) {
antoraExtension.getOptions().add("--quiet"); antoraExtension.getOptions().add("--quiet");
} }
antoraExtension.getOptions().addAll("--stacktrace"); else {
antoraExtension.getOptions().addAll("--log-level", "all"); antoraExtension.getOptions().addAll("--log-level", "all");
}
} }
private void configureNodeExtension(Project project, NodeExtension nodeExtension) { private void configureNodeExtension(Project project, NodeExtension nodeExtension) {

View File

@ -294,9 +294,13 @@ def antoraRootAggregateContent = tasks.register("antoraRootAggregateContent", Zi
} }
from(project.configurations.configurationProperties) { from(project.configurations.configurationProperties) {
eachFile { eachFile {
it.path = it.file.toString() it.path = rootProject
.replaceFirst('/build/(?:classes|resources)/java/main/', '/') .projectDir
.replaceFirst('^.*/([^/]+)/META-INF/(spring-configuration-metadata\\.json)$', 'modules/ROOT/partials/$1/$2') .toPath()
.relativize(it.file.toPath())
.toString()
.replace('\\', '/')
.replaceAll('.*\\/([^\\/]+)\\/build.*', 'modules/ROOT/partials/$1/spring-configuration-metadata.json')
} }
} }
from(runRemoteSpringApplicationExample) { from(runRemoteSpringApplicationExample) {