- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个带有 maven-javadoc-plugin 和 JDK8 的 Maven 项目。当我运行 mvn javadoc:test-javadoc
时,插件会报告文档错误并停止,但是当我运行 mvn javadoc:test-javadoc-no-fork
时,插件会运行成功,只有一些警告。
问题是不是如何修复或文档错误。该插件发现了需要修复的真实文档问题,因此报告的 mvn javadoc:test-javadoc
错误是正确的结果。
问题是:为什么 mvn javadoc:test-javadoc-no-fork
没有失败,而是像警告一样处理问题?
背景:
TracingServiceSpringTest
中的运动问题确实缺少针对抛出的 DatatypeConfigurationException
/** scenario: some text... **/
@Test
public void testImport() throws DatatypeConfigurationException {...
运行mvn javadoc:test-javadoc
时的输出
[INFO]
[INFO] <<< maven-javadoc-plugin:2.10.4:test-javadoc (default-cli) < generate-test-sources @ agrovet-server <<<
[INFO]
[INFO] --- maven-javadoc-plugin:2.10.4:test-javadoc (default-cli) @ agrovet-server ---
[INFO]
...
3 errors
9 warnings
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] PROJECT ............................................ SUCCESS [ 1.131 s]
[INFO] PROJECT :: Client .................................. SUCCESS [ 43.908 s]
[INFO] PROJECT :: Server .................................. FAILURE [ 44.774 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:36 min
[INFO] Finished at: 2017-09-23T21:33:33+02:00
[INFO] Final Memory: 96M/1573M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:test-javadoc (default-cli) on project PROJECT-server: An error has occurred in Test JavaDocs report generation:
[ERROR] Exit code: 1 - F:\workspaces\PROJECT\PROJECT-server\src\test\java\com\example\PROJECT\infrastructure\TracingServiceSpringTest.java:389: warning:
no @throws for javax.xml.datatype.DatatypeConfigurationException
[ERROR] public void testImport() throws DatatypeConfigurationException {
[ERROR] ^
...
[ERROR]
[ERROR] Command line was: "C:\Program Files\Java\jdk1.8.0_121\jre\..\bin\javadoc.exe" @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in 'F:\workspaces\PROJECT\PROJECT-server\target\site\testapidocs' dir.
[ERROR] -> [Help 1]
[ERROR]
...
运行mvn javadoc:test-javadoc-no-fork
时的输出
8 warnings
[WARNING] Javadoc Warnings
[WARNING] F:\workspaces\PROJECT\PROJECT-server\src\test\java\com\example\PROJECT\infrastructure\TracingServiceSpringTest:389: warning: no @throws for javax.xml.datatype.DatatypeConfigurationException
[WARNING] public void testImport() throws DatatypeConfigurationException {
[WARNING] ^
...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] PROJECT ............................................ SUCCESS [ 0.454 s]
[INFO] PROJECT :: Client .................................. SUCCESS [ 0.011 s]
[INFO] PROJECT :: Server .................................. SUCCESS [ 6.763 [INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
...
相关 POM 部分,父级 pom.xml
(完整的 pom 太大了,但这是唯一提到 maven-javadoc-plugin
的部分:
<dependencyManagement>
<dependencies>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
</plugin>
</dependencies>
</dependencyManagement>
...
<reporting>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<!--
javadoc-no-fork in order to prevent JavaDoc process from runing generate-source again
but this also requries that JavaDoc generation runs after compile: "mvn install site"
but not on a black project "mvn clean site"
-->
<report>javadoc-no-fork</report>
<report>test-javadoc-no-fork</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
最佳答案
同时尝试 Generate Javadoc without duplicate execution of phase generate-sources .从版本 2.10 开始,定义了两个新报告,javadoc-no-fork
和 test-javadoc-no-fork
不会触发 generate-sources
或 generate-test-sources
第二次再次相变。
当您使用选项 test-javadoc-no-fork
时测试源生成被跳过,因此您的构建成功。
...generates the test Javadoc files for the project. It executes the standard Javadoc tool and supports the parameters used by the tool without forking the generate-test-sources phase again. Note that this goal does require generation of test sources before site generation, e.g. by invoking
mvn clean deploy site
.
另一方面 javadoc:test-javadoc
再次编译测试源并记录错误。
generates the test Javadoc files for the project. It executes the standard Javadoc tool and supports the parameters used by the tool.
所有这些都与 <reportSets>
相关
Multiple specifications of a set of reports, each having (possibly) different configuration. This is the reporting parallel to an
<execution>
in the build.
类型都是no-fork
,您可以尝试包含 test-javadoc
作为<reportSet>
中的报告之一解决这个问题。
关于java - 是什么导致 maven-javadoc-plugin 目标 test-javadoc 因错误而失败,但 test-javadoc-no-fork 只是发出警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46383942/
我有一个发出值的 Observable 源 source1,如果它没有发出任何东西超过 2 秒,我想切换到后备源 source2。如果 source1 再次发射,我想从中发射。依此类推,无限期。 到目
我正在使用 postfix 发送电子邮件。当我将电子邮件发送到其他域时它工作正常,但是当我将电子邮件发送到配置后修复的同一个域时它不发送电子邮件。 下面是我的配置: myhostname = [FQD
我最近将 ipython 和 pandas 更新为最新的稳定版本。它导致 matplotlib 中出现了一些奇怪的行为,如果我从终端运行(以前的行为)脚本,我将无法显示数字。如果我在 ipython
我的应用程序是一个网络应用程序。它的工作是接收我想将它们作为信号发出的数据包流(QByteArray)。这样做会不会效率低下?我关心复制大缓冲区。 最佳答案 QByteArray 使用 Copy-on
有 QTableWidget。我需要发送带有行列和文本的 cellChanged 信号。我怎样才能做到这一点? —— 我已经用插槽连接了信号。我需要发送 信号。 最佳答案 您必须使用 connect
我编写了一个简单的玩具语言编译器前端,它使用 llvm-sys 生成 LLVM IR (LLVM 的 C library 的 Rust 绑定(bind))。然后我通过创建 LLVMTargetMach
我想知道如何像那里描述的那样发出 HTTP POST 请求 http://code.google.com/apis/documents/docs/3.0/developers_guide_protoc
简单的问题。我需要在 GWT 中发出一个重定向到新页面的 GET 请求,但我找不到正确的 API。 有吗?我应该自己简单地形成 URL 然后做 Window.Location.replace ? (原
我正在使用 paging3我有两个不同的寻呼源。问题是Coroutine Scope只发出第一个寻呼流 在 ViewModel我有两个分页流程 val pagingFlow1 = Pager(Pagi
docker doc 中没有任何解释,也没有 docker 中看似任何内置变量来查找构建图像的原始工作目录。 我想在不同的目录上运行命令,并在某个时候回到我启动 docker build 的位置。 我
我试图使一个puppeteer.js机器人能够暂停并恢复其工作。 总的来说,我有一个带有十几个异步方法的类,事件发射器和一个名为“state”的属性,该属性使用setter进行更改。当我发生事件“停止
这个问题已经有答案了: Is it possible to send custom headers with an XHR ("Ajax" request)? (1 个回答) 已关闭 4 年前。 我想
如果浏览器打开与远程服务器的连接,是否可以通过 Javascript 访问同一连接? 我的网络上有一个小型以太网模块,我的编程有点像这样(伪代码): private var socket while(
尝试发出 HTTP 请求时,出现错误: {-# LANGUAGE OverloadedStrings #-} import Network.HTTP.Conduit -- the main modul
我有这个异步任务: public class likeTheJoke extends AsyncTask{ @Override protected Void doInBa
当进程终止并为其发出 wait() 时会发生什么?当一个子进程终止但没有人为其执行 wait() 时会发生什么?如果对尚未终止的进程执行 wait() 会发生什么情况? 最佳答案 如果我误解了这些问题
我尝试使用以下小部件结构、信号连接和回调将与 GtkTextView 支持的击键相关的信号(CTRL+a、CTRL+x 等)附加到工具栏按钮: typedef struct { GtkWidg
我有以下 base64 编码的字符串,我需要使用 Swift 对它进行 base64 解码: KimHser2RvFf9RPjajWO4K/odT51hTlISwMKNIfPUC+gXYZKNjGDC
我正在使用 Facebook Messenger webview 显示表单,在提交时,我想将消息发送回用户并关闭 webview。我现在的问题是 webview/浏览器没有发送消息就关闭了。我不知道这
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
我是一名优秀的程序员,十分优秀!