遇到javadoc用maven打包报错的问题,起初没发现javadoc,后发现并在pom看到了javadoc的配置。
- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.3:jar (attach-javadocs) on project qcloud-java-sdk: MavenReportException: Error while generating Javadoc:
- [ERROR] Exit code: 1 - D:qcloudapi-sdk-javasrcmainjavacomqcloudCommonRequest.java:24: 错误: 未知标记: brief
- [ERROR] * @brief 请求调用类
- [ERROR] ^
- [ERROR] D:qcloudapi-sdk-javasrcmainjavacomqcloudCommonSign.java:24: 错误: 未知标记: brief
- [ERROR] * @brief 签名
- [ERROR] ^
- [ERROR] D:qcloudapi-sdk-javasrcmainjavacomqcloudCommonSign.java:26: 错误: 未知标记: date
- [ERROR] * @date 2017-03-15 18:00:00
- [ERROR] ^
- [ERROR] D:qcloudapi-sdk-javasrcmainjavacomqcloudCommonSign.java:32: 警告: @return 没有说明
- [ERROR] * @return
- [ERROR] ^
使用命令mvn install -Dmaven.javadoc.skip=true
又发现报了gpg.exe的错误。
Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign (sign-artifacts) on project qcloud-java-sdk: Unable to execute gpg command: Error while executing process. Cannot run program "gpg.exe": CreateProcess error=2, 系统找不到指定的文件。 -> [Help 1]
最后使用
mvn install -Dmaven.javadoc.skip=true -Dgpg.skip
成功编译。