incubator-hcatalog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khorg...@apache.org
Subject svn commit: r1178579 - in /incubator/hcatalog/trunk: ./ storage-drivers/ storage-drivers/hbase/ storage-drivers/hbase/ivy/
Date Mon, 03 Oct 2011 21:14:02 GMT
Author: khorgath
Date: Mon Oct  3 21:14:01 2011
New Revision: 1178579

URL: http://svn.apache.org/viewvc?rev=1178579&view=rev
Log:
HCATALOG-101 storage driver and hbase build scripts (toffer via khorgath)

Added:
    incubator/hcatalog/trunk/build-common.xml
    incubator/hcatalog/trunk/storage-drivers/
    incubator/hcatalog/trunk/storage-drivers/build.xml
    incubator/hcatalog/trunk/storage-drivers/hbase/
    incubator/hcatalog/trunk/storage-drivers/hbase/build.xml
    incubator/hcatalog/trunk/storage-drivers/hbase/ivy/
    incubator/hcatalog/trunk/storage-drivers/hbase/ivy.xml
    incubator/hcatalog/trunk/storage-drivers/hbase/ivy/ivysettings.xml
    incubator/hcatalog/trunk/storage-drivers/hbase/ivy/libraries.properties
Modified:
    incubator/hcatalog/trunk/CHANGES.txt
    incubator/hcatalog/trunk/build.xml

Modified: incubator/hcatalog/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/CHANGES.txt?rev=1178579&r1=1178578&r2=1178579&view=diff
==============================================================================
--- incubator/hcatalog/trunk/CHANGES.txt (original)
+++ incubator/hcatalog/trunk/CHANGES.txt Mon Oct  3 21:14:01 2011
@@ -50,6 +50,8 @@ Trunk (unreleased changes)
 
   HCAT-118. HIVE_CONF_DIR needs to be set to run hive (khorgath)
 
+  HCAT-101. storage driver and hbase build scripts (toffer via khorgath)
+
   OPTIMIZATIONS
 
   BUG FIXES

Added: incubator/hcatalog/trunk/build-common.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build-common.xml?rev=1178579&view=auto
==============================================================================
--- incubator/hcatalog/trunk/build-common.xml (added)
+++ incubator/hcatalog/trunk/build-common.xml Mon Oct  3 21:14:01 2011
@@ -0,0 +1,36 @@
+<project name="common" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
+    <dirname property="common.basedir" file="${ant.file.common}"/>
+
+    <!-- shared build properties this should be the same with main build.xml -->
+    <!-- this has to resolve to hcatalog project's ${build.dir} -->
+    <property name="common.build.dir" value="${common.basedir}/build"/>
+    <!-- this has to resolve to hcatalog project's ${lib.dir} -->
+    <property name="common.lib.dir" value="${common.basedir}/lib"/>
+    <!-- this has to resolve to hcatalog project's ${ivy.lib.dir} -->
+    <property name="common.ivy.lib.dir" value="${common.build.dir}/ivy/lib/hcatalog"/>
+
+    <!-- hive -->
+    <property name="hive.root" value="${common.basedir}/hive/external"/>
+
+    <!-- common classpaths for various builds -->
+    <path id="common.classpath">
+        <fileset dir="${hive.root}" includes="testlibs/*.jar"/>
+        <fileset dir="${hive.root}" includes="testlibs/*.jar"/>
+        <fileset dir="${hive.root}/lib" includes="*.jar"/>
+        <fileset dir="${hive.root}/build/cli" includes="*.jar"/>
+        <fileset dir="${hive.root}/build/common" includes="*.jar"/>
+        <fileset dir="${hive.root}/build/serde" includes="*.jar"/>
+        <fileset dir="${hive.root}/build/metastore" includes="*.jar"/>
+        <fileset dir="${hive.root}/build/ql" includes="*.jar"/>
+        <fileset dir="${hive.root}/ql/lib" includes="antlr-3.0.1.jar"/>
+        <fileset dir="${hive.root}/build/hadoopcore/hadoop-0.20.3-CDH3-SNAPSHOT/"
+                 includes="hadoop-core-0.20.3-CDH3-SNAPSHOT.jar"/>
+        <fileset dir="${common.ivy.lib.dir}" includes="*.jar"/>
+        <fileset dir="${hive.root}/build/ivy/lib/default" includes="jdo2-api-2.3-ec.jar"/>
+        <fileset dir="${hive.root}/build/ivy/lib/default" includes="datanucleus-enhancer-2.0.3.jar"/>
+        <fileset dir="${hive.root}/build/ivy/lib/default" includes="datanucleus-core-2.0.3.jar"/>
+        <fileset dir="${common.lib.dir}" includes="hadoop_archive-0.3.1.jar"/>
+        <fileset dir="${hive.root}/lib" includes="asm-3.1.jar"/>
+    </path>
+
+</project>

