| <?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="hcatalog" default="jar" xmlns:ivy="antlib:org.apache.ivy.ant" > |
| <property name="hcatalog.home" value="${basedir}" /> |
| <property file="${hcatalog.home}/build.properties" /> |
| |
| <!-- |
| ================================================================================ |
| Imports |
| ================================================================================ --> |
| <import file="build-common.xml"/> |
| |
| <!-- |
| ================================================================================ |
| Properties and Classpaths Section |
| ================================================================================ |
| --> |
| <!-- name and version --> |
| <property name="_version" value="0.4.1"/> |
| <property name="_vtype" value="-dev"/> |
| <property name="hcatalog.version" value="${_version}${_vtype}"/> |
| <property name="hcatalog.jar" value="${ant.project.name}-${hcatalog.version}.jar"/> |
| <property name="final.name" value="${ant.project.name}-${hcatalog.version}" /> |
| <property name="package.release" value="1"/> |
| |
| <!-- build properties --> |
| <property name="lib.dir" value="${basedir}/lib/" /> |
| <property name="src.dir" location="${basedir}/src/java"/> |
| <property name="package.dir" location="${basedir}/src/packages"/> |
| <property name="docs.src" value="${basedir}/src/docs"/> |
| <property name="dist.dir" value="${build.dir}/${final.name}" /> |
| |
| <!-- javac properties --> |
| <property name="excludes" value=""/> |
| |
| <!-- test properties --> |
| <property name="test.src.dir" value="${basedir}/src/test" /> |
| <property name="test.build.dir" value="${build.dir}/test" /> |
| <property name="test.build.classes" value="${test.build.dir}/classes" /> |
| <property name="test.log.dir" value="${test.build.dir}/logs" /> |
| <property name="test.timeout" value="2700000" /> |
| <property name="test.junit.output.format" value="plain" /> |
| <property name="test.all.file" value="${test.src.dir}/all-tests"/> |
| <property name="test.exclude.file" value="${test.src.dir}/excluded-tests"/> |
| <property name="test.output" value="no"/> |
| <property name="test.warehouse.dir" value="/tmp/hcat_junit_warehouse"/> |
| <property name="test.excludes" value="e2e/**"/> |
| |
| <property name="clover.db.dir" location="${build.dir}/test/clover/db"/> |
| <property name="clover.report.dir" location="${build.dir}/test/clover/reports"/> |
| <property name="clover.pdf.report.dir" location="${build.dir}/test/clover/pdf/reports"/> |
| <property name="clover.jar" location="${clover.home}/lib/clover.jar"/> |
| <available property="clover.present" file="${clover.jar}" /> |
| |
| <!-- check if clover reports should be generated --> |
| <condition property="clover.enabled"> |
| <and> |
| <isset property="run.clover"/> |
| <isset property="clover.present"/> |
| </and> |
| </condition> |
| <condition property="staging"> |
| <equals arg1="${repo}" arg2="staging"/> |
| </condition> |
| |
| <!-- e2e test properties --> |
| <property name="test.e2e.dir" value="${basedir}/src/test/e2e/hcatalog"/> |
| |
| <!-- ivy properties set here --> |
| <property name="ivy.repo.dir" value="${user.home}/ivyrepo" /> |
| <loadproperties srcfile="${ivy.conf.dir}/libraries.properties"/> |
| <property name="asfrepo" value="https://repository.apache.org"/> |
| <property name="asfsnapshotrepo" value="${asfrepo}/content/repositories/snapshots"/> |
| <property name="asfstagingrepo" value="${asfrepo}/service/local/staging/deploy/maven2"/> |
| <property name="ivy.jar" location="${ivy.conf.dir}/ivy-${ivy.version}.jar"/> |
| <property name="ant_task.jar" location="${ivy.conf.dir}/maven-ant-tasks-${ant-task.version}.jar"/> |
| <property name="ant_task_repo_url" |
| value="${mvnrepo}/org/apache/maven/maven-ant-tasks/${ant-task.version}/maven-ant-tasks-${ant-task.version}.jar"/> |
| <property name="ivy_repo_url" value="${mvnrepo}/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar"/> |
| <property name="ivy.xml" location="${basedir}/ivy.xml"/> |
| <property name="pom.file" location="${build.ivy.dir}/${ant.project.name}-${hcatalog.version}.pom"/> |
| <property name="ivy.lib.dir" location="${build.ivy.lib.dir}/${ant.project.name}"/> |
| <property name="build.ivy.report.dir" location="${build.ivy.dir}/report" /> |
| |
| <!-- packaging properties --> |
| <property name="package.prefix" value="/usr"/> |
| <property name="package.conf.dir" value="/etc/hcatalog"/> |
| <property name="package.log.dir" value="/var/log/hcatalog"/> |
| <property name="package.pid.dir" value="/var/run/hcatalog"/> |
| <property name="package.var.dir" value="/var/lib/hcatalog"/> |
| <property name="package.share.dir" value="/share/hcatalog/${module}"/> |
| <property name="package.buildroot" value="${build.dir}/rpm/hcatalog_package_build_${user.name}"/> |
| <property name="package.build.dir" value="${build.dir}/rpm/hcatalog_package_build_${user.name}/BUILD"/> |
| |
| <condition property="os-arch" value="x86_64"> |
| <and> |
| <os arch="amd64" /> |
| </and> |
| </condition> |
| <condition property="os-arch" value="i386"> |
| <or> |
| <os arch="i386" /> |
| <os arch="i486" /> |
| <os arch="i586" /> |
| <os arch="i686" /> |
| </or> |
| </condition> |
| |
| <!-- rats properties --> |
| <property name="rat.reporting.classname" value="rat.Report"/> |
| |
| <!--this is the naming policy for artifacts we want pulled down--> |
| <property name="ivy.artifact.retrieve.pattern" value="${ant.project.name}/[artifact]-[revision](-[classifier]).[ext]"/> |
| |
| <!-- Classpaths for various builds --> |
| <path id="classpath"> |
| <path refid="common.classpath"/> |
| </path> |
| |
| <condition property="os-arch" value="x86_64"> |
| <and> |
| <os arch="amd64" /> |
| </and> |
| </condition> |
| <condition property="os-arch" value="i386"> |
| <or> |
| <os arch="i386" /> |
| <os arch="i486" /> |
| <os arch="i586" /> |
| <os arch="i686" /> |
| </or> |
| </condition> |
| |
| <path id="test.classpath"> |
| <pathelement location="${test.build.classes}" /> |
| <pathelement location="${build.classes}" /> |
| <pathelement location="conf"/> |
| <fileset dir="${ivy.lib.dir}"> |
| <include name="**/*.jar" /> |
| </fileset> |
| <pathelement location="${hcatalog.jar}"/> |
| </path> |
| |
| <!-- |
| ================================================================================ |
| Ivy Section |
| ================================================================================ |
| --> |
| <!-- Ivy goop stolen directly from Pig's build.xml --> |
| <target name="ivy-init-dirs"> |
| <mkdir dir="${build.ivy.dir}" /> |
| <mkdir dir="${build.ivy.lib.dir}" /> |
| <mkdir dir="${build.ivy.report.dir}" /> |
| </target> |
| |
| <target name="ivy-probe-antlib" > |
| <condition property="ivy.found"> |
| <typefound uri="antlib:org.apache.ivy.ant" name="cleancache"/> |
| </condition> |
| </target> |
| |
| <target name="ivy-download" description="To download ivy" unless="offline"> |
| <get src="${ivy_repo_url}" dest="${ivy.jar}" usetimestamp="true"/> |
| </target> |
| |
| <!-- |
| To avoid Ivy leaking things across big projects, always load Ivy in the same classloader. |
| Also note how we skip loading Ivy if it is already there, just to make sure all is well. |
| --> |
| <target name="ivy-init-antlib" depends="ivy-download,ivy-init-dirs,ivy-probe-antlib" unless="ivy.found"> |
| <typedef uri="antlib:org.apache.ivy.ant" onerror="fail" loaderRef="ivyLoader"> |
| <classpath> |
| <pathelement location="${ivy.jar}"/> |
| </classpath> |
| </typedef> |
| <fail> |
| <condition > |
| <not> |
| <typefound uri="antlib:org.apache.ivy.ant" name="cleancache"/> |
| </not> |
| </condition> |
| You need Apache Ivy 2.0 or later from http://ant.apache.org/ |
| It could not be loaded from ${ivy_repo_url} |
| </fail> |
| </target> |
| |
| <target name="ivy-init" depends="ivy-init-antlib" > |
| <!--Configure Ivy by reading in the settings file |
| If anyone has already read in a settings file into this settings ID, it gets priority |
| --> |
| <ivy:configure settingsid="${ant.project.name}.ivy.settings" |
| file="${ivysettings.xml}" override='false'/> |
| <ivy:makepom ivyfile="${ivy.xml}" pomfile="${pom.file}"/> |
| </target> |
| |
| <target name="ivy-compile" depends="ivy-init" description="Resolve, Retrieve Ivy-managed artifacts for compile configuration"> |
| <ivy:resolve settingsRef="${ant.project.name}.ivy.settings" conf="common"/> |
| <ivy:retrieve settingsRef="${ant.project.name}.ivy.settings" |
| pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" conf="common"/> |
| <ivy:cachepath pathid="compile.classpath" conf="common"/> |
| <ivy:resolve settingsRef="${ant.project.name}.ivy.settings" conf="default"/> |
| <ivy:retrieve settingsRef="${ant.project.name}.ivy.settings" |
| pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" conf="default"/> |
| <ivy:cachepath pathid="compile.classpath" conf="default"/> |
| </target> |
| |
| <target name="ivy-package" depends="ivy-init" |
| description="Retrieve Ivy-managed artifacts for the package configurations"> |
| <ivy:resolve settingsRef="${ant.project.name}.ivy.settings" conf="package"/> |
| <ivy:retrieve settingsRef="${ant.project.name}.ivy.settings" |
| pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" conf="package"/> |
| <ivy:cachepath pathid="package.classpath" conf="package"/> |
| </target> |
| |
| <target name="ivy-releaseaudit" depends="ivy-init" description="Resolve, Retrieve Ivy-managed artifacts for releaseaudit configuration"> |
| <ivy:resolve settingsRef="${ant.project.name}.ivy.settings" conf="releaseaudit"/> |
| <ivy:retrieve settingsRef="${ant.project.name}.ivy.settings" |
| pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" conf="releaseaudit"/> |
| <ivy:cachepath pathid="releaseaudit.classpath" conf="releaseaudit"/> |
| </target> |
| |
| <target name="init" depends="ivy-compile, ivy-package" > |
| <mkdir dir="${dist.dir}" /> |
| <mkdir dir="${build.classes}" /> |
| <mkdir dir="${test.build.classes}" /> |
| </target> |
| |
| <!-- |
| ================================================================================ |
| Main Build and Jar Section |
| ================================================================================ |
| --> |
| <!-- Build HCatalog src files --> |
| <target name="compile-src" depends="init"> |
| <javac encoding="${build.encoding}" srcdir="${src.dir}" excludes="${excludes}" |
| includes="**/*.java" destdir="${build.classes}" debug="${javac.debug}" |
| optimize="${javac.optimize}" target="${javac.version}" |
| source="${javac.version}" deprecation="${javac.deprecation}" |
| includeantruntime="false"> |
| <compilerarg line="${javac.args}"/> |
| <classpath refid="classpath" /> |
| </javac> |
| </target> |
| |
| <!-- Build the hcatalog client jar --> |
| <target name="clientjar" depends="compile-src"> |
| <jar jarfile="${build.dir}/${ant.project.name}/${hcatalog.jar}" basedir="${build.classes}"> |
| </jar> |
| </target> |
| |
| <!-- |
| ================================================================================ |
| Build server side code, mainly listener. |
| ================================================================================ |
| --> |
| <!-- Build the server side jar --> |
| <target name="server-extensions" depends="compile-src"> |
| <jar jarfile="${build.dir}/${ant.project.name}/${ant.project.name}-server-extensions-${hcatalog.version}.jar" basedir="${build.classes}" |
| includes="org/apache/hcatalog/listener/**,org/apache/hcatalog/metadata/**"> |
| </jar> |
| </target> |
| |
| <target name="shims" depends="compile-src"> |
| <ant antfile="shims/build.xml" target="jar" inheritAll="true" useNativeBasedir="true" /> |
| </target> |
| |
| <!-- |
| ================================================================================ |
| Build both clientjar and server-extensions |
| ================================================================================ |
| --> |
| <target name="jar" depends="shims,clientjar,server-extensions,jar-storage-handlers,jar-webhcat-java-client"/> |
| |
| <!-- |
| ================================================================================ |
| Build storage handlers |
| ================================================================================ |
| --> |
| |
| <target name="jar-storage-handlers"> |
| <ant target="jar" dir="storage-handlers" inheritAll="false" useNativeBasedir="true"/> |
| </target> |
| |
| <!-- |
| ================================================================================ |
| Build WebHCatalog java client. |
| ================================================================================ |
| --> |
| |
| <target name="jar-webhcat-java-client"> |
| <ant target="jar" dir="webhcat/java-client" inheritAll="false"/> |
| </target> |
| |
| <!-- |
| ================================================================================ |
| Test Section |
| ================================================================================ |
| --> |
| <!-- Build HCatalog test files --> |
| <target name="compile-test" depends="jar"> |
| <javac encoding="${build.encoding}" srcdir="${test.src.dir}" excludes="${test.excludes}" |
| includes="**/*.java" destdir="${test.build.classes}" debug="${javac.debug}" |
| optimize="${javac.optimize}" target="${javac.version}" |
| source="${javac.version}" deprecation="${javac.deprecation}" |
| includeantruntime="false"> |
| <compilerarg line="${javac.args}"/> |
| <classpath refid="test.classpath" /> |
| </javac> |
| </target> |
| |
| <!-- Run the unit tests --> |
| <target name="test-storage-handlers"> |
| <ant target="test" dir="storage-handlers" inheritAll="false" useNativeBasedir="true"/> |
| </target> |
| |
| <target name="test" depends="compile-test"> |
| <sequential> |
| <!-- If anyone knows how to set umask inside ant please do so --> |
| <exec executable="bin/umaskcheck.sh" failonerror="true"/> |
| <delete dir="${test.log.dir}"/> |
| <delete dir="${test.warehouse.dir}"/> |
| <mkdir dir="${test.log.dir}"/> |
| <mkdir dir="${test.warehouse.dir}"/> |
| <junit showoutput="${test.output}" printsummary="yes" haltonfailure="no" |
| fork="yes" maxmemory="512m" dir="${basedir}" timeout="${test.timeout}" |
| errorProperty="tests.failed" failureProperty="tests.failed"> |
| <sysproperty key="hadoop.log.dir" value="${test.log.dir}"/> |
| <sysproperty key="hive.metastore.warehouse.dir" value="${test.warehouse.dir}"/> |
| <classpath> |
| <pathelement location="${test.build.classes}" /> |
| <pathelement location="." /> |
| <pathelement path="${clover.jar}"/> |
| <path refid="test.classpath"/> |
| </classpath> |
| <formatter type="${test.junit.output.format}" /> |
| <!-- If the user has not defined a particular test to run, run them all --> |
| <batchtest fork="yes" todir="${test.log.dir}" unless="testcase"> |
| <fileset dir="src/test"> |
| <patternset> |
| <includesfile name="${test.all.file}"/> |
| <excludesfile name="${test.exclude.file}"/> |
| </patternset> |
| </fileset> |
| </batchtest> |
| <!-- Run one test case. To use this define -Dtestcase=X on the command line --> |
| <batchtest fork="yes" todir="${test.log.dir}" if="testcase"> |
| <fileset dir="src/test" includes="**/${testcase}.java"/> |
| </batchtest> |
| |
| <assertions> |
| <enable /> |
| </assertions> |
| |
| </junit> |
| <fail if="tests.failed">Tests failed!</fail> |
| </sequential> |
| <!-- test storage handlers --> |
| <antcall target="test-storage-handlers"/> |
| <!-- Test web hcatalog java client --> |
| <ant target="test" dir="webhcat/java-client" inheritAll="false"/> |
| </target> |
| |
| <!-- |
| ================================================================================ |
| Clover Section |
| ================================================================================ |
| --> |
| |
| <target name="clover" depends="clover.setup, clover.info" |
| description="Instrument the Unit tests using Clover. To use, specify |
| -Dclover.home=<base of clover installation> -Drun.clover=true on |
| the command line."/> |
| |
| <target name="clover.setup" if="clover.enabled"> |
| <taskdef resource="cloverlib.xml" classpath="${clover.jar}"/> |
| <mkdir dir="${clover.db.dir}"/> |
| <clover-setup initString="${clover.db.dir}/hcat_coverage.db"> |
| <fileset dir="src" includes="**/*.java" excludes="**/NoExitSecurityManager.java"/> |
| </clover-setup> |
| </target> |
| |
| <target name="clover.info" unless="clover.present"> |
| <echo> |
| Clover not found. Code coverage reports disabled. |
| </echo> |
| </target> |
| |
| <target name="clover.check"> |
| <fail unless="clover.present"> |
| ################################################################## |
| Clover not found. |
| Please specify -Dclover.home=<base of clover installation> |
| on the command line. |
| ################################################################## |
| </fail> |
| </target> |
| |
| <target name="generate-clover-reports" depends="clover.check, clover"> |
| <mkdir dir="${clover.report.dir}"/> |
| <clover-report> |
| <current outfile="${clover.report.dir}" title="${final.name}"> |
| <format type="html"/> |
| </current> |
| </clover-report> |
| <clover-report> |
| <current outfile="${clover.report.dir}/clover.xml" title="${final.name}"> |
| <format type="xml"/> |
| </current> |
| </clover-report> |
| </target> |
| |
| <target name="generate-pdf-clover-reports" depends="clover.check, clover"> |
| <mkdir dir="${clover.pdf.report.dir}"/> |
| <clover-pdf-report outfile="${clover.pdf.report.dir}/clover_coverage.pdf" /> |
| </target> |
| |
| <!-- |
| ================================================================================ |
| Findbugs Section |
| ================================================================================ |
| --> |
| |
| <property name="findbugs.home" value=""/> |
| |
| <target name="findbugs" depends="check-for-findbugs, jar" if="findbugs.present" description="Run findbugs if present"> |
| <property name="findbugs.out.dir" value="${test.build.dir}/findbugs"/> |
| <property name="findbugs.exclude.file" value="${test.src.dir}/findbugsExcludeFile.xml"/> |
| <property name="findbugs.report.htmlfile" value="${findbugs.out.dir}/hcat-findbugs-report.html"/> |
| <property name="findbugs.report.xmlfile" value="${findbugs.out.dir}/hcat-findbugs-report.xml"/> |
| <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${findbugs.home}/lib/findbugs-ant.jar"/> |
| <mkdir dir="${findbugs.out.dir}"/> |
| <findbugs home="${findbugs.home}" output="xml:withMessages" outputFile="${findbugs.report.xmlfile}" effort="max" timeout="2400000" excludeFilter="${findbugs.exclude.file}" jvmargs="-Xmx1024M"> |
| <auxClasspath> |
| <fileset dir="${build.ivy.lib.dir}"> |
| <include name="**/*.jar"/> |
| </fileset> |
| </auxClasspath> |
| <sourcePath path="${src.dir}"/> |
| <fileset dir="${build.dir}/${ant.project.name}"> |
| <include name="**/*.jar"/> |
| </fileset> |
| </findbugs> |
| <xslt style="${findbugs.home}/src/xsl/default.xsl" in="${findbugs.report.xmlfile}" out="${findbugs.report.htmlfile}"/> |
| </target> |
| |
| <target name="check-for-findbugs"> |
| <available property="findbugs.present" file="${findbugs.home}/lib/findbugs.jar"/> |
| </target> |
| |
| <target name="findbugs.check" depends="check-for-findbugs" unless="findbugs.present"> |
| <fail message="'findbugs.home' is not defined. Please pass -Dfindbugs.home=<base of Findbugs installation> |
| to Ant on the command-line." /> |
| </target> |
| |
| <!-- |
| ================================================================================ |
| Clean Section |
| ================================================================================ |
| --> |
| <!-- Clean up children --> |
| <target name="clean" description="Cleanup all build artifacts"> |
| <delete dir="${build.dir}" /> |
| <delete dir="${test.warehouse.dir}"/> |
| <ant target="clean" dir="storage-handlers" inheritAll="false" useNativeBasedir="true"/> |
| <ant target="clean" dir="webhcat/java-client" inheritAll="false"/> |
| </target> |
| |
| <!-- |
| ================================================================================ |
| Docs Section |
| ================================================================================ |
| --> |
| <target name="docs" depends="forrest, javadoc" |
| description="Generate Javadoc and Forrest documentation" /> |
| |
| <target name="forrest" if="forrest.home" |
| description="Generate forrest-based documentation. To use, specify -Dforrest.home=<base of Apache Forrest installation> on the command line."> |
| <exec dir="${docs.src}" executable="${forrest.home}/bin/forrest" |
| failonerror="true"> |
| </exec> |
| <copy todir="${build.docs}/"> |
| <fileset dir="${docs.src}/build/site/" /> |
| </copy> |
| </target> |
| |
| <target name="javadoc" depends="jar" description="Generate Javadoc documentation"> |
| <mkdir dir="${build.javadoc}" /> |
| <javadoc overview="${src.dir}/../docs/overview.html" |
| packagenames="org.apache.hcatalog.*" |
| destdir="${build.javadoc}" |
| author="true" |
| version="true" |
| use="true" |
| noqualifier="all" |
| windowtitle="HCatalog ${hcatalog.version} API" |
| doctitle="HCatalog ${hcatalog.version} API" |
| failonerror="true"> |
| <packageset dir="${src.dir}" /> |
| <packageset dir="webhcat/java-client/src/main/java" /> |
| <classpath> |
| <path refid="classpath" /> |
| </classpath> |
| <group title="hcatalog" packages="org.apache.hcatalog.*" /> |
| </javadoc> |
| </target> |
| |
| <!-- |
| =============================================================================== |
| Distribution Section |
| =============================================================================== |
| --> |
| <target name="package-storage-handlers"> |
| <property name="handlers.dir" value="${dist.dir}/share/hcatalog/storage-handlers"/> |
| <mkdir dir="${handlers.dir}"/> |
| <ant target="package" dir="storage-handlers" inheritAll="false" useNativeBasedir="true"> |
| <property name="dist.handlers.dir" value="${handlers.dir}"/> |
| </ant> |
| <copy todir="${dist.dir}/share/${ant.project.name}/lib" includeEmptyDirs="false" flatten="true"> |
| <fileset dir="${dist.dir}/share/${ant.project.name}/storage-handlers"> |
| <include name="*/lib/*"/> |
| </fileset> |
| </copy> |
| </target> |
| |
| <target name="package-webhcat-java-client"> |
| <property name="javaclient.dir" value="${dist.dir}/share/hcatalog/webhcat/java-client"/> |
| <mkdir dir="${javaclient.dir}"/> |
| <ant target="package" dir="webhcat/java-client" inheritAll="false"> |
| <property name="dist.javaclient.dir" value="${javaclient.dir}"/> |
| </ant> |
| <copy todir="${dist.dir}/share/${ant.project.name}/lib" includeEmptyDirs="false" flatten="true"> |
| <fileset dir="${dist.dir}/share/${ant.project.name}/webhcat/java-client"> |
| <include name="*/lib/*"/> |
| </fileset> |
| </copy> |
| </target> |
| |
| <target name="package" depends="jar, docs" description="Create an HCatalog release"> |
| <mkdir dir="${dist.dir}" /> |
| <mkdir dir="${dist.dir}/share/${ant.project.name}/lib" /> |
| <mkdir dir="${dist.dir}/etc/hcatalog" /> |
| <mkdir dir="${dist.dir}/bin" /> |
| <mkdir dir="${dist.dir}/sbin" /> |
| <mkdir dir="${dist.dir}/share/${ant.project.name}/scripts" /> |
| <mkdir dir="${dist.dir}/share/${ant.project.name}/templates/conf" /> |
| <mkdir dir="${dist.dir}/share/doc/${ant.project.name}" /> |
| <mkdir dir="${dist.dir}/share/doc/${ant.project.name}/api" /> |
| <mkdir dir="${dist.dir}/share/doc/${ant.project.name}/jdiff"/> |
| <mkdir dir="${dist.dir}/share/doc/${ant.project.name}/license" /> |
| |
| <copy todir="${dist.dir}/share/${ant.project.name}" includeEmptyDirs="false"> |
| <fileset dir="${build.dir}/${ant.project.name}/"> |
| <include name="hcatalog-*.jar"/> |
| </fileset> |
| </copy> |
| |
| <copy todir="${dist.dir}/bin"> |
| <fileset dir="bin/"> |
| <include name="hcat"/> |
| </fileset> |
| |
| </copy> |
| <copy todir="${dist.dir}/libexec"> |
| <fileset dir="bin"> |
| <include name="hcat-config.sh"/> |
| </fileset> |
| </copy> |
| |
| <copy todir="${dist.dir}/sbin"> |
| <fileset dir="${package.dir}"> |
| <include name="*.sh"/> |
| </fileset> |
| </copy> |
| |
| <copy todir="${dist.dir}/etc/${ant.project.name}"> |
| <fileset dir="conf" /> |
| </copy> |
| |
| <copy todir="${dist.dir}/share/${ant.project.name}/scripts"> |
| <fileset dir="scripts"> |
| <include name="*.sh"/> |
| </fileset> |
| </copy> |
| |
| <copy todir="${dist.dir}/share/${ant.project.name}/templates/conf"> |
| <fileset dir="src/packages/templates/conf"> |
| <include name="*"/> |
| </fileset> |
| </copy> |
| |
| <copy todir="${dist.dir}/sbin"> |
| <fileset dir="${package.dir}"> |
| <include name="*.sh"/> |
| </fileset> |
| <fileset dir="bin"> |
| <include name="hcat_server.sh"/> |
| </fileset> |
| </copy> |
| |
| <!-- Copy the licenses and such --> |
| <copy todir="${dist.dir}/share/doc/${ant.project.name}"> |
| <fileset dir="."> |
| <include name="*.txt" /> |
| </fileset> |
| </copy> |
| |
| <copy todir="${dist.dir}/share/doc/${ant.project.name}/license"> |
| <fileset dir="license" /> |
| </copy> |
| |
| <chmod perm="ugo+x" type="file"> |
| <fileset dir="${dist.dir}/bin" /> |
| <fileset dir="${dist.dir}/sbin" /> |
| </chmod> |
| <!--package storage-handlers --> |
| <antcall target="package-storage-handlers"/> |
| <antcall target="package-webhcat-java-client"/> |
| </target> |
| |
| <target name="releaseaudit" depends="ivy-releaseaudit" description="Release Audit activities"> |
| <java classname="${rat.reporting.classname}" fork="true"> |
| <classpath refid="releaseaudit.classpath"/> |
| <arg value="${basedir}/src"/> |
| </java> |
| </target> |
| |
| <!-- ================================================================== --> |
| <!-- Make release tarball --> |
| <!-- ================================================================== --> |
| <target name="src-release" depends="clean" description="Source distribution"> |
| <mkdir dir="${build.dir}"/> |
| <tar compression="gzip" longfile="gnu" destfile="${build.dir}/${ant.project.name}-src-${hcatalog.version}.tar.gz"> |
| <tarfileset dir="${basedir}" mode="644" prefix="${ant.project.name}-src-${hcatalog.version}"> |
| <include name="conf/**"/> |
| <include name="ivy/**"/> |
| <exclude name="ivy/*.jar"/> |
| <include name="license/**"/> |
| <include name="shims/**"/> |
| <include name="src/**"/> |
| <include name="storage-handlers/**"/> |
| <include name="webhcat/**"/> |
| <include name="*.txt"/> |
| <include name="*.xml"/> |
| <include name="KEYS"/> |
| </tarfileset> |
| <tarfileset dir="" mode="755" prefix="${ant.project.name}-src-${hcatalog.version}"> |
| <include name="scripts/**"/> |
| <include name="bin/**"/> |
| </tarfileset> |
| </tar> |
| </target> |
| |
| <!-- ================================================================== --> |
| <!-- Make release binary packages --> |
| <!-- ================================================================== --> |
| <target name="tar" depends="package" description="Create release tarball"> |
| <tar compression="gzip" longfile="gnu" destfile="${build.dir}/${final.name}.tar.gz"> |
| <tarfileset dir="${build.dir}" mode="664"> |
| <include name="${final.name}/**" /> |
| <exclude name="${final.name}/bin/*" /> |
| <exclude name="${final.name}/sbin/*" /> |
| <exclude name="${final.name}/share/hcatalog/scripts/*" /> |
| </tarfileset> |
| <tarfileset dir="${build.dir}" mode="755"> |
| <include name="${final.name}/bin/*" /> |
| <include name="${final.name}/sbin/*" /> |
| <include name="${final.name}/share/hcatalog/scripts/*" /> |
| </tarfileset> |
| </tar> |
| </target> |
| |
| <!-- ================================================================== --> |
| <!-- End to end tests --> |
| <!-- ================================================================== --> |
| |
| <target name="test-e2e" description="run end-to-end tests"> |
| <ant dir="${test.e2e.dir}"/> |
| </target> |
| |
| <target name="test-e2e-install" description="deploy end-to-end tests to existing cluster"> |
| <ant dir="${test.e2e.dir}" target="install"/> |
| </target> |
| |
| <target name="test-e2e-deploy" description="deploy end-to-end tests to existing cluster"> |
| <ant dir="${test.e2e.dir}" target="deploy"/> |
| </target> |
| |
| </project> |