spring-projects / spring-data-couchbase

Provides support to increase developer productivity in Java when using Couchbase. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-couchbase
Apache License 2.0
276 stars 191 forks source link

Documentation build fails with `UTF-8 and US-ASCII` #1667

Closed mp911de closed 1 year ago

mp911de commented 1 year ago
[INFO] --- asciidoctor:2.2.2:process-asciidoc (html) @ spring-data-couchbase ---
2023-02-17T10:32:41.424Z [main] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 0 resource
[INFO] asciidoctor: WARN: template.adoc: line 92: id assigned to section already in use: template.sub-document-ops
[INFO] asciidoctor: INFO: possible invalid reference: projections
[INFO] asciidoctor: INFO: possible invalid reference: projections
[INFO] asciidoctor: INFO: possible invalid reference: couchbase.repository.multibucket
[INFO] asciidoctor: INFO: possible invalid reference: couchbase.repository.multibucket
Feb 17, 2023 10:32:52 AM org.asciidoctor.jruby.internal.JRubyAsciidoctor convertFile
SEVERE: (CompatibilityError) incompatible character encodings: UTF-8 and US-ASCII
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  31.589 s
[INFO] Finished at: 2023-02-17T10:32:52Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:2.2.2:process-asciidoc (html) on project spring-data-couchbase: Execution html of goal org.asciidoctor:asciidoctor-maven-plugin:2.2.2:process-asciidoc failed: org.jruby.exceptions.EncodingError$CompatibilityError: (CompatibilityError) incompatible character encodings: UTF-8 and US-ASCII -> [Help 1]
mikereiche commented 1 year ago

Hi @mp911de - How can I reproduce this? I am able to generate the asciidoc successfully and stage it to https://mikereiche.github.io/staged/

./mvnw clean install -Pdistribute spring-data-couchbase % ./mvnw clean install -Pdistribute [INFO] Scanning for projects... [INFO] [INFO] -----------< org.springframework.data:spring-data-couchbase >----------- [INFO] Building Spring Data Couchbase 5.1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ spring-data-couchbase --- [INFO] Deleting /Users/michaelreiche/cpick/334/xxx/spring-data-couchbase/target [INFO] [INFO] --- maven-enforcer-plugin:3.0.0:enforce (enforce-maven-version) @ spring-data-couchbase --- [INFO] [INFO] --- maven-dependency-plugin:3.3.0:unpack-dependencies (unpack-shared-resources) @ spring-data-couchbase --- [INFO] Unpacking /Users/michaelreiche/.m2/repository/org/springframework/data/build/spring-data-build-resources/3.1.0-SNAPSHOT/spring-data-build-resources-3.1.0-SNAPSHOT.zip to /Users/michaelreiche/cpick/334/xxx/spring-data-couchbase/target/shared-resources with includes "" and excludes "" [INFO] [INFO] --- maven-antrun-plugin:3.1.0:run (copy-documentation-resources) @ spring-data-couchbase --- [INFO] Executing tasks [INFO] Executed tasks [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ spring-data-couchbase --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 8 resources [INFO] [INFO] --- maven-compiler-plugin:3.10.1:compile (java-compile) @ spring-data-couchbase --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 307 source files to /Users/michaelreiche/cpick/334/xxx/spring-data-couchbase/target/classes [INFO] [INFO] --- asciidoctor-maven-plugin:2.2.2:process-asciidoc (html) @ spring-data-couchbase --- 2023-02-17T15:40:37.537-08:00 [main] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable. [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 0 resource [INFO] asciidoctor: ERROR: index.adoc: line 14: include file not found: /Users/michaelreiche/cpick/334/xxx/spring-data-commons/src/main/asciidoc/upgrade.adoc [INFO] asciidoctor: ERROR: entity.adoc: line 6: include file not found: /Users/michaelreiche/cpick/334/xxx/spring-data-commons/src/main/asciidoc/object-mapping.adoc [INFO] asciidoctor: ERROR: index.adoc: line 23: include file not found: /Users/michaelreiche/cpick/334/xxx/spring-data-commons/src/main/asciidoc/repositories.adoc [INFO] asciidoctor: WARN: template.adoc: line 92: id assigned to section already in use: template.sub-document-ops [INFO] asciidoctor: ERROR: index.adoc: line 39: include file not found: /Users/michaelreiche/cpick/334/xxx/spring-data-commons/src/main/asciidoc/repository-namespace-reference.adoc [INFO] asciidoctor: ERROR: index.adoc: line 40: include file not found: /Users/michaelreiche/cpick/334/xxx/spring-data-commons/src/main/asciidoc/repository-populator-namespace-reference.adoc [INFO] asciidoctor: ERROR: index.adoc: line 41: include file not found: /Users/michaelreiche/cpick/334/xxx/spring-data-commons/src/main/asciidoc/repository-query-keywords-reference.adoc [INFO] asciidoctor: ERROR: index.adoc: line 42: include file not found: /Users/michaelreiche/cpick/334/xxx/spring-data-commons/src/main/asciidoc/repository-query-return-types-reference.adoc [INFO] asciidoctor: INFO: possible invalid reference: couchbase.repository.multibucket [INFO] asciidoctor: INFO: possible invalid reference: couchbase.repository.multibucket [INFO] asciidoctor: INFO: possible invalid reference: repositories.limit-query-result [INFO] Converted /Users/michaelreiche/cpick/334/xxx/spring-data-couchbase/src/main/asciidoc/index.adoc [INFO] [INFO] --- apt-maven-plugin:1.1.3:test-process (default) @ spring-data-couchbase --- [INFO] . . .

mp911de commented 1 year ago

I haven't gotten to the bottom of this one yet. We run the documentation build inside of https://hub.docker.com/layers/springci/spring-data-release-tools/0.8/images/sha256-504d7b8121496148ce0dd54fd0ff687e8733be7d9dca39bdbc92a45509a8444e?context=explore with spring-data-commons checked out next to the Spring Data Couchbase repo.

docker run -it --rm springci/spring-data-release-tools:0.8 /bin/bash
sdk use java 17.0.6-tem
git clone https://github.com/spring-projects/spring-data-couchbase.git
git clone https://github.com/spring-projects/spring-data-commons.git
cd spring-data-couchbase
mvn -Pdistribute package

should be the commands to run the distribution build.