Skip to content

Commit 287c871

Browse files
committed
feat: javadoc 获取、查看
0 parents  commit 287c871

34 files changed

+16886
-0
lines changed

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
src/main/resources/application-dev.yaml
3+
src/main/resources/static/help/
4+
node/
5+
node_modules/
6+
.cache/
7+
HELP.md
8+
target/
9+
!.mvn/wrapper/maven-wrapper.jar
10+
!**/src/main/**/target/
11+
!**/src/test/**/target/
12+
13+
### STS ###
14+
.apt_generated
15+
.classpath
16+
.factorypath
17+
.project
18+
.settings
19+
.springBeans
20+
.sts4-cache
21+
22+
### IntelliJ IDEA ###
23+
.idea
24+
*.iws
25+
*.iml
26+
*.ipr
27+
28+
### NetBeans ###
29+
/nbproject/private/
30+
/nbbuild/
31+
/dist/
32+
/nbdist/
33+
/.nb-gradle/
34+
build/
35+
!**/src/main/**/build/
36+
!**/src/test/**/build/
37+
38+
### VS Code ###
39+
.vscode/

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM eclipse-temurin:8-jdk-alpine
2+
VOLUME /tmp
3+
COPY target/javadochub.jar javadochub.jar
4+
COPY src/main/resources/application.yaml application.yaml
5+
COPY bin/start.sh start.sh
6+
COPY bin/stop.sh stop.sh
7+
ENTRYPOINT ["java", "-jar", "-Dspring.config.location=application.yaml", "/javadochub.jar"]

README.adoc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
= JavadocHub
3+
4+
轻量级的 javadoc 文档聚合、托管服务
5+
6+
7+
## 环境信息
8+
9+
* jdk1.8
10+
* maven3
11+
12+
## 运行
13+
14+
编译
15+
16+
[source,bash]
17+
....
18+
mvn clean package
19+
....
20+
21+
启动
22+
23+
[source,bash]
24+
....
25+
java -jar javadochub.jar
26+
....
27+
28+
访问
29+
30+
http://localhost:8086

antora-playbook.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
site:
2+
title: /** JavadocHub */
3+
url: "/"
4+
start_page: docs::index.adoc
5+
runtime:
6+
cache_dir: ./.cache/antora
7+
fetch: true
8+
log:
9+
level: info
10+
11+
content:
12+
edit_url: '{web_url}/blob/{refname}/{path}'
13+
sources:
14+
# 本项目文档
15+
- url: .
16+
branches: HEAD
17+
start_path: docs
18+
19+
20+
asciidoc:
21+
attributes:
22+
# 文本画图渲染服务 kroki 地址
23+
# kroki-server-url: http://172.16.30.158:9500
24+
# tab 标签联动
25+
tabs-sync-option: ''
26+
# 前页(Prev)、后页(Next)
27+
page-pagination: ''
28+
page-toctitle: '目录'
29+
# 键盘、按钮、菜单
30+
experimental: ''
31+
commandkey: ⌘
32+
extensions:
33+
- asciidoctor-kroki
34+
- '@asciidoctor/tabs'
35+
36+
antora:
37+
extensions:
38+
# 全文搜索
39+
- require: '@antora/lunr-extension'
40+
languages: [zh,en]
41+
42+
ui:
43+
bundle:
44+
url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
45+
snapshot: true
46+
supplemental_files: ./supplemental-ui
47+
48+
output:
49+
dir: ./src/main/resources/static/help

assembly/assembly.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<assembly>
2+
<id>linux</id>
3+
<formats>
4+
<format>tar.gz</format>
5+
</formats>
6+
<fileSets>
7+
<fileSet>
8+
<directory>src/main/resources</directory>
9+
<outputDirectory>/</outputDirectory>
10+
<directoryMode>0755</directoryMode>
11+
<fileMode>0755</fileMode>
12+
<includes>
13+
<include>application.yaml</include>
14+
</includes>
15+
</fileSet>
16+
<fileSet>
17+
<directory>bin</directory>
18+
<outputDirectory>/</outputDirectory>
19+
<directoryMode>0755</directoryMode>
20+
<fileMode>0755</fileMode>
21+
<includes>
22+
<include>*.sh</include>
23+
</includes>
24+
</fileSet>
25+
<fileSet>
26+
<directory>${project.basedir}/target</directory>
27+
<outputDirectory>/</outputDirectory>
28+
<includes>
29+
<include>${project.artifactId}.jar</include>
30+
</includes>
31+
</fileSet>
32+
</fileSets>
33+
</assembly>

bin/start.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
nohup java -jar -Dspring.config.location=application.yaml javadochub.jar &
4+
sleep 2
5+
ps -ef | grep javadochub | grep -v grep

bin/stop.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
#ps -ef | grep javadochub | grep -v grep
4+
kill $(jps -l | grep javadochub | awk '{print $1}')
5+
sleep 2
6+
ps -ef | grep javadochub | grep -v grep

changelog.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
= changelog
2+
3+
4+
== v0.1.0
5+
6+
* javadoc 获取、查看

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: '3.2'
2+
3+
services:
4+
javadochub:
5+
build: .
6+
expose:
7+
- '8086'
8+
volumes:
9+
- type: volume
10+
source: storage
11+
target: /home/user/.javadochub
12+
volume:
13+
nocopy: true
14+
volumes:
15+
storage:

docs/antora.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: docs
2+
title: JavadocHub
3+
version: ~
4+
display_version: 最新
5+
nav:
6+
- modules/ROOT/nav.adoc
7+
- modules/javadoc/nav.adoc

0 commit comments

Comments
 (0)