-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
executable file
·84 lines (68 loc) · 2.61 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
<?xml version="1.0"?>
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="netty demo" basedir="." default="build">
<target name="resolve" depends="init">
<ivy:retrieve pattern="${lib.dir}/[module]-[type]-[artifact]-[revision].[ext]" />
</target>
<target name="init">
<property name="lib.dir" location="${basedir}/lib" />
<property name="src.dir" location="${basedir}/src" />
<property name="generated.dir" location="${basedir}/generated" />
<property name="test.dir" location="${basedir}/test" />
<property name="build.dir" location="${basedir}/classes" />
<property name="config.dir" location="${basedir}/resources" />
<path id="project.classpath">
<pathelement location="${build.dir}" />
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</path>
</target>
<target name="clean" depends="init">
<delete dir="${build.dir}" />
<echo>Note: protobuf generated .java are not removed. Changes to data.proto require build_pb.sh</echo>
</target>
<target name="build" depends="clean">
<mkdir dir="${build.dir}" />
<javac destdir="${build.dir}" debug="true" deprecation="false" optimize="false" failonerror="true">
<src path="${generated.dir}" />
<classpath refid="project.classpath" />
</javac>
<javac destdir="${build.dir}" debug="true" deprecation="false" optimize="false" failonerror="true">
<src path="${src.dir}" />
<classpath refid="project.classpath" />
</javac>
<copy file="${config.dir}/hibernate.cfg.xml" todir="${build.dir}"/>
</target>
<target name="build.test" depends="build">
<javac destdir="${build.dir}" debug="true" deprecation="false" optimize="false" failonerror="true">
<src path="${test.dir}" />
<classpath refid="project.classpath" />
</javac>
</target>
<!-- ================================================================= -->
<target name="ping" depends="init">
<java fork="yes" classname="poke.demo.Jab">
<classpath refid="project.classpath" />
</java>
</target>
<target name="monitor0" depends="init">
<java fork="yes" classname="poke.monitor.HeartMonitor">
<classpath refid="project.classpath" />
<arg value="localhost" />
<arg value="5670" />
</java>
</target>
<target name="monitor1" depends="init">
<java fork="yes" classname="poke.monitor.HeartMonitor">
<classpath refid="project.classpath" />
<arg value="localhost" />
<arg value="5671" />
</java>
</target>
<target name="server" depends="build">
<java fork="yes" maxmemory="1024m" classname="poke.server.Server">
<arg value="${basedir}/runtime/server.conf" />
<classpath refid="project.classpath" />
</java>
</target>
</project>