blob: f2b8f3cbe5ff9f63527665d08c9b0cdc410e9a94 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project>
<property name="findbugs.home" value=""/>
<macrodef name="_findbugs">
<attribute name="outputDir"/>
<attribute name="outputFile"/>
<attribute name="excludeFilter"/>
<attribute name="findbugsReportXmlFile"/>
<attribute name="findbugsReportHtmlFile"/>
<attribute name="sourceDir"/>
<attribute name="jarDir"/>
<attribute name="classPathRef"/>
<sequential>
<mkdir dir="@{outputDir}"/>
<findbugs
home="${findbugs.home}"
output="xml:withMessages"
outputFile="@{outputFile}"
effort="max"
timeout="2400000"
excludeFilter="@{excludeFilter}"
jvmargs="-Xmx1024M">
<auxClasspath>
<path refid="@{classPathRef}"/>
</auxClasspath>
<sourcePath path="@{sourceDir}"/>
<fileset dir="@{jarDir}">
<include name="**/hcatalog-*.jar"/>
<include name="**/webhcat-*.jar"/>
</fileset>
</findbugs>
<xslt style="${findbugs.home}/src/xsl/default.xsl"
in="@{findbugsReportXmlFile}"
out="@{findbugsReportHtmlFile}"/>
</sequential>
</macrodef>
<target name="init-findbugs">
<available property="findbugs.present" file="${findbugs.home}/lib/findbugs.jar"/>
<fail message="'findbugs.home' is not defined. Please pass -Dfindbugs.home=&lt;base of Findbugs installation&gt; to Ant on the command-line." unless="findbugs.present"/>
<taskdef name="findbugs"
classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
classpath="${findbugs.home}/lib/findbugs-ant.jar"/>
</target>
</project>