-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
78 lines (71 loc) · 2.68 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="nwsim" default="dist" basedir=".">
<description>Project NW2</description>
<!--set global properties for this build-->
<property name="src" location="src" />
<property name="build" location="classes" />
<property name="lib" location="lib" />
<property name="dist" location="dist" />
<property name="distlib" location="dist/lib" />
<property name="docs" location="docs" />
<property name="docsapi" location="docs/api" />
<property name="tests" location="test" />
<property name="reports" location="test/report" />
<target name="clean">
<!--Delete created directory trees-->
<delete dir="${build}" includeEmptyDirs="true" />
<delete includeEmptyDirs="true">
<fileset dir="${dist}" excludes="lib/**" />
</delete>
<delete dir="${docs}" includeEmptyDirs="true" />
<delete dir="${docsapi}" includeEmptyDirs="true" />
<delete dir="${tests}" includeEmptyDirs="true" />
<delete dir="${reports}" includeEmptyDirs="true" />
</target>
<target name="init">
<!--creates the build directory-->
<mkdir dir="${build}" />
<mkdir dir="${dist}" />
<mkdir dir="${distlib}" />
<mkdir dir="${docs}" />
<mkdir dir="${docsapi}" />
<mkdir dir="${tests}" />
<mkdir dir="${reports}" />
</target>
<target name="resources">
<copy todir="${build}">
<fileset dir="${src}">
<include name="**/*.jpe" />
<include name="**/*.jpeg" />
<include name="**/*.rmf" />
<include name="**/*.wav" />
<include name="**/*.mid" />
<include name="**/*.midi" />
<include name="**/*.au" />
<include name="**/*.gif" />
<include name="**/*.png" />
<include name="**/*.aiff" />
<include name="**/*.properties" />
</fileset>
</copy>
</target>
<target name="build" depends="init, resources">
<!--Compiles the java code from ${src} directory into ${build} directory-->
<javac encoding="utf-8" destdir="${build}">
<src path="${src}" />
<classpath path="${lib}/commons-math3-3.6.1.jar" />
<classpath path="${lib}/log4j-api-2.11.1.jar"/>
<classpath path="${lib}/log4j-core-2.11.1.jar"/>
</javac>
</target>
<target name="dist" depends="build">
<tstamp />
<jar jarfile="${dist}/nwsim.jar" basedir="${build}" />
</target>
<target name="doc" depends="init">
<javadoc destdir="${docsapi}" author="true" version="true" use="true" windowtitle="API for nwsim" encoding="UTF-8" charset="UTF-8">
<fileset dir="${src}" defaultexcludes="yes">
</fileset>
</javadoc>
</target>
</project>