-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.xml
67 lines (60 loc) · 2.81 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
<project default = "compile">
<!--
build.xml for 0000770
-->
<property environment = "env"/>
<property name = "user" value ="zhansaya" />
<property name = "webRoot" value = "${env.HOME}/public_html/"/>
<property name = "webBaseURL" value = "http://www.cs.ucsb.edu/~${user}"/>
<property name = "project" value = "cs56_S12_0000770"/>
<property name = "projectPath" value = "cs56/W14/StateQuiz"/>
<property name = "javadocDest" value = "${webRoot}/${projectPath}/javadoc"/>
<property name = "javadocURL" value = "${webBaseURL}/${projectPath}/javadoc"/>
<property name = "main" value = "edu.ucsb.cs56.projects.games.states_quiz.GameFrame"/>
<path id = "project.class.path">
<pathelement location = "build"/>
<pathelement location = "lib/junit-4.8.2.jar"/>
</path>
<target name = "compile" description = "Compile the map quiz">
<mkdir dir = "build"/>
<javac srcdir = "src" destdir = "build" debug = "true" debuglevel = "lines,source,vars" includeantruntime = "false">
<classpath>
<pathelement location = "build"/>
<pathelement location = "/cs/faculty/pconrad/public_html/cs56/lib/junit-4.8.2.jar"/>
</classpath>
</javac>
<copy todir="build/image">
<fileset dir="src/edu/ucsb/cs56/projects/games/states_quiz/image"/>
</copy>
</target>
<target name = "clean" description = "Remove files and directories that aren't needed">
<delete dir = "build" quiet = "true"/>
<delete dir = "javadoc" quiet = "true"/>
<delete dir = "dist" quiet = "true"/>
</target>
<target name = "javadoc" depends = "compile" description = "Create the Jacadoc">
<delete dir = "javadoc" quiet = "true"/>
<javadoc destdir = "javadoc" author = "true" version = "true" use = "true">
<fileset dir = "src" includes = "**/*.java"/>
<classpath refid = "project.class.path"/>
</javadoc>
<delete quiet = "true" dir = "${javadocDest}"/>
<copy todir = "${javadocDest}">
<fileset dir = "javadoc"/>
</copy>
<chmod dir="${javadocDest}" perm="755" type="dir" includes="**"/>
<chmod dir="${javadocDest}" perm="755" type="file" includes="**/*"/>
<echo>Javadoc deployed to ${javadocURL}</echo>
</target>
<target name = "run" depends = "compile" description = "Run the map quiz">
<java classname = "${main}" classpath = "build" fork = "true" />
</target>
<target name = "jar" depends = "compile" description = "Create a JAR">
<mkdir dir = "dist"/>
<jar destfile = "dist/${project}.jar" basedir = "build">
<manifest>
<attribute name="Main-Class" value="${main}"/>
</manifest>
</jar>
</target>
</project>