HBASE-2139 findbugs task in build.xml

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@900211 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-01-17 20:18:57 +00:00
parent 055580dee1
commit 7a8f4c08e3
5 changed files with 81 additions and 1 deletions

View File

@ -177,6 +177,7 @@ Release 0.21.0 - Unreleased
(Kay Kay via Stack)
HBASE-2140 findbugs issues - 2 performance warnings as suggested by findbugs
(Kay Kay via Stack)
HBASE-2139 findbugs task in build.xml (Kay Kay via Stack)
IMPROVEMENTS
HBASE-1760 Cleanup TODOs in HTable

View File

@ -95,7 +95,7 @@
<property name="ivy.dir" location="${hbase.root}/ivy" />
<import file="${basedir}/ivy-targets.xml" />
<import file="${basedir}/findbugs-targets.xml" />
<!--We need to have the hadoop jars ride in front of the hbase classes or we
get the below exceptions:

59
findbugs-targets.xml Normal file
View File

@ -0,0 +1,59 @@
<?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>

View File

@ -1,3 +1,22 @@
<?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="." xmlns:ivy="antlib:org.apache.ivy.ant">
<!-- IVY properteis set here -->
<property name="ivy.repo.dir" value="${user.home}/ivyrepo" />

View File

@ -71,6 +71,7 @@
</and>
</condition>
<import file="../../ivy-targets.xml" />
<import file="../../findbugs-targets.xml" />
<!-- the normal classpath -->