Show checkstyle.xml syntax highlighted
<project name="checkstyle" basedir="." default="checkstyle">
<description>
This is an import library that runs
checkstyle.
</description>
<!-- import the core -->
<import file="core.xml"/>
<target name="checkstyle-init" depends="init-core">
<typedef resource="checkstyletask.properties"
uri="antlib:com.puppycrawl.checkstyle"
onerror="failall"/>
<property name="checkstyle.dir"
location="${antbuild.xml.dir}/checkstyle"/>
<property name="checkstyle.policy"
location="${checkstyle.dir}/checkstyle-policy.xml"/>
<property name="stylesheet.html"
location="${checkstyle.dir}/checkstyle-frames.xsl"/>
<property name="stylesheet.text"
location="${checkstyle.dir}/checkstyle-text.xsl"/>
<property name="stylesheet.xdoc"
location="${checkstyle.dir}/checkstyle-xdoc.xsl"/>
<property name="build.checkstyle.dir"
location="${build.dir}/checkstyle" />
<mkdir dir="${build.checkstyle.dir}" />
<property name="checkstyle.report.xml"
location="${build.checkstyle.dir}/checkstyle.xml" />
<property name="checkstyle.report.html"
location="${build.checkstyle.dir}/checkstyle.html" />
</target>
<target name="checkstyle-run" depends="checkstyle.checkstyle-init"
xmlns:cs="antlib:com.puppycrawl.checkstyle">
<cs:checkstyle
failOnViolation="false"
failureProperty="checkstyle.failed"
config="${checkstyle.policy}">
<formatter type="xml" toFile="${checkstyle.report.xml}"/>
<fileset dir="${src.dir}" includes="**/*.java"/>
</cs:checkstyle>
</target>
<target name="checkstyle-report" depends="checkstyle.checkstyle-run"
if="checkstyle.failed">
<xslt in="${checkstyle.report.xml}"
style="${stylesheet.html}"
out="${build.checkstyle.dir}/html/output.txt">
<param name="basedir" expression="${build.checkstyle.dir}"/>
</xslt>
<xslt in="${checkstyle.report.xml}" style="${stylesheet.xdoc}"
out="${build.checkstyle.dir}/xdocs/index.xml">
<param name="basedir" expression="${build.checkstyle.dir}"/>
</xslt>
<fail>
Checkstyle reported style failures. See
${build.checkstyle.dir}
</fail>
</target>
<target name="checkstyle" depends="checkstyle.checkstyle-report" />
</project>
See more files for this project here