Modified: incubator/hcatalog/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build.xml?rev=1178579&r1=1178578&r2=1178579&view=diff
==============================================================================
--- incubator/hcatalog/trunk/build.xml (original)
+++ incubator/hcatalog/trunk/build.xml Mon Oct  3 21:14:01 2011
@@ -19,6 +19,11 @@
 
 
 <project name="hcatalog" default="jar" xmlns:ivy="antlib:org.apache.ivy.ant" >
+  <!--  
+  ================================================================================
+  Imports
+  ================================================================================ -->
+  <import file="build-common.xml"/>
 
   <!--
   ================================================================================
@@ -33,9 +38,6 @@
   <property name="final.name" value="${ant.project.name}-${hcatalog.version}" />
   <property name="package.release" value="1"/>
 
-  <!-- hive properties -->
-  <property name="hive.root" value="${basedir}/hive/external"/>
-
   <!-- build properties -->
   <property name="lib.dir" value="${basedir}/lib/" />
   <property name="src.dir"  location="${basedir}/src/java"/>
@@ -107,23 +109,7 @@
 
   <!-- Classpaths for various builds -->
   <path id="classpath">
-    <fileset dir="${hive.root}" includes="testlibs/*.jar"/>
-    <fileset dir="${hive.root}" includes="testlibs/*.jar"/>
-    <fileset dir="${hive.root}/lib" includes="*.jar"/>
-    <fileset dir="${hive.root}/build/cli" includes="*.jar"/>
-    <fileset dir="${hive.root}/build/common" includes="*.jar"/>
-    <fileset dir="${hive.root}/build/serde" includes="*.jar"/>
-    <fileset dir="${hive.root}/build/metastore" includes="*.jar"/>
-    <fileset dir="${hive.root}/build/ql" includes="*.jar"/>
-    <fileset dir="${hive.root}/ql/lib" includes="antlr-3.0.1.jar"/>
-    <fileset dir="${hive.root}/build/hadoopcore/hadoop-0.20.3-CDH3-SNAPSHOT/"
-      includes="hadoop-core-0.20.3-CDH3-SNAPSHOT.jar"/>
-    <fileset dir="${ivy.lib.dir}" includes="*.jar"/>
-    <fileset dir="${hive.root}/build/ivy/lib/default" includes="jdo2-api-2.3-ec.jar"/>
-    <fileset dir="${hive.root}/build/ivy/lib/default" includes="datanucleus-enhancer-2.0.3.jar"/>
-    <fileset dir="${hive.root}/build/ivy/lib/default" includes="datanucleus-core-2.0.3.jar"/>
-    <fileset dir="${lib.dir}" includes="hadoop_archive-0.3.1.jar"/>
- <fileset dir="${hive.root}/lib" includes="asm-3.1.jar"/>
+    <path refid="common.classpath"/>
   </path>
 
   <path id="test.classpath">
@@ -280,7 +266,17 @@
   Build both clientjar and server-extensions
   ================================================================================
   -->
-  <target name="jar" depends="clientjar,server-extensions"/>
+  <target name="jar" depends="clientjar,server-extensions,jar-storage-drivers"/>
+
+  <!--
+  ================================================================================
+  Build storage drivers
+  ================================================================================
+  -->
+
+  <target name="jar-storage-drivers">        
+    <ant target="jar" dir="storage-drivers" inheritAll="false" useNativeBasedir="true"/>
+  </target>
 
   <!--
   ================================================================================
@@ -300,6 +296,10 @@
   </target>
 
   <!-- Run the unit tests -->
+  <target name="test-storage-drivers">
+    <ant target="test" dir="storage-drivers" inheritAll="false" useNativeBasedir="true"/>
+  </target>
+
   <target name="test" depends="compile-test">
     <sequential>
       <!-- If anyone knows how to set umask inside ant please do so -->
