Repository navigation
Expand file tree
/
Copy pathbuild-server.xml
More file actions
163 lines (140 loc) · 6.96 KB
/
Copy pathbuild-server.xml
File metadata and controls
163 lines (140 loc) · 6.96 KB
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?xml version="1.0" encoding="UTF-8"?>
<project name="Scouter Server" default="default">
<property name="VERSION" value="scala"/>
<property name="class-server-dir" value="./out/bin/server"/>
<property name="class-boot-dir" value="./out/bin/server.boot"/>
<property name="jar-geoip-file" value="./lib/maxmind.geoip.jar"/>
<property name="jar-jsqlparser-file" value="./lib/jsqlparser-0.9.4.jar"/>
<property name="jar-javassist-file" value="./lib/javassist.jar"/>
<property name="deploy-jar-file"
value="./out/package/scouter/server/lib/scouter.server-${VERSION}.jar"/>
<property name="deploy-lib-dir" value="./out/package/scouter/server/lib"/>
<property name="deploy-boot-dir" value="./out/package/scouter/server"/>
<property name="jar-boot-file" value="./out/jar/boot.jar"/>
<property name="jar-server-file" value="./out/jar/scouter.server.jar"/>
<tstamp>
<format property="today" pattern="yyyyMMdd" offset="-5" unit="hour"/>
</tstamp>
<property name="jar-scala-lib" value="./lib/scala"/>
<taskdef resource="scala/tools/ant/antlib.xml">
<classpath>
<pathelement location="${jar-scala-lib}/scala-compiler.jar"/>
<!-- NEW: For scala 2.10.2 you need scala-reflect: -->
<pathelement location="${jar-scala-lib}/scala-reflect.jar"/>
<pathelement location="${jar-scala-lib}/scala-library.jar"/>
</classpath>
</taskdef>
<target name="init">
<delete dir="${deploy-boot-dir}"/>
<delete dir="${class-server-dir}"/>
<delete dir="${class-boot-dir}"/>
<delete file="${jar-boot-file}"/>
<mkdir dir="${class-server-dir}"/>
<mkdir dir="${class-boot-dir}"/>
</target>
<target name="compile">
<javac srcdir="../scouter.common/src" destdir="${class-server-dir}"
source="1.5" target="1.5" debug="true" encoding="UTF-8"
includeantruntime="false">
</javac>
<copy todir="${class-server-dir}" verbose="true">
<fileset dir="../scouter.common/src">
<include name="**/*.logo"/>
</fileset>
</copy>
<!--<copy file="../scouter.common/src/scouter/util/logo/scouter.logo"-->
<!--tofile="${class-server-dir}/scouter/util/logo/scouter.logo" verbose="true"/>-->
<copy file="../scouter.common/src/scouter/lang/countrycode.txt"
tofile="${class-server-dir}/scouter/lang/countrycode.txt" verbose="true"/>
<copy file="../scouter.server/src/scouter/server/account/account.xml"
tofile="${class-server-dir}/scouter/server/account/account.xml"
verbose="true"/>
<copy file="../scouter.server/src/scouter/server/account/account_group.xml"
tofile="${class-server-dir}/scouter/server/account/account_group.xml"
verbose="true"/>
<copy file="../scouter.common/src/scouter/lang/counters/counters.xml"
tofile="${class-server-dir}/scouter/lang/counters/counters.xml"
verbose="true"/>
<propertyfile file="${class-server-dir}/scouter/v.properties"
comment="Scouter Version">
<entry key="VERSION" value="${VERSION}"/>
<entry key="BUILD" value="${today}"/>
</propertyfile>
<scalac srcdir="../scouter.server/src" destdir="${class-server-dir}"
encoding="UTF-8">
<include name="**/*.scala"/>
<include name="**/*.java"/>
<classpath>
<pathelement location="${jar-scala-lib}/scala-compiler.jar"/>
<pathelement location="${jar-scala-lib}/scala-library.jar"/>
<pathelement location="${jar-scala-lib}/scala-reflect.jar"/>
<pathelement location="${jar-scala-lib}/jline.jar"/>
<pathelement location="${class-server-dir}"/>
<pathelement location="${jar-jsqlparser-file}"/>
<pathelement location="${jar-javassist-file}"/>
<pathelement location="${jar-geoip-file}"/>
</classpath>
</scalac>
<javac srcdir="../scouter.server/src" destdir="${class-server-dir}"
source="1.5" target="1.5" debug="true" encoding="UTF-8">
<classpath>
<pathelement location="${jar-scala-lib}/scala-compiler.jar"/>
<pathelement location="${jar-scala-lib}/scala-library.jar"/>
<pathelement location="${jar-scala-lib}/scala-reflect.jar"/>
<pathelement location="${jar-scala-lib}/jline.jar"/>
<pathelement location="${class-server-dir}"/>
<pathelement location="${jar-jsqlparser-file}"/>
<pathelement location="${jar-javassist-file}"/>
<pathelement location="${jar-geoip-file}"/>
</classpath>
</javac>
<javac srcdir="../scouter.server.boot/src" destdir="${class-boot-dir}"
source="1.5" target="1.5" debug="true" encoding="UTF-8"
includeantruntime="false">
</javac>
</target>
<target name="packing">
<jar destfile="${jar-server-file}">
<fileset dir="${class-server-dir}"/>
</jar>
<jar destfile="${jar-boot-file}">
<fileset dir="${class-boot-dir}"/>
</jar>
<copy file="${jar-scala-lib}/scala-library.jar" todir="${deploy-lib-dir}"
verbose="true"/>
<copy file="${jar-scala-lib}/scala-reflect.jar" todir="${deploy-lib-dir}"
verbose="true"/>
<copy file="${jar-scala-lib}/jline.jar" todir="${deploy-lib-dir}"
verbose="true"/>
</target>
<target name="deploy">
<copy file="${jar-server-file}" tofile="${deploy-jar-file}"
verbose="true"/>
<copy file="${jar-boot-file}" todir="${deploy-boot-dir}" verbose="true"/>
<copy file="${jar-geoip-file}" todir="${deploy-lib-dir}" verbose="true"/>
<copy file="${jar-jsqlparser-file}" todir="${deploy-lib-dir}"
verbose="true"/>
<copy file="${jar-javassist-file}" todir="${deploy-lib-dir}"
verbose="true"/>
<copy todir="./out/package/scouter/server">
<fileset dir="../scouter.server/scripts"/>
</copy>
<fixcrlf srcdir="./out/package/scouter/server" includes="**/*.sh"
eol="lf"
eof="remove"
/>
<copy todir="./out/package/scouter/server/conf">
<fileset dir="../scouter.server/conf"/>
</copy>
<copy todir="./out/package/scouter/server/plugin">
<fileset dir="../scouter.server/plugin"/>
</copy>
</target>
<target name="default">
<echo>Server</echo>
<antcall target="init"/>
<antcall target="compile"/>
<antcall target="packing"/>
<antcall target="deploy"/>
</target>
</project>