-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.xml
124 lines (103 loc) · 3.58 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="BasicPlayer" basedir="." default="all">
<property environment="env"/>
<!-- project wide properties -->
<property name="src" location="source"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="lib" location="lib"/>
<property name="eclipse.jar" location="${env.ECLIPSE_DIR}/lib/eclipse.jar"/>
<fileset id="libraries" dir="${lib}">
<include name="**/*.jar"/>
</fileset>
<path id="buildclasspath">
<fileset refid="libraries"/>
<pathelement path="${eclipse.jar}"/>
</path>
<path id="runclasspath">
<path refid="buildclasspath"/>
<pathelement path="${build}"/>
</path>
<!-- initialise the ant building -->
<target name="init">
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<!-- compiles the source tree -->
<target name = "compile"
depends = "init"
description = "Compiles everything in the source directory">
<javac srcdir="${src}" destdir="${build}" debug="true">
<classpath>
<fileset refid="libraries"/>
<pathelement path="${eclipse.jar}"/>
</classpath>
</javac>
<!-- In case regression tests are used
<javac srcdir="${tests}" destdir="${build}" debug="true">
<classpath>
<pathelement path="${build}"/>
<fileset refid="libraries"/>
</classpath>
</javac>
-->
<!-- copies the log4j and hibernate property files to build -->
<copy todir="${build}">
<fileset dir="${src}">
<include name="**/*.properties"/>
<include name="**/*.xml"/>
</fileset>
</copy>
</target>
<!-- prepares a runable distribution -->
<target name="dist" depends="compile">
<!-- creates the directories -->
<mkdir dir="${dist}/lib"/>
<mkdir dir="${dist}/prologsource"/>
<!-- creates the jar file -->
<jar jarfile="${dist}/lib/${ant.project.name}.jar" basedir="${build}"/>
<!-- copies the data files into the dist dir -->
<copy todir="${dist}/prologsource">
<fileset dir="prologsource">
<include name="**/*"/>
</fileset>
</copy>
</target>
<!-- main target used by IDE -->
<target name="all" depends="compile" description="Main Target">
</target>
<!-- runs the project -->
<target name="run" depends="all">
<java classname="de.tudresden.inf.ggp.basicplayer.MyPlayer"
fork="true">
<classpath>
<pathelement path="${build}"/>
<fileset refid="libraries"/>
<pathelement path="${eclipse.jar}"/>
</classpath>
</java>
</target>
<!-- runs the unit tests -->
<target name="unittest" depends="all">
<junit fork="yes">
<classpath>
<pathelement path="${build}"/>
<fileset refid="libraries"/>
</classpath>
</junit>
</target>
<!-- cleans up the project -->
<target name="clean" description="Deletes everything build via ant">
<delete dir="${build}" failonerror="false"/>
<delete dir="doc" failonerror="false"/>
<delete dir="${dist}" failonerror="false"/>
</target>
<target name="doc">
<javadoc access="private" author="true" classpathref="buildclasspath" destdir="doc" doctitle="${ant.project.name}" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.6" sourcepath="${src}" splitindex="true" use="true" version="true">
<link href="http://java.sun.com/javase/6/docs/api/"/>
<link href="http://87.230.22.228/doc/javadoc/JavaEclipseInterface/"/>
<link href="http://palamedes-ide.sourceforge.net/javadoc/"/>
</javadoc>
</target>
</project>