@@ -340,6 +340,8 @@
       </junit>
       <fail if="tests.failed">Tests failed!</fail>
     </sequential>
+    <!-- test storage drivers -->
+    <antcall target="test-storage-drivers"/>
   </target>
 
   <!--
@@ -398,6 +400,19 @@
   Distribution Section
   ===============================================================================
   -->
+  <target name="package-storage-drivers">
+    <property name="drivers.dir" value="${dist.dir}/share/hcatalog/storage-drivers"/>
+    <mkdir dir="${drivers.dir}"/>
+    <ant target="package" dir="storage-drivers" inheritAll="false" useNativeBasedir="true">
    
+        <property name="dist.drivers.dir" value="${drivers.dir}"/>
+    </ant>
+    <copy todir="${dist.dir}/share/${ant.project.name}/lib" includeEmptyDirs="false" flatten="true">
+      <fileset dir="${dist.dir}/share/${ant.project.name}/storage-drivers">
+        <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" />
@@ -581,7 +596,8 @@
       <fileset dir="${dist.dir}/bin" />
       <fileset dir="${dist.dir}/sbin" />
     </chmod>
-
+       <!--package storage-drivers -->
+      <antcall target="package-storage-drivers"/>
     </target>
 
     <target name="releaseaudit" depends="ivy-releaseaudit, package" description="Release
Audit activities">

Added: incubator/hcatalog/trunk/storage-drivers/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/storage-drivers/build.xml?rev=1178579&view=auto
==============================================================================
--- incubator/hcatalog/trunk/storage-drivers/build.xml (added)
+++ incubator/hcatalog/trunk/storage-drivers/build.xml Mon Oct  3 21:14:01 2011
@@ -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 name="storage-driver" default="jar" xmlns:ivy="antlib:org.apache.ivy.ant" >
+    <!-- Used to pass calls to storage drivers. -->
+    <target name="template">
+        <condition property="dist.drivers.dir" value="${dist.drivers.dir}">
+            <isset property="dist.drivers.dir"/>
+        </condition>
+        <!-- add storage drivers here -->
+        <echo>Executing storage-driver &quot;${target}&quot; for hbase</echo>
+        <ant target="${target}" dir="hbase" inheritAll="false" useNativeBasedir="true"/>
+    </target>
+
+
+    <target name="jar">
+        <echo>Generating all drivers</echo>
+        <antcall target="template">
+            <param name="target" value="jar"/>
+        </antcall>
+    </target>
+
+    <target name="test">
+        <echo>Testing all drivers</echo>
+        <antcall target="template">
+            <param name="target" value="test"/>
+        </antcall>
+    </target>
+
+    <target name="clean">
+        <echo>Cleaning all drivers</echo>
+        <antcall target="template">
+            <param name="target" value="clean"/>
+        </antcall>
+    </target>
+
+    <target name="package">
+        <echo>Package all drivers</echo>
+        <antcall target="template">
+            <param name="target" value="package"/>
+        </antcall>
+    </target>
+</project>

