forked from nexr/RHive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
86 lines (79 loc) · 3.4 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<project name="rhive_udf" basedir="./" default="build">
<property name="src.dir" value="RHive/inst/javasrc/src"/>
<property name="java.src.dir" value="RHive/inst/javasrc/"/>
<property name="lib.dir" value="RHive/inst/javasrc/lib"/>
<property name="build.dir" value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.dir" value="${build.dir}/jar"/>
<property name="R.dir" value="RHive"/>
<property name="javac.debug" value="on"/>
<property name="javac.optimize" value="on"/>
<property name="javac.deprecation" value="on"/>
<property name="javac.version" value="1.6"/>
<property name="javac.args" value=""/>
<property name="javac.args.warnings" value="-Xlint:unchecked"/>
<property environment="env"/>
<path id="classpath">
<fileset dir="./" includes="**/*.jar"/>
<fileset dir="${lib.dir}" includes="*.jar"/>
<fileset dir="${env.HADOOP_HOME}" includes="**/*.jar"/>
<fileset dir="${env.HIVE_HOME}/lib/" includes="**/*.jar"/>
</path>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="compile">
<delete file="${ant.project.name}.jar"/>
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" includes="**/*.java" destdir="${classes.dir}" classpathref="classpath"
optimize="${javac.optimize}"
target="${javac.version}"
source="${javac.version}"
deprecation="${javac.deprecation}"
debug="${javac.debug}"
debuglevel="lines,vars,source"
includeantruntime="false">
<compilerarg line="${javac.args.warnings}"/>
</javac>
<unjar dest="${classes.dir}">
<fileset dir="${lib.dir}">
<include name="REngine.jar"/>
<include name="RserveEngine.jar"/>
<include name="JRI.jar"/>
</fileset>
</unjar>
</target>
<target name="jar" depends="compile">
<property name="version.num" value="1"/>
<buildnumber file="${R.dir}/inst/javasrc/build.num"/>
<jar destfile="${ant.project.name}.jar" basedir="${classes.dir}">
<manifest>
<attribute name="Built-By" value="NexR"/>
<attribute name="Implementation-Version" value="${version.num}-b${build.number}"/>
</manifest>
</jar>
</target>
<target name="cran" depends="jar">
<delete file="${R.dir}/inst/java/${ant.project.name}.jar"/>
<copy file="${ant.project.name}.jar" todir="${R.dir}/inst/java/"/>
<copy todir="${build.dir}/CRAN/rhive/inst">
<fileset dir="${R.dir}/inst">
<exclude name="unitTests/**"/>
<exclude name="data/**"/>
<exclude name="javasrc/Makevars"/>
</fileset>
</copy>
<copy todir="${build.dir}/CRAN/rhive/man">
<fileset dir="${R.dir}/man"/>
</copy>
<copy todir="${build.dir}/CRAN/rhive/R">
<fileset dir="${R.dir}/R">
<exclude name="unitTest.R"/>
</fileset>
</copy>
<copy file="${R.dir}/DESCRIPTION" todir="${build.dir}/CRAN/rhive"/>
<copy file="${R.dir}/NAMESPACE" todir="${build.dir}/CRAN/rhive"/>
<delete file="${ant.project.name}.jar"/>
</target>
<target name="build" depends="cran"/>
</project>