-
Notifications
You must be signed in to change notification settings - Fork 165
/
build.xml
47 lines (39 loc) · 1.31 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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="build" name="interview">
<property name="dist.dir" value="dist"/>
<property name="user" value="root"/>
<property name="env.ip" value="9.186.66.84"/>
<property name="pwd" value="passw0rd"/>
<property name="location" value="/root/deploy/artifact/interview.jar"/>
<path id="project.classpath">
<pathelement location="build/classes" />
</path>
<target name="init">
<mkdir dir="build/classes"/>
<mkdir dir="dist"/>
<copy includeemptydirs="false" todir="build/classes">
<fileset dir="src">
<exclude name="**/*.launch" />
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="dist" />
</target>
<target name="compile" depends="init">
<echo message="${ant.project.name}: ${ant.file}" />
<javac debug="true" destdir="build/classes" fork="yes">
<src path="src"/>
<classpath refid="project.classpath"/>
</javac>
</target>
<target name="build" depends="clean, compile">
<echo message="${ant.project.name}: ${ant.file}" />
<jar destfile="${dist.dir}/interview.jar" basedir="build/classes"/>
<delete dir="build" />
</target>
<target name="deploy">
<scp file="../dist/interview.jar" todir="${user}@${env.ip}:${location}" password="${pwd}" trust="true"/>
</target>
</project>