Added: incubator/hcatalog/trunk/storage-drivers/hbase/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/storage-drivers/hbase/build.xml?rev=1178579&view=auto
==============================================================================
--- incubator/hcatalog/trunk/storage-drivers/hbase/build.xml (added)
+++ incubator/hcatalog/trunk/storage-drivers/hbase/build.xml Mon Oct  3 21:14:01 2011
@@ -0,0 +1,361 @@
+<?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="hbase-storage-driver" default="jar" xmlns:ivy="antlib:org.apache.ivy.ant"
>
+    <!--
+    ================================================================================
+    Import File
+    ================================================================================
+    -->
+    <import file="../../build_common.xml"/>
+
+    <!--
+    ================================================================================
+    Properties and Classpaths Section
+    ================================================================================
+    -->
+    <!-- name and version -->
+    <property name="driver.version" value="0.1.0"/>
+    <property name="driver.jar" value="${ant.project.name}-${driver.version}.jar"/>
+    <property name="final.name" value="${ant.project.name}-${driver.version}" />
+
+    <property name="hcatalog.dir" value="${basedir}/../../" />
+
+    <!-- hive properties -->
+    <property name="hive.root" value="${hcatalog.dir}/hive/external"/>
+
+    <!-- build properties -->
+    <property name="lib.dir" value="${basedir}/lib/" />
+    <property name="src.dir"  location="${basedir}/src/java"/>
+    <property name="docs.src" value="${basedir}/src/docs"/>
+    <property name="build.dir" value="${basedir}/build"/>
+    <property name="build.classes" value="${build.dir}/classes" />
+    <property name="build.docs" value="${build.dir}/docs" />
+    <property name="build.javadoc" value="${build.docs}/api" />
+    <property name="dist.dir" value="${build.dir}/${final.name}" />
+
+    <!-- javac properties -->
+    <property name="build.encoding" value="UTF8" />
+    <property name="excludes" value=""/>
+    <property name="javac.debug" value="on" />
+    <property name="javac.optimize" value="on" />
+    <property name="javac.deprecation" value="off" />
+    <property name="javac.version" value="1.6" />
+    <property name="javac.args" 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="hive.conf.dir" value="${hive.root}/conf"/>
+
+    <!-- ivy properteis set here -->
+    <property name="ivy.repo.dir" value="${user.home}/ivyrepo" />
+    <property name="ivy.dir" location="ivy" />
+    <loadproperties srcfile="${ivy.dir}/libraries.properties"/>
+    <property name="asfrepo" value="https://repository.apache.org"/>
+    <property name="asfsnapshotrepo" value="${asfrepo}/content/repositories/snapshots"/>
+    <property name="mvnrepo" value="http://repo2.maven.org/maven2"/>
+    <property name="asfstagingrepo" value="${asfrepo}/service/local/staging/deploy/maven2"/>
+    <property name="ivy.jar" location="${ivy.dir}/ivy-${ivy.version}.jar"/>
+    <property name="ant_task.jar" location="${ivy.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="ivysettings.xml" location="${ivy.dir}/ivysettings.xml" />
+    <property name="build.ivy.dir" location="${build.dir}/ivy" />
+    <property name="build.ivy.lib.dir" location="${build.ivy.dir}/lib" />
+    <property name="ivy.lib.dir" location="${build.ivy.lib.dir}/${ant.project.name}"/>
+    <property name="build.ivy.report.dir" location="${build.ivy.dir}/report" />
+
+    <!-- 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">
+        <fileset dir="${ivy.lib.dir}" includes="*.jar"/>
+        <fileset dir="${hcatalog.dir}/build/hcatalog" includes=" *.jar"/>
+        <path refid="common.classpath"/>
+        <fileset dir="${hive.root}/build/hbase-handler" includes="*.jar"/>
+    </path>
+
+    <path id="test.classpath">
+        <pathelement location="${test.build.classes}" />
+        <pathelement location="${build.classes}" />
+        <pathelement location="conf"/>
+        <pathelement location="${hive.conf.dir}"/>
+        <!-- jars Hive depends on -->
+        <fileset dir="${hive.root}/build/ivy/lib/default/">
+            <include name="**/*.jar" />
+            <exclude name="*hbase*.jar" />
+        </fileset>
+        <!-- jars Hadoop depends on -->
+        <fileset dir="${hive.root}/build/hadoopcore/hadoop-0.20.3-CDH3-SNAPSHOT/lib/"
>
+            <include name="**/*.jar" />
+        </fileset>
+        <pathelement location="${driver.jar}"/>
+        <path refid="classpath"/>
+        <fileset dir="${hive.root}/build/hadoopcore/hadoop-0.20.3-CDH3-SNAPSHOT/"
+                 includes="hadoop-test-0.20.3-CDH3-SNAPSHOT.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'/>
+    </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"/>
+    </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" >
+        <mkdir dir="${dist.dir}" />
+        <mkdir dir="${build.classes}" />
+        <mkdir dir="${test.build.classes}" />
+    </target>
+
+    <!--
+    ================================================================================
+    Main Build and Jar Section
+    ================================================================================
+    -->
+    <!-- Compile 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 jar -->
+    <target name="jar" depends="compile-src">
+        <jar jarfile="${build.dir}/${ant.project.name}/${driver.jar}" basedir="${build.classes}"/>
+    </target>
+
+    <!--
+    ================================================================================
+    Test Section
+    ================================================================================
+    -->
+    <!-- Build test files -->
+    <target name="compile-test" depends="jar">
+        <javac encoding="${build.encoding}" srcdir="${test.src.dir}" excludes="${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" depends="compile-test">
+        <sequential>
+
+            <delete dir="${test.log.dir}"/>
+            <mkdir dir="${test.log.dir}"/>
+            <junit showoutput="${test.output}" printsummary="yes" haltonfailure="no"
+                   fork="yes" maxmemory="512m" dir="${basedir}" timeout="${test.timeout}"
+                   errorProperty="tests.failed" failureProperty="tests.failed">
+                <classpath>
+                    <pathelement location="${test.build.classes}" />
+                    <pathelement location="." />
+                    <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>
+    </target>
+
+    <!--
+    ================================================================================
+    Clean Section
+    ================================================================================
+    -->
+
+    <!-- Clean up  -->
+    <target name="clean" description="Cleanup build artifacts">
+        <delete dir="${build.dir}" />
+    </target>
+
+    <!--
+    ================================================================================
+    Docs Section
+    ================================================================================
+    -->
+    <target name="docs" depends="javadoc">
+    </target>
+
+    <target name="javadoc" depends="jar" description="Create 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" windowtitle="HCatalog ${hcatalog.version}
API" doctitle="HCatalog ${hcatalog.version} API">
+            <packageset dir="${src.dir}" />
+            <classpath>
+                <path refid="classpath" />
+            </classpath>
+            <group title="hcatalog" packages="org.apache.hcatalog.*" />
+        </javadoc>
+    </target>
+
+
+    <!--
+    ===============================================================================
+    Distribution Section
+    ===============================================================================
+    -->
+    <target name="package" depends="jar, docs" description="Create an HCatalog release">
+        <mkdir dir="${dist.dir}" />
+        <mkdir dir="${dist.dir}/src" />
+        <mkdir dir="${dist.dir}/lib" />
+        <mkdir dir="${dist.dir}/docs" />
+        <mkdir dir="${dist.dir}/ivy" />
+
+        <copy todir="${dist.dir}/lib" includeEmptyDirs="false">
+            <fileset dir="${lib.dir}"/>
+            <fileset dir="${build.dir}/${ant.project.name}">
+                <include name="*.jar"/>
+            </fileset>
+            <fileset dir="${build.dir}/ivy/lib/${ant.project.name}">
+                <include name="**/*"/>
+                <!-- exclude test jars -->
+                <exclude name="*-tests.jar"/>
+            </fileset>
+            <fileset dir="${hive.root}/build/hbase-handler" includes="*.jar"/>
+        </copy>
+
+
+        <copy todir="${dist.dir}/docs">
+            <fileset dir="${build.docs}" />
+        </copy>
+
+        <!-- Copy source files so the tar ball can build -->
+        <copy todir="${dist.dir}/src/java" includeEmptyDirs="true">
+            <fileset dir="${src.dir}" />
+        </copy>
+
+        <copy todir="${dist.dir}/src/test" includeEmptyDirs="true">
+            <fileset dir="${test.src.dir}" />
+        </copy>
+
+        <copy todir="${dist.dir}/" file="build.xml" />
+        <copy todir="${dist.dir}/" file="ivy.xml" />
+
+        <copy todir="${dist.dir}/ivy">
+            <fileset dir="ivy"/>
+        </copy>
+        <antcall target="package-to-drivers"/>
+    </target>
+
+    <target name="package-to-drivers" if="dist.drivers.dir">
+        <mkdir dir="${dist.drivers.dir}/hbase"/>
+        <copy todir="${dist.drivers.dir}/hbase" includeEmptyDirs="true">
+            <fileset dir="${dist.dir}"/>
+        </copy>
+    </target>
+</project>

