Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs zip does not contain reference html files (5.7.3) #11821

Open
fgunbin opened this issue Sep 15, 2022 · 8 comments
Open

docs zip does not contain reference html files (5.7.3) #11821

fgunbin opened this issue Sep 15, 2022 · 8 comments
Labels
in: docs An issue in Documentation or samples type: bug A general bug

Comments

@fgunbin
Copy link

fgunbin commented Sep 15, 2022

Describe the bug
README.adoc says that "./gradlew build" will build docs, but it builds only api docs. I could not find a way to build reference locally.

To Reproduce
./gradlew build

Expected behavior
docs/build/distributions/spring-security-5.7.3-docs.zip contains reference htmls

@fgunbin fgunbin added status: waiting-for-triage An issue we've not yet triaged type: bug A general bug labels Sep 15, 2022
@sjohnr
Copy link
Member

sjohnr commented Sep 16, 2022

Thanks for pointing this out, @fgunbin!

We're currently working on the docs. See this comment. Currently, you can run ./gradlew :spring-security-docs:antora to get a local build of the reference.

I believe the reference docs have not been built using the ./gradlew build command since we switched to Antora. Just to confirm, you aren't reporting an issue where this recently changed, correct?

I'll leave this open and we can decide whether we want the build task to build the reference, or if we want to update the readme to state that building the reference is a separate task (since it could take some time to include an npm build every time).

@sjohnr sjohnr added in: docs An issue in Documentation or samples and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 16, 2022
@fgunbin
Copy link
Author

fgunbin commented Sep 16, 2022

@sjohnr Thanks for your reply,

Yes, I think this changed with the switch to Antora.
Building reference with separate task seems to be ok, so perhaps only readme should be updated.

BTW, I had this error when running antora task:
error: configuration param 'antora.extensions' not declared in the schema
I had to comment out antora.extensions in docs/antora-playbook.yml to get the build success (but a bit broken docs, I suppose). Does anyone else observe this, or it's something in my environment? What additional info should I provide?

@marcusdacoregio
Copy link
Contributor

@fgunbin I think this error that you mentioned occurs if you are executing the command on a branch different than main. For now, we are limited to execute the antora commands only on the main branch.

@fgunbin
Copy link
Author

fgunbin commented Sep 27, 2022

@marcusdacoregio
Hm, on main branch the project builds successfully (with JDK 17), but
./gradlew :spring-security-docs:antora
gives this:

> Task :spring-security-docs:generateAntora FAILED

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/fgunbin/src/spring-security/docs/spring-security-docs.gradle' line: 82

* What went wrong:
Execution failed for task ':spring-security-docs:generateAntora'.
> Failed to calculate the value of task ':spring-security-docs:compileTestJava' property 'javaCompiler'.
   > class org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to class org.apache.xerces.xni.parser.XMLParserConfiguration (org.apache.xerces.parsers.XIncludeAwareParserConfiguration is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @465a9c51; org.apache.xerces.xni.parser.XMLParserConfiguration is in unnamed module of loader org.gradle.initialization.MixInLegacyTypesClassLoader @4ef37659)

@sjohnr
Copy link
Member

sjohnr commented Sep 27, 2022

Sorry @fgunbin I'm not able to reproduce that error, and ./gradlew :spring-security-docs:antora works fine on main.

$ java -version
openjdk version "17.0.4" 2022-07-19
OpenJDK Runtime Environment Temurin-17.0.4+8 (build 17.0.4+8)
OpenJDK 64-Bit Server VM Temurin-17.0.4+8 (build 17.0.4+8, mixed mode, sharing)

What Java version/distribution are you using?

@fgunbin
Copy link
Author

fgunbin commented Sep 27, 2022

@sjohnr

I'm using OpenJDK 17.0.4.1, built myself:

openjdk version "17.0.4.1-internal" 2022-08-12
OpenJDK Runtime Environment (build 17.0.4.1-internal+0-adhoc.fgunbin.jdk-17.0.4.1)
OpenJDK 64-Bit Server VM (build 17.0.4.1-internal+0-adhoc.fgunbin.jdk-17.0.4.1, mixed mode, sharing)

This JDK is not installed system-wide, I'm invoking Gradle with JAVA_HOME, like this:

JAVA_HOME=~/software/java17/jdk ./gradlew -v

------------------------------------------------------------
Gradle 7.4.2
------------------------------------------------------------

Build time:   2022-03-31 15:25:29 UTC
Revision:     540473b8118064efcc264694cbcaa4b677f61041

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          17.0.4.1-internal (Oracle Corporation 17.0.4.1-internal+0-adhoc.fgunbin.jdk-17.0.4.1)
OS:           Mac OS X 11.6.1 x86_64

I will now build & try 17.0.4.

@fgunbin
Copy link
Author

fgunbin commented Sep 28, 2022

@sjohnr The same with self-built 17.0.4. I've also tried 17.0.2 binaries from openjdk.org (https://jdk.java.net/archive/), the same error.

@sjohnr
Copy link
Member

sjohnr commented Sep 28, 2022

Bummer, sorry @fgunbin. I'm not familiar with what could be causing that error in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: docs An issue in Documentation or samples type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants