【发布时间】:2012-04-05 05:11:30
【问题描述】:
我正在使用 Ant 为 */.html 文件运行基于自定义正则表达式的检查。这是非常简单的配置。 Ant build.xml:
<taskdef resource="checkstyletask.properties" classpath="checkstyle-5.5-all.jar"/>
<target name="check">
<checkstyle config="checks.xml" failOnViolation="false">
<fileset dir="${basedir}" includes="**/*.html"/>
<formatter type="plain"/>
<formatter type="xml" toFile="${basedir}/reports/checkstyle-report.xml"/>
</checkstyle>
</target>
checks.xml:
<module name="Checker">
<property name="charset" value="UTF-8"/>
<module name="RegexpMultiline">
<property name="format" value="\A.+<table>.+<\/table>.+\Z"/>
</module>
</module>
在 Windows 7 64 位上:
Apache Ant(TM) version 1.8.3 compiled on February 26 2012,
BUILD SUCCESSFUL
Total time: 1 second
在 CentOS 64 位上:
Apache Ant(TM) version 1.8.2 compiled on May 13 2011,
BUILD FAILED
build.xml:8: Unable to create a Checker: cannot initialize module RegexpMultiline - Unable to instantiate RegexpMultiline
谁能给点建议?
谢谢,
【问题讨论】:
标签: regex ant checkstyle