Added: incubator/hcatalog/trunk/storage-drivers/hbase/ivy.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/storage-drivers/hbase/ivy.xml?rev=1178579&view=auto
==============================================================================
--- incubator/hcatalog/trunk/storage-drivers/hbase/ivy.xml (added)
+++ incubator/hcatalog/trunk/storage-drivers/hbase/ivy.xml Mon Oct  3 21:14:01 2011
@@ -0,0 +1,46 @@
+<!-- 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. -->
+
+<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
+    <info organisation="org.apache.hcatalog" module="${ant.project.name}"
+          revision="${hcatalog.version}">
+        <license name="Apache 2.0"/>
+        <ivyauthor name="Apache HCatalog Team" url="http://incubator.apache.org/hcatalog"/>
+        <description>
+            Apache HCatalog
+        </description>
+    </info>
+
+    <configurations defaultconfmapping="default">
+        <!--these match the Maven configurations-->
+        <conf name="default" extends="master,runtime"/>
+        <conf name="master" description="contains the artifact but no dependencies"/>
+        <conf name="runtime" description="runtime but not the artifact" />
+        <conf name="common" visibility="private"
+              extends="runtime"
+              description="artifacts needed to compile/test the application"/>
+        <conf name="test" visibility="private" extends="runtime"/>
+        <conf name="releaseaudit" visibility="private"/>
+    </configurations>
+    <dependencies>
+        <dependency org="org.apache.hbase" name="hbase" rev="${hbase.version}"
+                    conf="common->master">
+            <artifact name="hbase" type="jar" ext="jar"/>
+            <artifact name="hbase" type="test-jar" ext="jar" m:classifier="tests"/>
+        </dependency>
+        <dependency org="org.apache.zookeeper" name="zookeeper" rev="${zookeeper.version}"
conf="common->master"/>
+    </dependencies>
+</ivy-module>

