Skip to content

Commit c187be6

Browse files
committed
feat: javadoc
1 parent 0414e48 commit c187be6

File tree

9 files changed

+84
-5
lines changed

9 files changed

+84
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
src/main/javadoc/overview.html
23
src/main/resources/application-dev.yaml
34
src/main/resources/static/help/
45
node/

pom.xml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,48 @@
222222
</executions>
223223
</plugin>
224224

225+
<!-- javadoc -->
226+
<plugin>
227+
<groupId>org.apache.maven.plugins</groupId>
228+
<artifactId>maven-javadoc-plugin</artifactId>
229+
<version>3.5.0</version>
230+
<configuration>
231+
<encoding>UTF-8</encoding>
232+
<charset>UTF-8</charset>
233+
<docencoding>UTF-8</docencoding>
234+
</configuration>
235+
<executions>
236+
<execution>
237+
<id>generate-javadoc-jar</id>
238+
<phase>package</phase>
239+
<goals>
240+
<goal>${project.packaging}</goal>
241+
</goals>
242+
</execution>
243+
</executions>
244+
</plugin>
245+
246+
<!-- src/main/javadoc/overivew.md -> html -->
247+
<plugin>
248+
<groupId>com.ruleoftech</groupId>
249+
<artifactId>markdown-page-generator-plugin</artifactId>
250+
<version>2.4.0</version>
251+
<executions>
252+
<execution>
253+
<phase>process-resources</phase>
254+
<goals>
255+
<goal>generate</goal>
256+
</goals>
257+
</execution>
258+
</executions>
259+
<configuration>
260+
<inputDirectory>${basedir}/src/main/javadoc</inputDirectory>
261+
<outputDirectory>${basedir}/src/main/javadoc</outputDirectory>
262+
<inputEncoding>UTF-8</inputEncoding>
263+
<outputEncoding>UTF-8</outputEncoding>
264+
</configuration>
265+
</plugin>
266+
225267
</plugins>
226268
</build>
227269

src/main/java/world/weibiansanjue/doctools/javadochub/JavadocHubApplication.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
import org.springframework.boot.SpringApplication;
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
55

6+
/**
7+
* Spring Boot 服务启动类.
8+
*
9+
* @author weibiansanjue
10+
* @since 1.0.0
11+
*/
612
@SpringBootApplication
713
public class JavadocHubApplication {
814

src/main/java/world/weibiansanjue/doctools/javadochub/controller/JavadocController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import java.io.IOException;
1616

1717
/**
18-
* javadoc 获取.
18+
* javadoc 获取控制器.
1919
*
2020
* @author weibiansanjue
2121
* @since 1.0.0
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* JavadocHub 对外接口.
3+
*
4+
* @author weibiansanjue
5+
* @since 1.0.0
6+
*/
7+
package world.weibiansanjue.doctools.javadochub.controller;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* JavadocHub 主包.
3+
* <p>JavadocHub 是可自部署的轻量级 javadoc 聚合、托管、查看服务,使用 SpringBoot 开发,
4+
* 输入包 maven 坐标,即可查看对应文档。</p>
5+
*
6+
* @author weibiansanjue
7+
* @since 1.0.0
8+
*/
9+
package world.weibiansanjue.doctools.javadochub;

src/main/java/world/weibiansanjue/doctools/javadochub/repository/Repository.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import java.util.stream.Collectors;
3030

3131
/**
32-
* 仓库.
32+
* 仓库操作.
3333
*
3434
* @author weibiansanjue
3535
* @since 1.0.0
@@ -60,7 +60,7 @@ public Repository() {
6060
}
6161

6262
/**
63-
* local artifact name list.
63+
* 获取本地 artifact 名词集合.
6464
*
6565
* @author weibiansanjue
6666
* @param groupId group id
@@ -80,7 +80,7 @@ public List<String> artifact(String groupId) {
8080
}
8181

8282
/**
83-
* remote version list.
83+
* 获取 maven 仓库中 javadoc 版本.
8484
*
8585
* @author weibiansanjue
8686
* @param groupId group id
@@ -112,7 +112,7 @@ public Versioning version(String groupId, String artifactId) {
112112
}
113113

114114
/**
115-
* download and discompress javadoc.
115+
* 下载、解压 javadoc.jar.
116116
*
117117
* @author weibiansanjue
118118
* @param groupId group id
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* 文档仓库、maven 仓库数据操作.
3+
*
4+
* @author weibiansanjue
5+
* @since 1.0.0
6+
*/
7+
package world.weibiansanjue.doctools.javadochub.repository;

src/main/javadoc/overview.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
<body>
3+
4+
**JavadocHub 是可自部署的轻量级 javadoc 聚合、托管、查看服务,使用 SpringBoot 开发,
5+
输入包 maven 坐标,即可查看对应文档。**
6+
7+
</body>

0 commit comments

Comments
 (0)