-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.xml
74 lines (55 loc) · 2.49 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
<?xml version="1.0" encoding="utf-8"?>
<project default = "compile">
<!-- build.xml for github.com/UCSB-CS56-Projects/cs56-games-name-memorization , W14, CS56
Original Author : Jasper Fredrickson S11
updated Anthony Hoang and Colin Biafore W14 -->
<property environment="env"/> <!-- load the environment variables -->
<property name="webRoot" value="${env.HOME}/public_html/cs56" />
<property name="webBaseUrl" value="http://www.cs.ucsb.edu/~${env.USER}/cs56"/>
<property name="project" value="cs56-games-name-memorization" />
<property name="javadocDest" value="${webRoot}/${project}/javadoc" />
<property name="javadocURL" value="${webBaseUrl}/${project}/javadoc" />
<property name="mainClass" value="edu.ucsb.cs56.projects.games.name_memorization.Main"/>
<path id="project.class.path">
<pathelement path="build"/>
<pathelement path="lib/junit-4.8.2.jar"/>
</path>
<target name="compile" description="compile my code">
<mkdir dir="build"/>
<javac srcdir="src" destdir="build" includeantruntime="false" debug="true" debuglevel="lines,source" >
<classpath refid="project.class.path"/>
</javac>
</target>
<target name="run" depends="compile" description="run the beginning of a name game">
<java classname="${mainClass}" classpath="build" fork="true"/>
</target>
<target name="test" depends="compile" description="run JUnit tests">
<junit haltonerror="no" haltonfailure="no">
<classpath refid="project.class.path"/>
<batchtest fork="yes">
<fileset dir="src">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
<formatter type="brief" usefile="false" />
</junit>
</target>
<target name="clean" description="delete unnecessary files and directories">
<delete dir="build" quiet="true" />
<delete dir="javadoc" quiet="true"/>
</target>
<target name="javadoc" depends="compile" description="put javadoc on the designated web address">
<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>
</project>