Added: incubator/hcatalog/trunk/storage-drivers/hbase/ivy/ivysettings.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/storage-drivers/hbase/ivy/ivysettings.xml?rev=1178579&view=auto
==============================================================================
--- incubator/hcatalog/trunk/storage-drivers/hbase/ivy/ivysettings.xml (added)
+++ incubator/hcatalog/trunk/storage-drivers/hbase/ivy/ivysettings.xml Mon Oct  3 21:14:01
2011
@@ -0,0 +1,61 @@
+<ivysettings>
+
+    <!--
+       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.
+    -->
+
+    <!--
+    see http://www.jayasoft.org/ivy/doc/configuration
+    -->
+    <!-- you can override this property to use mirrors
+            http://repo1.maven.org/maven2/
+            http://mirrors.dotsrc.org/maven2
+            http://ftp.ggi-project.org/pub/packages/maven2
+            http://mirrors.sunsite.dk/maven2
+            http://public.planetmirror.com/pub/maven2
+            http://ibiblio.lsu.edu/main/pub/packages/maven2
+            http://www.ibiblio.net/pub/packages/maven2
+    -->
+    <property name="repo.maven.org" value="${mvnrepo}" override="true"/>
+    <property name="maven2.pattern"  value="[organisation]/[module]/[revision]/[module]-[revision](-[classifier])"/>
+    <property name="maven2.pattern.ext" value="${maven2.pattern}.[ext]"/>
+    <!-- pull in the local repository -->
+    <include url="${ivy.default.conf.dir}/ivyconf-local.xml"/>
+    <settings defaultResolver="default"/>
+    <resolvers>
+        <ibiblio
+                name="jboss"
+                m2compatible="true"
+                root="https://repository.jboss.org/nexus/content/groups/public"
+                pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
/>
+
+        <ibiblio name="maven2" root="${repo.maven.org}" pattern="${maven2.pattern.ext}"
m2compatible="true"/>
+        <chain name="default" dual="true">
+            <resolver ref="local"/>
+            <resolver ref="maven2"/>
+            <resolver ref="jboss"/>
+        </chain>
+        <chain name="internal">
+            <resolver ref="local"/>
+        </chain>
+        <chain name="external">
+            <resolver ref="maven2"/>
+        </chain>
+    </resolvers>
+    <modules>
+        <module organisation="org.apache.incubator/hcatalog" name=".*" resolver="internal"/>
+    </modules>
+</ivysettings>

Added: incubator/hcatalog/trunk/storage-drivers/hbase/ivy/libraries.properties
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/storage-drivers/hbase/ivy/libraries.properties?rev=1178579&view=auto
==============================================================================
--- incubator/hcatalog/trunk/storage-drivers/hbase/ivy/libraries.properties (added)
+++ incubator/hcatalog/trunk/storage-drivers/hbase/ivy/libraries.properties Mon Oct  3 21:14:01
2011
@@ -0,0 +1,20 @@
+#   Licensed 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.
+
+#This properties file lists the versions of the various artifacts used by hadoop and components.
+#It drives ivy and the generation of a maven POM
+
+junit.version=3.8.1
+ivy.version=2.2.0
+rats-lib.version=0.5.1
+hbase.version=0.90.3
+zookeeper.version=3.3.1



Mime
View raw message