hbase/findbugs-targets.xml

60 lines
2.8 KiB
XML

<?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 basedir="." >
<property name="ibiblio_url" value="http://mirrors.ibiblio.org/pub/mirrors/maven2/" />
<property name="findbugs.version" value="1.3.9" />
<property name="findbugs-ant.jar" location="${user.home}/.ivy2/findbugs-ant-${findbugs.version}.jar" />
<property name="findbugs.zip" location="${user.home}/.ivy2/findbugs-${findbugs.version}.zip" />
<property name="findbugs_task_repo_url" value="${ibiblio_url}/com/google/code/findbugs/findbugs-ant/${findbugs.version}/findbugs-ant-${findbugs.version}.jar" />
<property name="findbugs_repo_url" value="http://downloads.sourceforge.net/project/findbugs/findbugs/${findbugs.version}/findbugs-${findbugs.version}.zip" />
<property name="findbugs.install.dir" location="${build.dir}" />
<property name="findbugs.output.file" location="${findbugs.install.dir}/findbugs-output.html" />
<property name="findbugs.home" location="${findbugs.install.dir}/findbugs-${findbugs.version}" />
<target name="findbugs.init">
<get src="${findbugs_task_repo_url}" dest="${findbugs-ant.jar}" usetimestamp="true" />
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask">
<classpath>
<pathelement location="${findbugs-ant.jar}" />
</classpath>
</taskdef>
</target>
<target name="findbugs.install" depends="findbugs.init">
<get src="${findbugs_repo_url}" dest="${findbugs.zip}" usetimestamp="true" />
<mkdir dir="${findbugs.install.dir}" />
<unzip src="${findbugs.zip}" dest="${findbugs.install.dir}" />
</target>
<!-- To be overridden by other projects importing this -->
<target name="compile" />
<target name="findbugs" depends="findbugs.init,findbugs.install,compile" description="Run findbugs on the tree">
<findbugs home="${findbugs.home}" output="html" outputFile="${findbugs.output.file}">
<sourcePath path="${src.dir}" />
<class location="${build.classes}" />
<auxClasspath refid="classpath" />
</findbugs>
</target>
</project>