forked from saggim/Tiny-Tiny-IRC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
64 lines (54 loc) · 1.65 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
<?xml version="1.0"?>
<project name="tt-irc" default="default">
<property name="src" location="src"/>
<property name="bin" location="bin"/>
<path id="project.libpath">
<fileset dir="lib/">
<include name="**/*.jar"/>
</fileset>
</path>
<pathconvert property="manifest.classpath" pathsep=" ">
<path refid="project.libpath"/>
<chainedmapper>
<flattenmapper/>
<globmapper from="*" to="lib/*"/>
</chainedmapper>
</pathconvert>
<target name="compile" depends="">
<mkdir dir="${bin}"/>
<javac srcdir="${src}" destdir="${bin}">
<classpath>
<pathelement path="${classpath}"/>
<path refid="project.libpath"/>
</classpath>
</javac>
</target>
<target name="default" depends="jar">
</target>
<target name="buildnumber" depends="compile">
<buildnumber file="build.number"/>
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
<format property="TODAY_SHORT" pattern="yyyy-MM-dd" />
</tstamp>
</target>
<target name="jar" depends="buildnumber">
<delete file="backend.jar"/>
<delete file="manifest.mf"/>
<manifest file="manifest.mf">
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="org.fox.ttirc.Master"/>
<attribute name="Implementation-Version"
value="Build ${build.number}; ${TODAY_SHORT}"/>
<attribute name="Built-Date" value="${TODAY}"/>
<attribute name="Class-Path" value="${manifest.classpath}"/>
</manifest>
<jar destfile="backend.jar" basedir="bin" includes="**/*.class"
manifest="manifest.mf"/>
</target>
<target name="clean">
<delete dir="${bin}"/>
<delete file="manifest.mf"/>
<delete file="backend.jar"/>
</target>
</project>