-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.xml
136 lines (118 loc) · 4.47 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="remote" name="fuse">
<property file="../pass.txt" />
<property name="root" value="fuse.rupy.se"/>
<path id="lib">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<property name="lib" refid="lib"/>
<property name="name" value="fuse"/>
<target name="check-page">
<available property="page-exists" file="../page/build.xml"/>
</target>
<target name="page" depends="check-page" if="page-exists">
<ant antfile="../page/build.xml" target="build" inheritall="false"/>
<copy file="../page/bin/page.jar" todir="lib"/>
</target>
<target name="check-http">
<available property="http-exists" file="../http/build.xml"/>
</target>
<target name="http" depends="check-http" if="http-exists">
<ant antfile="../http/build.xml" target="build" inheritall="false"/>
<copy file="../http/bin/http.jar" todir="lib"/>
</target>
<target name="check-util">
<available property="util-exists" file="../util/build.xml"/>
</target>
<target name="util" depends="check-util" if="util-exists">
<ant antfile="../util/build.xml" target="build" inheritall="false"/>
<copy file="../util/bin/util.jar" todir="lib"/>
</target>
<target name="check">
<uptodate property="required" targetfile="bin/${name}.jar">
<srcfiles dir="src" includes="**/*.java"/>
</uptodate>
</target>
<target name="build" depends="http, page, util, check" unless="required">
<echo>Building (${name})</echo>
<mkdir dir="tmp/cls"/>
<javac srcdir="src" target="1.6" source="1.6" destdir="tmp/cls" debug="on" deprecation="off" classpath="src;${lib}" encoding="UTF-8"/>
<mkdir dir="tmp/jar"/>
<copy todir="tmp/jar">
<!--fileset dir="res/"/-->
<fileset dir="tmp/cls"/>
</copy>
<java classname="Page" classpath="${lib}">
<sysproperty key="file.encoding" value="UTF-8"/>
<arg line="bin/${name}.jar"/>
<arg line="res"/>
</java>
<javac srcdir="res" target="1.6" source="1.6" destdir="res" nowarn="on" debug="on" deprecation="off" classpath="${lib};bin;tmp/cls" encoding="UTF-8"/>
<copy preservelastmodified="true" todir="tmp/jar">
<fileset dir="res">
<exclude name="**/*.jpg"/>
<exclude name="**/*.png"/>
<exclude name="**/*.svg"/>
<exclude name="**/*.java"/>
<exclude name="**/*.wav"/>
</fileset>
</copy>
<jar jarfile="tmp/${root}.jar">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
</manifest>
<fileset dir="tmp/jar"/>
</jar>
<mkdir dir="bin"/>
<copy file="tmp/${root}.jar" todir="bin"/>
<delete dir="tmp" quiet="yes"/>
</target>
<target name="local" depends="build">
<java fork="yes" classname="se.rupy.http.Deploy" classpath="lib/http.jar">
<arg line="localhost:8000"/>
<arg line="bin/${root}.jar"/>
<arg line="secret"/>
</java>
</target>
<target name="remote" depends="build">
<java fork="yes" classname="se.rupy.http.Deploy" classpath="lib/http.jar">
<arg line="host.rupy.se"/>
<arg line="bin/${root}.jar"/>
<arg line="${fuse.rupy.se}"/>
</java>
</target>
<target name="boca" depends="build">
<copy file="bin/${root}.jar" tofile="bin/boca.binarytask.com.jar"/>
<java fork="yes" classname="se.rupy.http.Deploy" classpath="lib/http.jar">
<arg line="host.binarytask.com"/>
<arg line="bin/boca.binarytask.com.jar"/>
<arg line="${boca.binarytask.com}"/>
</java>
</target>
<target name="bark" depends="build">
<copy file="bin/${root}.jar" tofile="bin/bark.binarytask.com.jar"/>
<java fork="yes" classname="se.rupy.http.Deploy" classpath="lib/http.jar">
<arg line="host.binarytask.com"/>
<arg line="bin/bark.binarytask.com.jar"/>
<arg line="${bark.binarytask.com}"/>
</java>
</target>
<target name="binary" depends="build">
<copy file="bin/${root}.jar" tofile="bin/fuse.binarytask.com.jar"/>
<java fork="yes" classname="se.rupy.http.Deploy" classpath="lib/http.jar">
<arg line="host.binarytask.com"/>
<arg line="bin/fuse.binarytask.com.jar"/>
<arg line="${fuse.binarytask.com}"/>
</java>
</target>
<target name="radio" depends="build">
<copy file="bin/${root}.jar" tofile="bin/fuse.radiomesh.org.jar"/>
<java fork="yes" classname="se.rupy.http.Deploy" classpath="lib/http.jar">
<arg line="host.radiomesh.org"/>
<arg line="bin/fuse.radiomesh.org.jar"/>
<arg line="${fuse.radiomesh.org}"/>
</java>
</target>
</project>