我已经在我的pox.xml中添加了Maven Java Doc插件的依赖,如下所示:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
使用java版本1.8,但是当注释缺失或没有描述时,它会抛出警告而不是错误。我希望它能抛出错误,请有人帮忙吗?提前感谢!它在控制台中抛出以下警告:
7 warnings
[WARNING] Javadoc Warnings
[WARNING] javadoc: warning - Multiple sources of package comments found for package "javax.servlet"
[WARNING] javadoc: warning - Multiple sources of package comments found for package "javax.servlet.http"
[WARNING] C:\SOFTDEV\LPIS\LPISDEPT\WEBAPP\branches\DEVELOPMENT\web\lpis_web\src\main\java\ie\gov\agriculture\lpis\web\auth\servlet\LPISAuthenticationServlet.java:61: warning: no description for @throws
[WARNING] * @throws IOException
[WARNING] ^
[WARNING] C:\SOFTDEV\LPIS\LPISDEPT\WEBAPP\branches\DEVELOPMENT\web\lpis_web\src\main\java\ie\gov\agriculture\lpis\web\editcache\filter\attribute\EditFilterAttribute.java:32: warning: no description for @param
[WARNING] * @param currentEntityFilter
[WARNING] ^
[WARNING] C:\SOFTDEV\LPIS\LPISDEPT\WEBAPP\branches\DEVELOPMENT\web\lpis_web\src\main\java\ie\gov\agriculture\lpis\web\editcache\filter\factory\EntityFilter.java:19: warning: no description for @param
[WARNING] * @param projectId
[WARNING] ^
[WARNING] C:\SOFTDEV\LPIS\LPISDEPT\WEBAPP\branches\DEVELOPMENT\web\lpis_web\src\main\java\ie\gov\agriculture\lpis\web\editcache\filter\factory\EntityFilter.java:20: warning: no description for @param
[WARNING] * @param attributeValues
[WARNING] ^
[WARNING] C:\SOFTDEV\LPIS\LPISDEPT\WEBAPP\branches\DEVELOPMENT\web\lpis_web\src\main\java\ie\gov\agriculture\lpis\web\editcache\filter\factory\FilterFactory.java:40: warning: no description for @param
[WARNING] * @param parameter
[WARNING] ^