Skip to content

Commit 1531554

Browse files
committed
mkdoc setup and build script
1 parent 656c0d0 commit 1531554

File tree

8 files changed

+196
-60
lines changed

8 files changed

+196
-60
lines changed

build-doc.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
set -e
2+
# Set up python environment
3+
#pyenv local 3.10.1
4+
#pip install mkdocs mkdocs-material pip install mkdocs-awesome-pages-plugin
5+
6+
# In some bash/zsh environments, the locale is not set correctly, which causes mkdocs to fail.
7+
export LC_ALL=en_US.UTF-8
8+
export LANG=en_US.UTF-8
9+
10+
# Build Javadoc
11+
mvn clean install -DskipTests # or guava-shaded can not be found
12+
mvn javadoc:javadoc -pl core,query-builder,mapper-runtime
13+
mvn javadoc:aggregate
14+
15+
# Copy Javadoc to manual directory
16+
mkdir manual/api || true
17+
cp -r target/site/apidocs/* manual/api
18+
19+
# Build manual with API references
20+
mkdocs build # or `mkdocs serve` to preview
21+
22+
# Remove Javadoc from manual directory
23+
rm -rf manual/api

docs.yaml

Lines changed: 0 additions & 60 deletions
This file was deleted.

manual/HOME-README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../README.md

manual/changelog-README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../changelog/README.md

manual/faq-README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../faq/README.md

manual/upgrade-README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../upgrade_guide/README.md

mkdocs.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
site_name: Java Driver for Apache Cassandra
2+
site_description: Java Driver for Apache Cassandra® Documentation
3+
site_url: https://apache.github.io/cassandra-java-driver
4+
repo_url: https://github.com/apache/cassandra-java-driver
5+
repo_name: apache/cassandra-java-driver
6+
7+
docs_dir: manual
8+
site_dir: docs
9+
10+
theme:
11+
name: material
12+
palette:
13+
- scheme: default
14+
primary: blue
15+
accent: blue
16+
features:
17+
- navigation.tabs
18+
- navigation.sections
19+
- navigation.expand
20+
- navigation.top
21+
- search.highlight
22+
- search.share
23+
24+
markdown_extensions:
25+
- admonition
26+
- codehilite
27+
- pymdownx.superfences
28+
- pymdownx.tabbed
29+
- toc:
30+
permalink: true
31+
32+
nav:
33+
- Home: HOME-README.md
34+
- Manual:
35+
- Overview: README.md
36+
- API Conventions: api_conventions/README.md
37+
- Case Sensitivity: case_sensitivity/README.md
38+
- Cloud: cloud/README.md
39+
- Core:
40+
- Overview: core/README.md
41+
- Integration: core/integration/README.md
42+
- Configuration: core/configuration/README.md
43+
- Authentication: core/authentication/README.md
44+
- SSL: core/ssl/README.md
45+
- Load Balancing: core/load_balancing/README.md
46+
- Pooling: core/pooling/README.md
47+
- Reconnection: core/reconnection/README.md
48+
- Retries: core/retries/README.md
49+
- Speculative Execution: core/speculative_execution/README.md
50+
- Metrics: core/metrics/README.md
51+
- Logging: core/logging/README.md
52+
- Statements: core/statements/README.md
53+
- Paging: core/paging/README.md
54+
- Async Programming: core/async/README.md
55+
- Reactive Streams: core/reactive/README.md
56+
- Custom Codecs: core/custom_codecs/README.md
57+
- Temporal Types: core/temporal_types/README.md
58+
- Tuples: core/tuples/README.md
59+
- UDTs: core/udts/README.md
60+
- Compression: core/compression/README.md
61+
- Address Resolution: core/address_resolution/README.md
62+
- Request Tracker: core/request_tracker/README.md
63+
- Throttling: core/throttling/README.md
64+
- Tracing: core/tracing/README.md
65+
- Performance: core/performance/README.md
66+
- Metadata: core/metadata/README.md
67+
- Control Connection: core/control_connection/README.md
68+
- Native Protocol: core/native_protocol/README.md
69+
- Non-blocking: core/non_blocking/README.md
70+
- Query Timestamps: core/query_timestamps/README.md
71+
- Idempotence: core/idempotence/README.md
72+
- Detachable Types: core/detachable_types/README.md
73+
- DSE: core/dse/README.md
74+
- GraalVM: core/graalvm/README.md
75+
- Shaded JAR: core/shaded_jar/README.md
76+
- BOM: core/bom/README.md
77+
- Query Builder:
78+
- Overview: query_builder/README.md
79+
- Select: query_builder/select/README.md
80+
- Insert: query_builder/insert/README.md
81+
- Update: query_builder/update/README.md
82+
- Delete: query_builder/delete/README.md
83+
- Schema: query_builder/schema/README.md
84+
- Truncate: query_builder/truncate/README.md
85+
- Condition: query_builder/condition/README.md
86+
- Relation: query_builder/relation/README.md
87+
- Term: query_builder/term/README.md
88+
- Idempotence: query_builder/idempotence/README.md
89+
- Mapper:
90+
- Overview: mapper/README.md
91+
- Entities: mapper/entities/README.md
92+
- DAOs: mapper/daos/README.md
93+
- Mapper: mapper/mapper/README.md
94+
- Configuration: mapper/config/README.md
95+
- Developer:
96+
- Overview: developer/README.md
97+
- Common: developer/common/README.md
98+
- Native Protocol: developer/native_protocol/README.md
99+
- Netty Pipeline: developer/netty_pipeline/README.md
100+
- Request Execution: developer/request_execution/README.md
101+
- Admin: developer/admin/README.md
102+
- OSGi: osgi/README.md
103+
- API References: api/index.html
104+
- FAQ: faq-README.md
105+
- Changelog: changelog-README.md
106+
- Upgrade Guide: upgrade-README.md
107+
108+
plugins:
109+
- search
110+
- awesome-pages

pom.xml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,23 @@ limitations under the License.]]></inlineHeader>
804804
<quiet>true</quiet>
805805
<doclint>all,-missing</doclint>
806806
<excludePackageNames>com.datastax.*.driver.internal*</excludePackageNames>
807+
<additionalDependencies>
808+
<additionalDependency>
809+
<groupId>com.google.errorprone</groupId>
810+
<artifactId>error_prone_annotations</artifactId>
811+
<version>2.3.4</version>
812+
</additionalDependency>
813+
<additionalDependency>
814+
<groupId>com.github.stephenc.jcip</groupId>
815+
<artifactId>jcip-annotations</artifactId>
816+
<version>1.0-1</version>
817+
</additionalDependency>
818+
<additionalDependency>
819+
<groupId>com.github.spotbugs</groupId>
820+
<artifactId>spotbugs-annotations</artifactId>
821+
<version>3.1.12</version>
822+
</additionalDependency>
823+
</additionalDependencies>
807824
<tags>
808825
<tag>
809826
<name>apiNote</name>
@@ -882,7 +899,49 @@ limitations under the License.]]></inlineHeader>
882899
<useStandardDocletOptions>false</useStandardDocletOptions>
883900
</configuration>
884901
</execution>
902+
<execution>
903+
<!-- Generate aggregated Javadoc for specified modules -->
904+
<id>aggregate-javadoc</id>
905+
<goals>
906+
<goal>aggregate</goal>
907+
</goals>
908+
<phase>site</phase>
909+
<configuration>
910+
<includeDependencySources>false</includeDependencySources>
911+
<dependencySourceIncludes>
912+
<dependencySourceInclude>org.apache.cassandra:java-driver-core</dependencySourceInclude>
913+
<dependencySourceInclude>org.apache.cassandra:java-driver-query-builder</dependencySourceInclude>
914+
<dependencySourceInclude>org.apache.cassandra:java-driver-mapper-runtime</dependencySourceInclude>
915+
</dependencySourceIncludes>
916+
<reactorProjects>
917+
<reactorProject>core</reactorProject>
918+
<reactorProject>query-builder</reactorProject>
919+
<reactorProject>mapper-runtime</reactorProject>
920+
</reactorProjects>
921+
<doctitle>Apache Cassandra Java Driver ${project.version} API</doctitle>
922+
<bottom><![CDATA[
923+
Copyright &#169; {inceptionYear}&#x2013;{currentYear} <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.
924+
]]></bottom>
925+
</configuration>
926+
</execution>
885927
</executions>
928+
<dependencies>
929+
<dependency>
930+
<groupId>com.google.errorprone</groupId>
931+
<artifactId>error_prone_annotations</artifactId>
932+
<version>2.3.4</version>
933+
</dependency>
934+
<dependency>
935+
<groupId>com.github.stephenc.jcip</groupId>
936+
<artifactId>jcip-annotations</artifactId>
937+
<version>1.0-1</version>
938+
</dependency>
939+
<dependency>
940+
<groupId>com.github.spotbugs</groupId>
941+
<artifactId>spotbugs-annotations</artifactId>
942+
<version>3.1.12</version>
943+
</dependency>
944+
</dependencies>
886945
</plugin>
887946
<plugin>
888947
<artifactId>maven-release-plugin</artifactId>

0 commit comments

Comments
 (0)