4
如何配置checkstyle(在Ant nt Maven中)任務?我嘗試了一下,但沒有正確地獲得報告。這是我的螞蟻腳本。如何在Hudson中爲Ant配置checkstyle confuguration?
<target name="checkStyle">
<taskdef resource="checkstyletask.properties">
<classpath refid="compile.class.pathtest"/>
</taskdef>
<checkstyle config="${source.code.dir}/config/sun_checks.xml">
<fileset dir="${base.working.dir}/JavaFolder">
<include name="**/*.java"/>
</fileset>
<formatter type="plain"/>
<formatter type="xml" toFile="checkstyle-result.xml"/>
</checkstyle>
</target>
<path id="compile.class.pathtest">
<pathelement location="${checkstyle.dir}/checkstyle-5.5-all.jar"/>
<pathelement location="${checkstyle.dir}/checkstyle-5.5.jar"/>
<pathelement location="${checkstyle.dir}/pmd-3.9.jar"/>
<pathelement location="${checkstyle.dir}/asm-3.0.jar"/>
<pathelement location="${checkstyle.dir}/backport-util-concurrent-2.1.jar"/>
<pathelement location="${checkstyle.dir}/jaxen-1.1-beta-10.jar"/>
<pathelement location="${checkstyle.dir}/saxpath-1.0-FCS.jar"/>
</path>
什麼是sun_checks.xml文件?我已經下載並保存在上述文件夾中。運行構建時,會顯示一些警告和錯誤。後來,它顯示這樣。
構建失敗
C:在執行這條線出現以下錯誤:\服務器\ build.xml文件:9725 C:\服務器\ build.xml文件:3838:得到56個錯誤和27599個警告。
你能指導我如何解決這個問題嗎?
感謝
在哪裏設置這些道具'source.code.dir'&'base.working.dir'? – reiley