This repository has been archived by the owner on Sep 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
101 lines (86 loc) · 2.87 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="dnsshim" default="dist" basedir=".">
<property name="src" location="src" />
<property name="build" location="build" />
<property name="dist" location="dnsshim-dist" />
<target name="init">
<mkdir dir="${build}" />
</target>
<target name="compile" depends="init" description="compile the source">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" debug="on" deprecation="true">
<classpath>
<pathelement path="${classpath}" />
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</classpath>
</javac>
<copy todir="${build}" >
<fileset dir="${src}">
<include name="**/resources/**" />
</fileset>
</copy>
<copy todir="${build}/META-INF">
<fileset dir="${src}/META-INF">
<include name="*" />
</fileset>
</copy>
</target>
<target name="dist" depends="compile" description="generate the distribution">
<!-- Create the distribution directory -->
<mkdir dir="${dist}" />
<mkdir dir="${dist}/lib" />
<!-- signer -->
<jar jarfile="${dist}/dnsshim-signer.jar">
<fileset dir="${build}/" excludes="**/xfrd/" />
<manifest>
<attribute name="Main-Class"
value="br/registro/dnsshim/signer/server/SignerServer" />
<attribute name="Class-Path" value="${manifest-classpath-signer} ." /> <!-- class-path + current directory -->
</manifest>
</jar>
<!-- xfrd -->
<jar jarfile="${dist}/dnsshim-xfrd.jar">
<fileset dir="${build}/" />
<manifest>
<attribute name="Main-Class"
value="br/registro/dnsshim/xfrd/server/XfrdLauncher" />
<attribute name="Class-Path" value="${manifest-classpath-xfrd} ." /> <!-- class-path + current directory -->
</manifest>
</jar>
<!-- copy dependencies -->
<copy todir="${dist}/lib">
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</copy>
<copy file="scripts/SlaveSync.sh" todir="${dist}/"/>
<copy file="scripts/CreateZoneDirs.sh" todir="${dist}/"/>
<copy file="ChangeLog" todir="${dist}/"/>
</target>
<target name="clean" description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
<property name="lib.app.dir" location="lib/" />
<!-- building XFRD manifest class-path -->
<pathconvert pathsep=" " property="manifest-classpath-xfrd">
<map from="${lib.app.dir}" to="lib" /> <!-- to relative path -->
<path id="class.path">
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
</pathconvert>
<!-- building signer manifest class-path -->
<pathconvert pathsep=" " property="manifest-classpath-signer">
<map from="${lib.app.dir}" to="lib" /> <!-- to relative path -->
<path id="class.path">
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
</pathconvert>
</project>