-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
52 lines (37 loc) · 1.39 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
<project name="Webpie" default="build" basedir=".">
<description>Build file for Webpie</description>
<property name="jar" location="lib/datasetAnalyzer.jar"/>
<property name="JAR_REMOTE_LOCATION" value=""/>
<property name="SCP_PRIVATE_KEY" value=""/>
<property name="SCP_PASSPHRASE" value=""/>
<path id="default.classpath">
<fileset dir="lib">
<include name="*.jar" />
</fileset>
</path>
<target name="build" description="build jar file" depends="clean,copy,compile" />
<target name="copy">
<mkdir dir="lib" />
<copy todir="lib">
<fileset dir="hadoop_lib"/>
</copy>
</target>
<target name="compile" description="build the examples">
<mkdir dir="tmp" />
<!-- Compile the java code from src into tmp -->
<javac srcdir="src" destdir="tmp" debug="on" source="1.6" target="1.6" classpathref="default.classpath">
<compilerarg value="-Xlint:unchecked" />
</javac>
<!-- Put everything in tmp into the jar file -->
<jar jarfile="${jar}" basedir="tmp" />
<!-- And delete the build dir -->
<delete dir="tmp" />
</target>
<target name="clean" description="clean up">
<delete dir="tmp" />
<delete dir="lib" />
</target>
<target name="deploy" depends="compile" description="Copy the jar in a specific location">
<scp file="${JAR_LOCATION}" todir="${JAR_REMOTE_LOCATION}" keyfile="${SCP_PRIVATE_KEY}" passphrase="${SCP_PASSPHRASE}" trust="true"/>
</target>
</project>