Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/388.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Checkstyle:未生成结果文件。_Java_Ant_Checkstyle - Fatal编程技术网

Java Checkstyle:未生成结果文件。

Java Checkstyle:未生成结果文件。,java,ant,checkstyle,Java,Ant,Checkstyle,我正在蚂蚁任务中运行checkstyle: <taskdef resource="checkstyletask.properties" classpath="checkstyle-5.5//checkstyle-5.5-all.jar"/> <checkstyle config="checkstyle-5.5/sun_checks.xml" failOnViolation="false"> <fileset dir="src/net" includes="**

我正在蚂蚁任务中运行
checkstyle

<taskdef resource="checkstyletask.properties" classpath="checkstyle-5.5//checkstyle-5.5-all.jar"/> 
<checkstyle config="checkstyle-5.5/sun_checks.xml" failOnViolation="false">
  <fileset dir="src/net" includes="**/*.java"/>
</checkstyle>

无论如何,
checkstyle
肯定在运行;我在控制台上看到了大量的输出。但是,我没有看到输出为
checkstyle results.xml
文件


当然,我假设这是一个严重错误,默认情况下,
checkstyle results.xml
总是在checkstyle运行时生成的。对吗?我相信Jenkins或Hudson CI插件也需要results.xml文件。

您需要在formatter元素中指定输出;默认情况下,它将转到标准输出

来自:

此任务支持嵌套元素文件集、类路径、, 格式化程序和属性

formatter元素的参数包括:

类型

要生成的输出类型。有效值为:

plain - specifies the DefaultLogger
xml - specifies the XMLLogger
默认为“普通”。没有

toFile要将输出写入的文件。默认值 到标准输出。注意,没有明确指定的方法 标准输出


-1:我花了2秒钟的时间通过谷歌搜索“CheckStyleAntTask”并点击第一个结果来找到答案。是的,出于某种原因,“嵌套元素”标题把我甩了。无论如何,你的答案是正确的。谢谢