
change sitemng url
@0cecd06832fab95d617204d92498b9e19be2386a
+++ build.xml
... | ... | @@ -0,0 +1,109 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<project name="projx" default="all" basedir="."> | |
3 | + <description>Builds, tests, and runs projx</description> | |
4 | + <property name="build.dir" value="./"/> | |
5 | + <property name="src.dir" location="${build.dir}/src"/> | |
6 | + <property name="test.dir" location="${build.dir}/test/src"/> | |
7 | + <property name="test.htmlreports.dir" location="${build.dir}/test/htmlreports"/> | |
8 | + <property name="test.data.dir" location="${build.dir}/test/data"/> | |
9 | + <property name="junit.class.name" value="com.megacorp.projx.JUnit.AllTests"/> | |
10 | + | |
11 | + | |
12 | + | |
13 | + <!-- Classpath to find java packages --> | |
14 | + <path id="classpath.base"> | |
15 | + <pathelement location="/usr/java/latest/lib/tools.jar" /> | |
16 | + </path | |
17 | + <!-- Classpath for tests to find src packages --> | |
18 | + <path id="classpath.src"> | |
19 | + <pathelement location="src" /> | |
20 | + </path> | |
21 | + | |
22 | + <path id="classpath.junittest"2 | |
23 | + <path refid="classpath.base" /> | |
24 | + <pathelement location="/opt/lib/junit-4.9b2.jar" /> | |
25 | + <pathelement location="${test.dir}" /> | |
26 | + </path> | |
27 | + | |
28 | + <target name="clean" description="Remove all .class files"> | |
29 | + <delete includeEmptyDirs="true" failonerror="false"> | |
30 | + <fileset dir="${src.dir}"> | |
31 | + <include name="**/*.class"/> | |
32 | + </fileset> | |
33 | + <fileset dir="${test.dir}"> | |
34 | + <include name="**/*.class"/> | |
35 | + </fileset> | |
36 | + <fileset dir="${test.htmlreports.dir}"> | |
37 | + <include name="**/*.txt"/> | |
38 | + <include name="**/*.xml"/> | |
39 | + <include name="**/*.html"/> | |
40 | + </fileset> | |
41 | + </delete> | |
42 | + </target> | |
43 | + | |
44 | + <target name="compile"> | |
45 | + <javac srcdir="${src.dir}" destdir="${src.dir}" debug="true" includeAntRuntime="false"> | |
46 | + <classpath refid="classpath.base"/> | |
47 | + <include name="**/*.java"/> | |
48 | + </javac> | |
49 | + </target> | |
50 | + | |
51 | + <target name="compile-test" depends="compile"> | |
52 | + <javac srcdir="${test.dir}" destdir="${test.dir}" debug="true" includes="${src.dir}" includeAntRuntime="false"> | |
53 | + <classpath refid="classpath.base"/> | |
54 | +53 | |
55 | + <classpath refid="classpath.src"/> | |
56 | +54 | |
57 | + <classpath refid="classpath.junittest"/> | |
58 | +55 | |
59 | + <include name="**/*.java"/> | |
60 | +56 | |
61 | + </javac> | |
62 | +57 | |
63 | + </target> | |
64 | +58 | |
65 | + | |
66 | +59 | |
67 | + <target name="test" depends="compile-test"> | |
68 | +60 | |
69 | + <mkdir dir="${test.data.dir}"/> | |
70 | +61 | |
71 | + <mkdir dir="${test.htmlreports.dir}"/> | |
72 | +62 | |
73 | + <junit fork="no" haltonfailure="no" showoutput="yes" printsummary="true"> | |
74 | +63 | |
75 | + <test name="${junit.class.name}" todir="${test.data.dir}"/> | |
76 | +64 | |
77 | + <formatter type="brief" usefile="false"/> | |
78 | +65 | |
79 | + <formatter type="xml"/> | |
80 | +66 | |
81 | + <classpath refid="classpath.base" /> | |
82 | +67 | |
83 | + <classpath refid="classpath.src" /> | |
84 | +68 | |
85 | + <classpath refid="classpath.junittest" /> | |
86 | +69 | |
87 | + </junit> | |
88 | +70 | |
89 | + <junitreport todir="${test.htmlreports.dir}"> | |
90 | +71 | |
91 | + <fileset dir="${test.data.dir}"> | |
92 | +72 | |
93 | + <include name="TEST-*.xml"/> | |
94 | +73 | |
95 | + </fileset> | |
96 | +74 | |
97 | + <report format="frames" todir="${test.htmlreports.dir}"/> | |
98 | +75 | |
99 | + </junitreport> | |
100 | +76 | |
101 | + </target> | |
102 | +77 | |
103 | + | |
104 | +78 | |
105 | + <target name="all" depends="compile-test" /> | |
106 | +79 | |
107 | + | |
108 | +80 | |
109 | +</project> |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?