Open Marcono1234 opened 4 months ago
Note that this is not blocking for me, since there exists a workaround as described above, and I only needed it for testing the documentation changes in #15325.
Though maybe if possible it would be good nonetheless to solve this, to avoid issues for new contributors.
Thanks, @Marcono1234, for the report. I don't have a WIndows machine to test, though I agree that we want contributors that use Windows to be able to update the documentation. Could you do me a favor to get a quick theory out of the way?
Change
command: gradlew -q -PbuildSrc.skipTests=true "-Dorg.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError" :spring-security-docs:generateAntoraYml
to
command: gradlew -q -PbuildSrc.skipTests=true -Dorg.gradle.jvmargs="-Xmx3g -XX:+HeapDumpOnOutOfMemoryError" :spring-security-docs:generateAntoraYml
and then try again.
Otherwise, given that this file uses standard Antora properties, it seems more likely that this is a bug in Antora. It may be best to reach out to the Antora community and file a ticket there.
Thanks for the suggestion! Unfortunately it looks like your proposed change did not help. I have created an issue in the Antora project: https://gitlab.com/antora/antora-collector-extension/-/issues/18
Do you want to keep this issue here open until this is resolved in some way and the documentation build for this Spring project works on Windows?
The maintainer has closed the Antora issue saying that they cannot fix this / don't want to spend more time on this at the moment.
Do you think it would be possible to change the command here in this Spring project in some way to work on Windows too? The Antora maintainer also suggested https://chat.antora.org/ for help.
Or if not, maybe it would at least be useful to mention in the README here that the command might not work on Windows. What do you think?
Describe the bug Building the documentation using Antora with
./gradlew :spring-security-docs:antora
fails on Windows:Setup:
To Reproduce On Windows:
main
branch of this repositoryExpected behavior The build should succeed
Potential cause and workaround This error seems to be related to the
command
value in thedocs/antora.yml
file. Based on the error message printed to console, it seems"
around the JVM args got lost, and therefore Gradle considered-XX:+HeapDumpOnOutOfMemoryError
to be an argument to Gradle itself and not the JVM.Workaround: Edit the
docs/antora.yml
file and remove"-Dorg.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError"
.