-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
83 lines (72 loc) · 3.12 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
<?xml version="1.0"?>
<project name="naga" basedir="." default="build">
<tstamp/>
<property file="version.properties"/>
<property file="build.properties"/>
<target name="init" description="init">
<!-- Create our temporary directories -->
<mkdir dir="${dist.dir}"/>
</target>
<target name="clear" description="clear temporary directories">
<delete dir="${build.dir}" quiet="true"/>
</target>
<target name="clear_compile_dir">
<delete dir="${build.classes.dir}"/>
<mkdir dir="${build.classes.dir}"/>
</target>
<target name="compile" depends="init" description="Compile the sources">
<antcall target="clear_compile_dir"/>
<javac srcdir="${main.dir}"
destdir="${build.classes.dir}"
source="1.5"
optimize="on"/>
</target>
<target name="javadoc" description="Generate javadoc">
<javadoc packagenames="naga.*" sourcepath="${main.dir}"
destdir="${docs.dir}"
author="true"
version="true"
use="true"
windowtitle="Naga API">
<doctitle><![CDATA[<h1>Naga</h1>]]></doctitle>
<tag name="todo" scope="all" description="To do:"/>
</javadoc>
</target>
<target name="compile_debug" depends="init" description="Compile the sources with debug info">
<antcall target="clear_compile_dir"/>
<javac srcdir="${main.dir}" destdir="${build.classes.dir}" source="1.5"
debug="yes" debuglevel="lines,source" optimize="on"/>
</target>
<!-- Creates a manifest -->
<target name="create_manifest" description="Creates a manifest">
<mkdir dir="${build.classes.dir}/META-INF"/>
<manifest file="${build.classes.dir}/META-INF/MANIFEST.MF">
<attribute name="Created-By" value="${user.name}"/>
<attribute name="Sealed" value="true"/>
<section name="naga">
<attribute name="Specification-Title" value="Naga"/>
<attribute name="Specification-Version" value="${major.version}.${minor.version}"/>
<attribute name="Specification-Vendor" value="Naga"/>
<attribute name="Implementation-Title" value="naga"/>
<attribute name="Implementation-Version" value="Build ${build.number} ${TODAY}"/>
<attribute name="Implementation-Vendor" value="Naga"/>
</section>
</manifest>
</target>
<target name="build" depends="compile, javadoc, create_manifest" description="Build jar">
<buildnumber file="version.properties"/>
<jar destfile="${dist.dir}/naga-no-em-${major.version}_${minor.version}.jar"
excludes="**/examples/**,**/eventmachine/**"
basedir="${build.classes.dir}" manifest="${build.classes.dir}/META-INF/MANIFEST.MF"/>
<jar destfile="${dist.dir}/naga-${major.version}_${minor.version}.jar"
excludes="**/examples/**"
basedir="${build.classes.dir}" manifest="${build.classes.dir}/META-INF/MANIFEST.MF"/>
<copy todir="${build.classes.dir}/src">
<fileset dir="src/main/"/>
</copy>
<jar destfile="_DIST/naga-debug-${major.version}_${minor.version}.jar" manifest="_BUILD/classes/META-INF/MANIFEST.MF">
<fileset dir="${build.classes.dir}" includes="**/*.java,**/*.class" excludes="**/package-info.java"/>
<fileset dir="${build.dir}" includes="docs/**/*"/>
</jar>
</target>
</project>