-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.xml
57 lines (56 loc) · 2.2 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="dist" name="TMEngine">
<property name="target" value="11"/>
<property name="source" value="11"/>
<property name="build.compiler" value="javac10+"/>
<path id="TMEngine.classpath">
<pathelement location="lib/dtd.jar"/>
<pathelement location="lib/json.jar"/>
<pathelement location="lib/jsoup-1.11.3.jar"/>
<pathelement location="lib/mapdb.jar"/>
<pathelement location="lib/openxliff.jar"/>
</path>
<condition property="isWindows">
<os family="windows"/>
</condition>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
</target>
<target name="distclean">
<delete dir="dist" failonerror="false"/>
</target>
<target name="compile" depends="clean,init">
<description>Build jar file</description>
<delete file="lib/tmengine.jar"/>
<javac srcdir="src" destdir="bin" classpathref="TMEngine.classpath" modulepathref="TMEngine.classpath" includeAntRuntime="false"/>
<jar destfile="lib/tmengine.jar" basedir="bin"/>
</target>
<target name="link" depends="distclean,compile">
<description>Build Java binaries</description>
<link destDir="dist" modulepath="lib:${java.home}/jmods">
<module name="tmengine"/>
</link>
<delete file="dist/lib/jrt-fs.jar"/>
</target>
<target name="copyBats" if="isWindows">
<description>Copy .bat to /dist</description>
<copy file="tmserver.bat" todir="dist"/>
</target>
<target name="copyShells" unless="isWindows">
<description>Copy .sh to /dist</description>
<copy file="tmserver.sh" todir="dist"/>
</target>
<target name="dist" depends="link,copyBats,copyShells">
<description>Prepare distribution</description>
<copy file="LICENSE" todir="dist"/>
<copy file="lib/mariadb-java-client-2.4.3.jar" todir="dist/lib"/>
</target>
</project>