| @@ -34,35 +34,48 @@ | |||
| </description> | |||
| <import file="build.xml"/> | |||
| <property name="config.dir" location="${etc.dir}/checkstyle"/> | |||
| <property name="checkstyle.reportdir" location="${build.dir}/reports/checkstyle"/> | |||
| <property name="checkstyle.raw" location="${checkstyle.reportdir}/raw.xml"/> | |||
| <property name="stylesheet.html" location="${config.dir}/checkstyle-frames.xsl"/> | |||
| <property name="stylesheet.html.sorted" location="${config.dir}/checkstyle-frames-sortby-check.xsl"/> | |||
| <property name="stylesheet.text" location="${config.dir}/checkstyle-text.xsl"/> | |||
| <property name="stylesheet.xdoc" location="${config.dir}/checkstyle-xdoc.xsl"/> | |||
| <property name="checkstyle.basedir" location="${java.dir}"/> | |||
| <!-- Ant Checkstyle report --> | |||
| <property name="tocheck" value="**/*.java"/> | |||
| <property name="javadoc.scope" value="public"/> | |||
| <property name="checkstyle.reportdir" | |||
| location="${build.dir}/reports/checkstyle" | |||
| description="Where to store Checkstyle reports"/> | |||
| <property name="checkstyle.raw" | |||
| location="${checkstyle.reportdir}/raw.xml" | |||
| description="Name of Checkstyle XML-Report"/> | |||
| <property name="stylesheet.html" | |||
| location="${config.dir}/checkstyle-frames.xsl" | |||
| description="Name of Checkstyle XSLT for generating HTML"/> | |||
| <property name="stylesheet.html.sorted" | |||
| location="${config.dir}/checkstyle-frames-sortby-check.xsl" | |||
| description="Name of Checkstyle XSLT for generating 2nd HTML"/> | |||
| <property name="stylesheet.text" | |||
| location="${config.dir}/checkstyle-text.xsl" | |||
| description="Name of Checkstyle XSLT for generating plain text"/> | |||
| <property name="stylesheet.xdoc" | |||
| location="${config.dir}/checkstyle-xdoc.xsl" | |||
| description="Name of Checkstyle XSLT for generating XDOC"/> | |||
| <property name="checkstyle.basedir" | |||
| location="${java.dir}" | |||
| description="Where are the Java sources to check"/> | |||
| <property name="tocheck" | |||
| value="**/*.java" | |||
| description="Include pattern of the files to check"/> | |||
| <taskdef resource="simiantask.properties"/> | |||
| <!-- Findbugs: Running Findbugs --> | |||
| <property name="findbugs.reportdir" | |||
| location="${build.dir}/reports/findbugs" | |||
| <property name="findbugs.reportdir" | |||
| location="${build.dir}/reports/findbugs" | |||
| description="Where to store Findbugs results"/> | |||
| <property name="findbugs.raw" | |||
| value="raw.xml" | |||
| <property name="findbugs.raw" | |||
| value="raw.xml" | |||
| description="Findbugs Output xml-file"/> | |||
| <property name="findbugs.xsl" | |||
| value="fancy.xsl" | |||
| <property name="findbugs.xsl" | |||
| value="fancy.xsl" | |||
| description="Which XSL to use for generating Output: default, fancy, plain, summary"/> | |||
| <property name="findbugs.jvmargs" | |||
| value="-Xms128m -Xmx512m" | |||
| <property name="findbugs.jvmargs" | |||
| value="-Xms128m -Xmx512m" | |||
| description="JVMArgs for invoking Findbugs"/> | |||
| <!-- RAT Release Auditing Tool --> | |||
| @@ -76,6 +89,19 @@ | |||
| value="0.11" | |||
| description="Which Version of RAT to use"/> | |||
| <!-- Simian --> | |||
| <property name="simian.version" | |||
| value="2.4.0" | |||
| description="Which Version of Simian to use"/> | |||
| <property name="simian.uri" | |||
| value="http://www.harukizaemon.com/simian/simian-${simian.version}.tar.gz" | |||
| description="Where to get Simian"/> | |||
| <property name="simian.lib.dir" | |||
| value="${build.dir}/simian-lib" | |||
| description="Where to store Simian resources"/> | |||
| <property name="simian.report.dir" | |||
| value="${build.dir}/simian" | |||
| description="Where to store Simian reports"/> | |||
| <target name="init-ivy"> | |||
| @@ -154,11 +180,34 @@ | |||
| </target> | |||
| <target name="simiancheck" description="--> runs the check for duplicates"> | |||
| <simian> | |||
| <available property="simian.jar.present" file="${simian.lib.dir}/simian-${simian.version}.jar"/> | |||
| <sequential unless:set="simian.jar.present"> | |||
| <mkdir dir="${simian.lib.dir}"/> | |||
| <get src="${simian.uri}" dest="${simian.lib.dir}"/> | |||
| <gunzip src="${simian.lib.dir}/simian-${simian.version}.tar.gz" dest="${simian.lib.dir}/simian-${simian.version}.tar"/> | |||
| <untar src="${simian.lib.dir}/simian-${simian.version}.tar" dest="${simian.lib.dir}"> | |||
| <patternset> | |||
| <include name="**/simian*.jar"/> | |||
| <include name="**/simian*.xsl"/> | |||
| </patternset> | |||
| <flattenmapper/> | |||
| </untar> | |||
| </sequential> | |||
| <taskdef resource="simiantask.properties"> | |||
| <classpath> | |||
| <fileset dir="${simian.lib.dir}" includes="*.jar"/> | |||
| </classpath> | |||
| </taskdef> | |||
| <mkdir dir="${simian.report.dir}"/> | |||
| <simian failureProperty="simian.duplicates.found"> | |||
| <fileset dir="${java.dir}" /> | |||
| <formatter type="plain" toFile="${simian.report.dir}/simian-log.txt"/> | |||
| <formatter type="xml" toFile="${simian.report.dir}/simian-log.xml"/> | |||
| </simian> | |||
| <xslt in="${simian.report.dir}/simian-log.xml" style="${simian.lib.dir}/simian.xsl" out="${simian.report.dir}/simian.html"/> | |||
| </target> | |||
| <target name="fixTS" description="--> fix checkstyle errors 'Line has trailing spaces'"> | |||
| <fail message="Define path to java file 'path'"> | |||
| <condition><not><isset property="path"/></not></condition> | |||