-
Notifications
You must be signed in to change notification settings - Fork 35
/
build.xml
50 lines (41 loc) · 2.04 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="dataiku-hive-udf" default="jar">
<property file="build.properties" />
<property name="ivy.install.version" value="2.3.0"/>
<property name="ivy.jar.dir" value="${basedir}/ivy"/>
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
<property name="build.dir" value="build"/>
<property name="lib.dir" value="lib"/>
<property name="dist.dir" value="dist"/>
<property name="src.dir" value="src"/>
<target name="download-ivy" unless="skip.download">
<mkdir dir="${ivy.jar.dir}"/>
<echo message="installing ivy..."/>
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" dest="${ivy.jar.file}" usetimestamp="true"/>
</target>
<target name="install-ivy" depends="download-ivy" description="--> install ivy">
<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" unless="skip.resolve" depends="install-ivy" description="--> retrieve dependencies with ivy">
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[type]-[revision].[ext]" type="jar" />
</target>
<path id="lib.path.id">
<fileset dir="${lib.dir}" />
</path>
<target name="compile" depends="resolve">
<mkdir dir="${build.dir}/classes" />
<javac source="1.6" debug="true" target="1.6" srcdir="${src.dir}" destdir="${build.dir}/classes" classpathref="lib.path.id" />
</target>
<target name="jar" depends="compile">
<copy file="hive-init.hql" todir="${dist.dir}" />
<delete file="${dist.dir}/dataiku-hive-udf.jar" />
<jar destfile="${dist.dir}/dataiku-hive-udf.jar" basedir="${build.dir}/classes" />
</target>
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${lib.dir}" />
</target>
</project>