Maven的pom.xml中添加了javadoc 插件,原來寫的代碼,由於代碼的注釋寫了一些非標准標記,導致報錯。
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:jar (attach-javadocs) on project urule-console: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - D:\workbench\source-code\github\youseries\urule\urule-console\src\main\java\com\bstek\urule\console\config\UruleConfig.java:13: 錯誤: 未知標記: Title
[ERROR] * @Title: UruleConfig
[ERROR] ^
[ERROR] D:\workbench\source-code\github\youseries\urule\urule-console\src\main\java\com\bstek\urule\console\config\UruleConfig.java:14: 錯誤: 未知標記: Description
[ERROR] * @Description:
[ERROR] ^
[ERROR] D:\workbench\source-code\github\youseries\urule\urule-console\src\main\java\com\bstek\urule\console\config\UruleConfig.java:16: 錯誤: 未知標記: date
[ERROR] * @date 2020/8/19 18:07
[ERROR] ^
[ERROR] D:\workbench\source-code\github\youseries\urule\urule-console\src\main\java\com\bstek\urule\console\config\UruleConfig.java:17: 錯誤: 未知標記: Version
[ERROR] * @Version 1.0
[ERROR] ^
[ERROR] D:\workbench\source-code\github\youseries\urule\urule-console\src\main\java\com\bstek\urule\console\repository\RepositoryReader.java:56: 警告: @throws 沒有說明
[ERROR] * @throws Exception
[ERROR] ^
[ERROR]
[ERROR] Command line was: "D:\Program Files\Java\jdk1.8.0_131\jre\..\bin\javadoc.exe" @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in 'D:\workbench\source-code\github\youseries\urule\urule-console\target\apidocs' dir.
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</execution>
</executions>
</plugin>
[WARNING] D:\workbench\source-code\github\youseries\urule\urule-console\src\main\java\com\bstek\urule\console\config\UruleConfig.java:22: 警告 - @Title:是未知標記。
[WARNING] D:\workbench\source-code\github\youseries\urule\urule-console\src\main\java\com\bstek\urule\console\config\UruleConfig.java:22: 警告 - @Description:是未知標記。
[WARNING] D:\workbench\source-code\github\youseries\urule\urule-console\src\main\java\com\bstek\urule\console\config\UruleConfig.java:22: 警告 - @date是未知標記。
[WARNING] D:\workbench\source-code\github\youseries\urule\urule-console\src\main\java\com\bstek\urule\console\config\UruleConfig.java:22: 警告 - @Version是未知標記 - 除了大小寫之外其他方面與已知標記相同。
error變成了warning, 問題解決