Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: howl
Fetching contributors…

Cannot retrieve contributors at this time

666 lines (589 sloc) 27.332 kb
<?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 name="hive" default="jar" >
<property name="hive.root" location="${basedir}"/>
<property file="${hive.root}/build.properties"/>
<property file="${user.home}/build.properties" />
<property file="${basedir}/build.properties" />
<property environment="env"/>
<property name="target.dir" location="${build.dir.hive}/dist"/>
<property name="target.lib.dir" location="${target.dir}/lib"/>
<property name="target.conf.dir" location="${target.dir}/conf"/>
<property name="target.bin.dir" location="${target.dir}/bin"/>
<property name="target.scripts.dir" location="${target.dir}/scripts"/>
<property name="target.example.dir" location="${target.dir}/examples"/>
<property name="ql.test.query.dir" location="${basedir}/ql/src/test/queries"/>
<property name="test.data.dir" location="${basedir}/data"/>
<property name="test.build.dir" value="${build.dir.hive}/test"/>
<property name="build.docs" value="${target.dir}/docs"/>
<property name="build.javadoc" value="${build.docs}/api"/>
<property name="docs.src" value="${hive.root}/docs"/>
<property name="anakia.docs.src" value="${docs.src}/xdocs"/>
<property name="anakia.docs.dest" value="${target.dir}/docs"/>
<property name="changes.src" value="${docs.src}/changes"/>
<property name="images.src" value="${docs.src}/images"/>
<property name="javadoc.link.java"
value="http://java.sun.com/javase/6/docs/api/"/>
<property name="final.name" value="${name}-${version}"/>
<property name="tar.final.name" value="${final.name}"/>
<property name="bin.final.name" value="${final.name}-bin"/>
<property name="vcs.excludes" value="**/.svn,**/.svn/**,**/.git,**/.git/**"/>
<property name="checkstyle.conf.dir" location="${hive.root}/checkstyle"/>
<property name="checkstyle.build.dir" location="${build.dir.hive}/checkstyle"/>
<property name="md5sum.format" value="{0} {1}"/>
<!-- hbase-handler is enabled by default only for Hadoop 0.20.x -->
<condition property="hbase.enabled" value="true" else="false">
<matches string="${hadoop.version.ant-internal}" pattern="^0\.20\..*" />
</condition>
<!-- only iterate over hbase-handler when enabled -->
<condition property="hbase.iterate" value=",hbase-handler/build.xml" else="">
<istrue value="${hbase.enabled}"/>
</condition>
<condition property="is-offline" value="true" else="false">
<isset property="offline"/>
</condition>
<!-- ====================================================== -->
<!-- Macro definitions -->
<!-- ====================================================== -->
<macrodef name="macro_tar" description="Worker Macro for tar">
<attribute name="param.destfile"/>
<element name="param.listofitems"/>
<sequential>
<tar compression="gzip" longfile="gnu" destfile="@{param.destfile}">
<param.listofitems/>
</tar>
<checksum file="@{param.destfile}" algorithm="md5" pattern="${md5sum.format}"/>
</sequential>
</macrodef>
<macrodef name="iterate-cpp">
<attribute name="target"/>
<sequential>
<subant target="@{target}">
<property name="thrift.home" value="${thrift.home}"/>
<property name="build.dir.hive" location="${build.dir.hive}"/>
<!-- TODO filelist dir="." files="metastore/build.xml,serde/build.xml,service/build.xml,odbc/build.xml"/-->
<filelist dir="." files="odbc/build.xml"/>
</subant>
</sequential>
</macrodef>
<macrodef name="iterate-test">
<attribute name="target"/>
<sequential>
<subant target="@{target}">
<property name="thrift.home" value="${thrift.home}"/>
<property name="build.dir.hive" location="${build.dir.hive}"/>
<filelist dir="." files="ql/build.xml,contrib/build.xml,hbase-handler/build.xml,hwi/build.xml,jdbc/build.xml,metastore/build.xml,odbc/build.xml,serde/build.xml,service/build.xml"/>
</subant>
</sequential>
</macrodef>
<macrodef name="iterate-thriftif">
<attribute name="target"/>
<sequential>
<subant target="@{target}">
<property name="thrift.home" value="${thrift.home}"/>
<property name="build.dir.hive" location="${build.dir.hive}"/>
<filelist dir="." files="ql/build.xml,service/build.xml,metastore/build.xml,serde/build.xml"/>
</subant>
</sequential>
</macrodef>
<macrodef name="iterate-all">
<attribute name="target"/>
<sequential>
<subant target="@{target}">
<property name="build.dir.hive" location="${build.dir.hive}"/>
<property name="is-offline" value="${is-offline}"/>
<filelist dir="." files="ant/build.xml,shims/build.xml,common/build.xml,serde/build.xml,metastore/build.xml,ql/build.xml,cli/build.xml,contrib/build.xml,service/build.xml,jdbc/build.xml,hwi/build.xml${hbase.iterate},ant/build.xml"/>
</subant>
</sequential>
</macrodef>
<macrodef name="iterate-test-dirs">
<attribute name="target"/>
<sequential>
<subant target="@{target}">
<property name="build.dir.hive" location="${build.dir.hive}"/>
<property name="is-offline" value="${is-offline}"/>
<filelist dir="." files="common/build.xml,serde/build.xml,metastore/build.xml,ql/build.xml,cli/build.xml,contrib/build.xml,service/build.xml,jdbc/build.xml,hwi/build.xml${hbase.iterate}"/>
</subant>
</sequential>
</macrodef>
<macrodef name="iterate">
<attribute name="target"/>
<sequential>
<subant target="@{target}">
<property name="build.dir.hive" location="${build.dir.hive}"/>
<property name="is-offline" value="${is-offline}"/>
<filelist dir="." files="shims/build.xml,common/build.xml,serde/build.xml,metastore/build.xml,ql/build.xml,cli/build.xml,contrib/build.xml,service/build.xml,jdbc/build.xml,hwi/build.xml${hbase.iterate}"/>
</subant>
</sequential>
</macrodef>
<!-- the normal classpath -->
<path id="common-classpath">
<pathelement location="${hadoop.oldstyle-name.jar}"/>
<pathelement location="${hadoop.newstyle-name.jar}"/>
<pathelement location="${build.dir.hive}/classes"/>
<fileset dir="${hive.root}" includes="hive-*.jar"/>
<fileset dir="${hive.root}/lib" includes="*.jar"/>
<fileset dir="${hive.root}/ql/lib" includes="*.jar"/>
<fileset dir="${build.dir.hive}/ivy/lib/default" includes="*.jar"
excludes="*hadoop*.jar" erroronmissingdir="false"/>
</path>
<path id="classpath">
<pathelement location="${build.dir.hive}/common/classes"/>
<pathelement location="${build.dir.hive}/serde/classes"/>
<pathelement location="${build.dir.hive}/metastore/classes"/>
<pathelement location="${build.dir.hive}/ql/classes"/>
<pathelement location="${build.dir.hive}/cli/classes"/>
<fileset dir="${hive.root}/data" includes="files/*.jar"/>
<fileset dir="${hive.root}/ql" includes="lib/*.jar"/>
<fileset dir="${hive.root}/cli" includes="lib/*.jar"/>
<fileset dir="${hive.root}/service" includes="lib/*.jar"/>
<path refid="common-classpath"/>
</path>
<target name="init">
<iterate-all target="init"/>
</target>
<target name="test-init">
<iterate-all target="test-init"/>
</target>
<target name="compile-cpp"
depends="init"
description="Build CPP artifacts" >
<fail unless="thrift.home">
You must set thrift.home to the absolute path of your
local Thrift installation.
</fail>
<iterate-cpp target="compile-cpp"/>
</target>
<target name="compile-cpp-clean"
description="Clean CPP artifacts">
<iterate-cpp target="clean"/>
</target>
<target name="compile" depends="compile-cpp">
<iterate target="compile"/>
</target>
<target name="thriftif">
<iterate-thriftif target="thriftif"/>
</target>
<target name="jar"
description="Build JAR artifacts">
<iterate target="jar"/>
</target>
<target name="jar-test" depends="jar"
description="Build Java test artifacts">
<iterate-test target="compile-test"/>
</target>
<target name="test"
depends="clean-test,jar"
description="Run tests">
<antcall target="test-shims"/>
<iterate-test-dirs target="test"/>
</target>
<!-- create an html report from junit output files -->
<target name="testreport"
description="Generate JUnit HTML test report">
<mkdir dir="${test.build.dir}"/>
<junitreport todir="${test.build.dir}">
<fileset dir="${build.dir.hive}">
<include name="**/TEST-*.xml"/>
</fileset>
<report format="noframes" todir="${test.build.dir}"/>
</junitreport>
</target>
<target name="clean-test"
description="Clean test results">
<iterate target="clean-test"/>
<delete dir="${build.dir.hive}/test"/>
<delete dir="${hive.root}/ql/TempStatsStore"/>
</target>
<target name="clean"
description="Clean build artifacts">
<iterate-all target="clean"/>
<iterate-cpp target="clean"/>
<delete dir="${target.dir}"/>
<antcall target="clean-online"/>
<antcall target="clean-offline"/>
</target>
<target name="clean-online" unless="offline">
<delete dir="${build.dir.hive}"/>
</target>
<target name="clean-offline" if="offline">
<!-- preserve the downloaded ivy .jar -->
<delete quiet="true" includeemptydirs="true">
<fileset dir="${build.dir.hive}" excludes="ivy/**/ivy*.jar"/>
</delete>
</target>
<!-- ====================================================== -->
<!-- Generate some of the test data. -->
<!-- ====================================================== -->
<target name="gen-testdata"
depends="jar"
description="Generate test data">
<subant target="gen-testdata">
<property name="build.dir.hive" location="${build.dir.hive}"/>
<fileset dir="." includes="serde/build.xml"/>
</subant>
</target>
<target name="package-cpp"
depends="package,compile-cpp"
description="Deploy CPP artifacts">
<mkdir dir="${target.dir}/include"/>
<copy todir="${target.dir}/include" preservelastmodified="true" flatten="true">
<fileset file="${build.dir.hive}/odbc/include/*"/>
</copy>
<copy todir="${target.lib.dir}" preservelastmodified="true" flatten="true">
<fileset file="${build.dir.hive}/odbc/lib/*" excludes="*.so"/>
</copy>
<symlink link="${target.lib.dir}/libhiveclient.so" resource="libhiveclient.so.1.0.0"/>
</target>
<target name="package"
depends="jar"
description="Deploy JAR artifacts">
<echo message="Deploying Hive jars to ${target.dir}"/>
<mkdir dir="${target.dir}"/>
<mkdir dir="${target.lib.dir}"/>
<mkdir dir="${target.conf.dir}"/>
<mkdir dir="${target.bin.dir}"/>
<mkdir dir="${target.scripts.dir}/metastore/upgrade"/>
<mkdir dir="${target.example.dir}"/>
<mkdir dir="${target.example.dir}/files"/>
<mkdir dir="${target.example.dir}/queries"/>
<mkdir dir="${target.lib.dir}/py"/>
<mkdir dir="${target.lib.dir}/php"/>
<copy file="${hive.root}/bin/hive" todir="${target.bin.dir}"/>
<copy todir="${target.scripts.dir}/metastore/upgrade">
<fileset dir="${hive.root}/metastore/scripts/upgrade" excludes="${vcs.excludes}"/>
</copy>
<copy todir="${target.bin.dir}/ext">
<fileset dir="${hive.root}/bin/ext" excludes="${vcs.excludes}"/>
</copy>
<copy file="${hive.root}/bin/hive-config.sh" todir="${target.bin.dir}"/>
<copy file="${basedir}/conf/hive-default.xml" todir="${target.conf.dir}">
<filterset>
<filter token="VERSION" value="${version}"/>
</filterset>
</copy>
<copy todir="${target.conf.dir}">
<fileset dir="${basedir}/conf">
<include name="*.properties"/>
<include name="*.template"/>
</fileset>
</copy>
<!-- Create php thrift package -->
<copy todir="${target.lib.dir}/php">
<fileset dir="${hive.root}/service/lib/php" excludes="${vcs.excludes}"/>
</copy>
<copy todir="${target.lib.dir}/php/packages/serde">
<fileset dir="${hive.root}/serde/src/gen/thrift/gen-php" excludes="${vcs.excludes}"/>
</copy>
<copy todir="${target.lib.dir}/php/packages/hive_metastore">
<fileset dir="${hive.root}/metastore/src/gen/thrift/gen-php" excludes="${vcs.excludes}"/>
</copy>
<copy todir="${target.lib.dir}/php/packages/hive_service">
<fileset dir="${hive.root}/service/src/gen/thrift/gen-php" excludes="${vcs.excludes}"/>
</copy>
<copy todir="${target.lib.dir}/php/packages/queryplan">
<fileset dir="${hive.root}/ql/src/gen/thrift/gen-php" excludes="${vcs.excludes}"/>
</copy>
<!-- Create the python thrift package -->
<copy todir="${target.lib.dir}/py">
<fileset dir="${hive.root}/service/lib/py" excludes="${vcs.excludes}"/>
</copy>
<copy todir="${target.lib.dir}/py/hive_serde">
<fileset dir="${hive.root}/serde/src/gen/thrift/gen-py/org_apache_hadoop_hive_serde" excludes="${vcs.excludes}"/>
</copy>
<copy todir="${target.lib.dir}/py/hive_metastore">
<fileset dir="${hive.root}/metastore/src/gen/thrift/gen-py/hive_metastore" excludes="${vcs.excludes}"/>
</copy>
<copy todir="${target.lib.dir}/py/hive_service">
<fileset dir="${hive.root}/service/src/gen/thrift/gen-py/hive_service" excludes="${vcs.excludes}"/>
</copy>
<copy todir="${target.lib.dir}/py/queryplan">
<fileset dir="${hive.root}/ql/src/gen/thrift/gen-py/queryplan" excludes="${vcs.excludes}"/>
</copy>
<!-- copy jar files -->
<copy todir="${target.lib.dir}" preservelastmodified="true" flatten="true">
<fileset dir="${hive.root}" includes="*/*.jar, */*/*.jar" excludes="**/antlr-2*,**/antlr-3*,**/TestSerDe.jar,*/*howl*.jar"/>
<fileset file="${build.dir.hive}/cli/hive-cli-${version}.jar"/>
<fileset file="${build.dir.hive}/common/hive-common-${version}.jar"/>
<fileset file="${build.dir.hive}/ql/hive-exec-${version}.jar"/>
<fileset file="${build.dir.hive}/metastore/hive-metastore-${version}.jar"/>
<fileset file="${build.dir.hive}/hwi/hive-hwi-${version}.war"/>
<fileset file="${build.dir.hive}/contrib/hive-contrib-${version}.jar"/>
<fileset file="${build.dir.hive}/contrib/hive-hbase_handler-${version}.jar"/>
<fileset dir="${build.dir.hive}/ivy/lib/default">
<include name="*.jar"/>
<exclude name="*.tar.gz"/>
</fileset>
</copy>
<copy todir="${target.example.dir}/files" preservelastmodified="true" flatten="true">
<fileset dir="${test.data.dir}/files" includes="*.*" excludes="${vcs.excludes}"/>
</copy>
<copy file="${basedir}/README.txt" todir="${target.dir}"/>
<copy file="${basedir}/NOTICE" todir="${target.dir}"/>
<copy file="${basedir}/LICENSE" todir="${target.dir}"/>
<copy file="${basedir}/RELEASE_NOTES.txt" todir="${target.dir}"/>
<copy todir="${target.example.dir}/queries" preservelastmodified="true" flatten="true">
<fileset dir="${ql.test.query.dir}/positive" includes="*.q" excludes="${vcs.excludes}"/>
</copy>
<chmod perm="ugo+x" type="file" parallel="false">
<fileset dir="${target.bin.dir}"/>
</chmod>
</target>
<!-- ====================================================== -->
<!-- Generate files for eclipse. -->
<!-- ====================================================== -->
<target name="eclipse-files" depends="init"
description="Generate files for Eclipse">
<condition property="hadoop.version.ant-internal" value="0.20">
<not>
<isset property="hadoop.version.ant-internal"/>
</not>
</condition>
<echo message="Using hadoop version ${hadoop.version.ant-internal}"/>
<taskdef name="getversionpref" classname="org.apache.hadoop.hive.ant.GetVersionPref"
classpath="${build.dir.hive}/anttasks/hive-anttasks-${version}.jar"/>
<getversionpref property="hadoop.version.ant-internal.prefix" input="${hadoop.version.ant-internal}"/>
<condition property="jetty.jar" value="jetty-6.1.14.jar" else="jetty-5.1.4.jar">
<matches string="${hadoop.version.ant-internal}" pattern="^0\.20\..*" />
</condition>
<condition property="jetty.util.jar" value="jetty-util-6.1.14.jar" else="jetty-ext/jsp-api.jar">
<!-- hadoop 0.19 and earlier does not have jetty-util.jar, so we just load another jar -->
<matches string="${hadoop.version.ant-internal}" pattern="^0\.20\..*" />
</condition>
<condition property="servlet-api.jar" value="servlet-api-2.5-6.1.14.jar" else="servlet-api.jar">
<matches string="${hadoop.version.ant-internal}" pattern="^0\.20\..*" />
</condition>
<pathconvert property="eclipse.project">
<path path="${basedir}"/>
<regexpmapper from="^.*/([^/]+)$$" to="\1" handledirsep="yes"/>
</pathconvert>
<copy todir="." overwrite="true">
<fileset dir="eclipse-templates">
<exclude name="**/README.txt"/>
<exclude name="${vcs.excludes}"/>
</fileset>
<filterset>
<filtersfile file="${hive.root}/ivy/libraries.properties"/>
<filter token="PROJECT" value="${eclipse.project}"/>
<filter token="HADOOPVER" value="${hadoop.version.ant-internal}"/>
<filter token="HADOOPVERPREF" value="${hadoop.version.ant-internal.prefix}"/>
<filter token="JETTYJAR" value="${jetty.jar}"/>
<filter token="JETTYUTILJAR" value="${jetty.util.jar}"/>
<filter token="SERVLETAPIJAR" value="${servlet-api.jar}"/>
<filter token="HIVE_VERSION" value="${version}"/>
</filterset>
</copy>
<move todir="." includeemptydirs="false">
<fileset dir=".">
<include name="*.launchtemplate"/>
</fileset>
<mapper type="glob" from="*.launchtemplate" to="*.launch"/>
</move>
</target>
<target name="clean-eclipse-files"
description="Delete files for Eclipse">
<delete includeemptydirs="true">
<fileset dir="." includes=".classpath .project .settings/ .externalToolBuilders/"/>
</delete>
</target>
<!-- ================================================================== -->
<!-- Documentation -->
<!-- ================================================================== -->
<target name="docs" description="Generate documentation">
<antcall target="changes-to-html"/>
<antcall target="docs-anakia"/>
</target>
<target name="changes-to-html" description="Convert CHANGES.txt into an html file">
<mkdir dir="${build.docs}"/>
<exec executable="perl" input="CHANGES.txt" output="${build.docs}/changes.html" failonerror="true">
<arg value="${changes.src}/changes2html.pl"/>
</exec>
<copy todir="${build.docs}">
<fileset dir="${changes.src}" includes="*.css"/>
</copy>
<copy todir="${build.docs}/images">
<fileset dir="${images.src}" includes="*.jpg"/>
</copy>
</target>
<target name="javadoc" depends="package" description="Generate Javadoc">
<mkdir dir="${build.javadoc}"/>
<javadoc
maxmemory="1024m"
packagenames="org.apache.hadoop.hive.*"
destdir="${build.javadoc}"
author="true"
version="true"
use="true"
windowtitle="${Name} ${version} API"
doctitle="${Name} ${version} API"
bottom="Copyright &amp;copy; ${year} The Apache Software Foundation"
>
<packageset dir="ant/src"/>
<packageset dir="hwi/src/java"/>
<packageset dir="hwi/src/test"/>
<packageset dir="common/src/java"/>
<packageset dir="service/src/java"/>
<packageset dir="service/src/test"/>
<packageset dir="service/src/gen/thrift/gen-javabean"/>
<packageset dir="serde/src/java"/>
<packageset dir="serde/src/test"/>
<packageset dir="serde/src/gen/thrift/gen-javabean"/>
<packageset dir="serde/src/gen/protobuf/gen-java"/>
<packageset dir="jdbc/src/java"/>
<packageset dir="jdbc/src/test"/>
<packageset dir="metastore/src/java"/>
<packageset dir="metastore/src/test"/>
<packageset dir="metastore/src/gen/thrift/gen-javabean"/>
<packageset dir="metastore/src/model"/>
<packageset dir="cli/src/java"/>
<packageset dir="ql/src/java"/>
<packageset dir="ql/src/test"/>
<packageset dir="ql/src/gen/thrift/gen-javabean"/>
<packageset dir="${build.dir.hive}/ql/gen/antlr/gen-java"/>
<packageset dir="shims/src/common/java"/>
<packageset dir="howl/src/java"/>
<packageset dir="howl/src/test"/>
<link href="${javadoc.link.java}"/>
<classpath >
<fileset dir="${hadoop.root}/lib">
<include name="**/*.jar" />
<exclude name="**/excluded/" />
</fileset>
<path refid="classpath" />
<pathelement path="${java.class.path}"/>
</classpath>
<group title="Hive" packages="org.apache.*"/>
</javadoc>
</target>
<!-- ================================================================== -->
<!-- Make release tarball -->
<!-- ================================================================== -->
<target name="tar" depends="package, docs, javadoc" description="Make release tarball">
<macro_tar param.destfile="${build.dir.hive}/${tar.final.name}.tar.gz">
<param.listofitems>
<tarfileset dir="${build.dir.hive}/dist" mode="755" prefix="${tar.final.name}"
excludes="${vcs.excludes}">
<include name="bin/**"/>
</tarfileset>
<tarfileset dir="${build.dir.hive}/dist" mode="755" prefix="${tar.final.name}"
excludes="${vcs.excludes}">
<include name="lib/py/**/*-remote"/>
</tarfileset>
<tarfileset dir="${build.dir.hive}/dist" mode="664" prefix="${tar.final.name}"
excludes="${vcs.excludes}">
<include name="**"/>
<exclude name="bin/**"/>
<exclude name="lib/py/**/*-remote"/>
</tarfileset>
<tarfileset dir="${hive.root}" mode="664" prefix="${tar.final.name}/src"
excludes="${vcs.excludes}">
<exclude name="build/**" />
<exclude name="bin/**" />
<exclude name="**/py/**/*-remote" />
<exclude name="data/scripts/**" />
<exclude name="metastore/scripts/**" />
<exclude name="ql/src/test/scripts/**" />
</tarfileset>
<tarfileset dir="${hive.root}" mode="755" prefix="${tar.final.name}/src"
excludes="${vcs.excludes}">
<exclude name="build/**" />
<include name="bin/**" />
<include name="**/py/**/*-remote" />
<include name="data/scripts/**" />
<include name="metastore/scripts/**" />
<include name="ql/src/test/scripts/**" />
</tarfileset>
</param.listofitems>
</macro_tar>
</target>
<target name="binary" depends="package, docs, javadoc"
description="Make release tarball without source and documentation">
<macro_tar param.destfile="${build.dir.hive}/${bin.final.name}.tar.gz">
<param.listofitems>
<tarfileset dir="${build.dir.hive}/dist" mode="755" prefix="${bin.final.name}"
excludes="${vcs.excludes}">
<include name="bin/**"/>
</tarfileset>
<tarfileset dir="${build.dir.hive}/dist" mode="755" prefix="${bin.final.name}"
excludes="${vcs.excludes}">
<include name="lib/py/**/*-remote"/>
</tarfileset>
<tarfileset dir="${build.dir.hive}/dist" mode="664" prefix="${bin.final.name}"
excludes="${vcs.excludes}">
<include name="**"/>
<exclude name="bin/**"/>
<exclude name="docs/**"/>
<exclude name="lib/py/**/*-remote"/>
</tarfileset>
</param.listofitems>
</macro_tar>
</target>
<!-- ================================================================== -->
<!-- Checkstyle -->
<!-- ================================================================== -->
<import file="${hive.root}/build-common.xml"/>
<target name="checkstyle" depends="ivy-retrieve-checkstyle,check-for-checkstyle"
if="checkstyle.present"
description="Run Checkstyle on source files">
<taskdef resource="checkstyletask.properties">
<classpath refid="checkstyle-classpath"/>
</taskdef>
<mkdir dir="${checkstyle.build.dir}"/>
<checkstyle config="${checkstyle.conf.dir}/checkstyle.xml"
failOnViolation="false">
<fileset dir="${hive.root}">
<exclude name="build/**"/>
<exclude name="ant/**"/>
<include name="**/*.java"/>
</fileset>
<formatter type="plain" toFile="${checkstyle.build.dir}/checkstyle-errors.txt"/>
<formatter type="xml" toFile="${checkstyle.build.dir}/checkstyle-errors.xml"/>
</checkstyle>
<xslt style="${checkstyle.conf.dir}/checkstyle-noframes-sorted.xsl"
in="${checkstyle.build.dir}/checkstyle-errors.xml"
out="${checkstyle.build.dir}/checkstyle-errors.html"/>
</target>
<target name="check-for-checkstyle">
<available property="checkstyle.present" resource="checkstyletask.properties">
<classpath refid="checkstyle-classpath"/>
</available>
</target>
<target name="docs-anakia" depends="ivy-docs">
<echo message="Building xdocs with anakia"/>
<mkdir dir="${build.dir.hive}/docs"/>
<taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
<classpath refid="common-classpath"/>
<classpath refid="docs-classpath"/>
</taskdef>
<anakia basedir="${anakia.docs.src}" destdir="${anakia.docs.dest}"
extension=".html" style="./docs/stylesheets/site.vsl"
projectFile="../stylesheets/project.xml"
excludes="**/stylesheets/**"
includes="**/*.xml"
lastModifiedCheck="false"
velocityPropertiesFile="${docs.src}/velocity.properties">
</anakia>
<copy todir="${anakia.docs.dest}/images" filtering="no">
<fileset dir="${docs.src}/images">
<include name="**/*.gif"/>
<include name="**/*.jpeg"/>
<include name="**/*.jpg"/>
<include name="**/*.png"/>
</fileset>
</copy>
<copy file="${docs.src}/site.css" tofile="${anakia.docs.dest}/site.css" />
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.