|
|
@@ -1,151 +0,0 @@
|
|
|
-<!--
|
|
|
- Licensed to Cloudera, Inc. under one
|
|
|
- or more contributor license agreements. See the NOTICE file
|
|
|
- distributed with this work for additional information
|
|
|
- regarding copyright ownership. Cloudera, Inc. 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.
|
|
|
--->
|
|
|
-<!-- Ant build file for beeswax server -->
|
|
|
-<project name="beeswax" default="build" xmlns:ivy="antlib:org.apache.ivy.ant">
|
|
|
- <property name="src.dir" location="src" />
|
|
|
- <property name="lib.dir" location="${build.dir}/lib" />
|
|
|
-
|
|
|
- <property name="javac.debug" value="on"/>
|
|
|
- <property name="javac.optimize" value="on"/>
|
|
|
- <property name="javac.deprecation" value="on"/>
|
|
|
- <property name="javac.args.warnings" value="-Xlint:unchecked"/>
|
|
|
- <property name="javac.args" value=""/>
|
|
|
-
|
|
|
- <path id="build.classpath">
|
|
|
- <fileset dir="${hadoop.home}">
|
|
|
- <include name="hadoop*core*.jar" />
|
|
|
- </fileset>
|
|
|
- <!-- TODO(philip): This could be pruned down. -->
|
|
|
- <fileset dir="${hive.lib}">
|
|
|
- <include name="*.jar" />
|
|
|
- </fileset>
|
|
|
- <!--fileset dir="${lib.dir}/default">
|
|
|
- <include name="**/*.jar" />
|
|
|
- </fileset-->
|
|
|
- </path>
|
|
|
-
|
|
|
- <target name="init">
|
|
|
- <mkdir dir="${build.dir}/classes" />
|
|
|
- <mkdir dir="${build.dir}/test-classes" />
|
|
|
- </target>
|
|
|
-
|
|
|
- <target name="build" depends="init">
|
|
|
- <echo message="HDR: ${hadoop.home}"/>
|
|
|
- <javac
|
|
|
- srcdir="gen-java"
|
|
|
- destdir="${build.dir}/classes"
|
|
|
- debug="${javac.debug}"
|
|
|
- optimize="${javac.optimize}"
|
|
|
- deprecation="${javac.deprecation}">
|
|
|
- <classpath refid="build.classpath" />
|
|
|
- <compilerarg line="${javac.args}" />
|
|
|
- </javac>
|
|
|
- <javac
|
|
|
- srcdir="src"
|
|
|
- destdir="${build.dir}/classes"
|
|
|
- debug="${javac.debug}"
|
|
|
- optimize="${javac.optimize}"
|
|
|
- deprecation="${javac.deprecation}">
|
|
|
- <classpath refid="build.classpath" />
|
|
|
- <compilerarg line="${javac.args} ${javac.args.warnings}" />
|
|
|
- </javac>
|
|
|
- </target>
|
|
|
-
|
|
|
- <target name="jar" depends="build">
|
|
|
- <copy todir="${build.dir}/out">
|
|
|
- <fileset dir="${src.dir}" includes="META-INF/*" />
|
|
|
- </copy>
|
|
|
- <mkdir dir="${build.dir}/jar"/>
|
|
|
- <jar destfile="${build.dir}/jar/BeeswaxServer.jar" basedir="${build.dir}/classes">
|
|
|
- <manifest>
|
|
|
- <attribute name="Main-Class" value="com.cloudera.beeswax.Server"/>
|
|
|
- </manifest>
|
|
|
- </jar>
|
|
|
- </target>
|
|
|
-
|
|
|
- <target name="test-build" depends="init" description="Compile sample code used in testing.">
|
|
|
- <javac
|
|
|
- srcdir="test"
|
|
|
- destdir="${build.dir}/test-classes"
|
|
|
- debug="${javac.debug}"
|
|
|
- optimize="${javac.optimize}"
|
|
|
- deprecation="${javac.deprecation}">
|
|
|
- <classpath refid="build.classpath" />
|
|
|
- <compilerarg line="${javac.args}" />
|
|
|
- </javac>
|
|
|
- </target>
|
|
|
-
|
|
|
- <target name="test-jar" depends="test-build">
|
|
|
- <copy todir="${build.dir}/out">
|
|
|
- <fileset dir="${src.dir}" includes="META-INF/*" />
|
|
|
- </copy>
|
|
|
- <mkdir dir="${build.dir}/jar"/>
|
|
|
- <jar destfile="${build.dir}/jar/BeeswaxTest.jar" basedir="${build.dir}/test-classes" />
|
|
|
- </target>
|
|
|
-
|
|
|
- <target name="clean">
|
|
|
- <delete dir="${build.dir}" />
|
|
|
- </target>
|
|
|
-
|
|
|
- <target name="run">
|
|
|
- <java classname="com.cloudera.beeswax.Server" failonerror="true" fork="yes">
|
|
|
- <env key="JAVA_HOME" value="${java.home}" />
|
|
|
- <env key="HADOOP_HOME" value="${HADOOP_HOME}"/>
|
|
|
- <classpath refid="build.classpath"/>
|
|
|
- <classpath path="${build.dir}/classes" />
|
|
|
- <classpath path="${hadoop.dir}/conf" />
|
|
|
- </java>
|
|
|
- </target>
|
|
|
-
|
|
|
-
|
|
|
- <!-- START GENERIC IVY TARGETS -->
|
|
|
- <property name="ivy.install.version" value="2.0.0-beta1" />
|
|
|
- <condition property="ivy.home" value="${env.IVY_HOME}">
|
|
|
- <isset property="env.IVY_HOME" />
|
|
|
- </condition>
|
|
|
- <property name="ivy.home" value="${user.home}/.ivy_beeswax" />
|
|
|
- <property name="ivy.jar.dir" value="${ivy.home}/lib" />
|
|
|
- <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
|
|
|
-
|
|
|
- <target name="download-ivy" unless="offline">
|
|
|
- <mkdir dir="${ivy.jar.dir}"/>
|
|
|
- <!-- download Ivy from web site so that it can be used even without any special installation -->
|
|
|
- <get src="http://www.apache.org/dist/ant/ivy/${ivy.install.version}/ivy.jar"
|
|
|
- dest="${ivy.jar.file}" usetimestamp="true"/>
|
|
|
- </target>
|
|
|
-
|
|
|
- <target name="init-ivy" depends="download-ivy">
|
|
|
- <!-- try to load ivy here from ivy home, in case the user has not already dropped
|
|
|
- it into ant's lib dir (note that the latter copy will always take precedence).
|
|
|
- We will not fail as long as local lib dir exists (it may be empty) and
|
|
|
- ivy is in at least one of ant's lib dir or the local lib dir. -->
|
|
|
- <path id="ivy.lib.path">
|
|
|
- <fileset dir="${ivy.jar.dir}" includes="*.jar"/>
|
|
|
- </path>
|
|
|
- <taskdef resource="org/apache/ivy/ant/antlib.xml"
|
|
|
- uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
|
|
|
- </target>
|
|
|
-
|
|
|
-
|
|
|
- <target name="resolve" description="--> retrieve dependencies with ivy" depends="init-ivy">
|
|
|
- <mkdir dir="${lib.dir}"/>
|
|
|
- <ivy:retrieve pattern="${lib.dir}/[conf]/[module]/[revision]/[type]/[artifact].[ext]" />
|
|
|
- </target>
|
|
|
- <!-- END GENERIC IVY TARGETS -->
|
|
|
-
|
|
|
-</project>
|