1 --- junit4.10/build.xml.~1~ 2011-09-29 14:20:56.000000000 -0700 |
|
2 +++ junit4.10/build.xml 2012-04-10 16:50:13.369334597 -0700 |
|
3 @@ -1,19 +1,19 @@ |
|
4 <project name="junit" default="dist" basedir="." |
|
5 xmlns:artifact="antlib:org.apache.maven.artifact.ant"> |
|
6 <tstamp /> |
|
7 - <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> |
|
8 + |
|
9 |
|
10 <property file="${user.home}/.junit.properties" /> |
|
11 - <property name="src" value="src/main/java" /> |
|
12 + <property name="src" value="src/main/" /> |
|
13 <property name="target" location="target" /> |
|
14 <property name="bin" location="${target}/main" /> |
|
15 <property name="version-base" value="4.10" /> |
|
16 <property name="version-status" value="" /> |
|
17 <property name="version" value="${version-base}${version-status}" /> |
|
18 - <property name="dist" value="junit${version}" /> |
|
19 + <property name="dist" value="dist" /> |
|
20 <property name="versionfile" value="${src}/junit/runner/Version.java" /> |
|
21 <property name="zipfile" value="${dist}/${dist}.zip" /> |
|
22 - <property name="testsrc" location="src/test/java" /> |
|
23 + <property name="testsrc" location="src/test" /> |
|
24 <property name="testbin" location="${target}/test/java" /> |
|
25 <property name="unjarred" |
|
26 value="**/*.jar, ${testfiles}, doc/**, README.html, .classpath, .project, cpl-v10.html" /> |
|
27 @@ -28,11 +28,18 @@ |
|
28 |
|
29 <property name="javadocdir" location="${dist}/javadoc" /> |
|
30 <property name="javadoczip" location="${dist}-javadoc.zip" /> |
|
31 - <property name="hamcrestlib" location="lib/hamcrest-core-1.1.jar" /> |
|
32 - <property name="hamcrestsrc" location="${dist}/temp.hamcrest.source" /> |
|
33 + <property name="javadocpackages" value="org.junit, org.junit.runner, org.junit.runner.description, org.junit.runner.manipulation, org.junit.runner.notification, org.junit.runners, org.hamcrest.core, org.junit.matchers" /> |
|
34 + <property name="hamcrestsrc" location="temp.hamcrest.source" /> |
|
35 |
|
36 <target name="init"> |
|
37 <tstamp/> |
|
38 + <unjar src="${srcjar}" dest="${src}" /> |
|
39 + <copy todir="${testsrc}/org"> |
|
40 + <fileset dir="org" /> |
|
41 + </copy> |
|
42 + <copy todir="${testsrc}/junit"> |
|
43 + <fileset dir="junit" /> |
|
44 + </copy> |
|
45 </target> |
|
46 |
|
47 <target name="versiontag" depends="init"> |
|
48 @@ -50,6 +57,8 @@ |
|
49 <!-- If two builds are made within a minute --> |
|
50 <delete dir="${dist}" quiet="true" /> |
|
51 <!-- Delete all previous temporary build artifacts --> |
|
52 + <delete dir="${src}" quiet="true" /> |
|
53 + <delete dir="${testsrc}" quiet="true" /> |
|
54 <delete dir="${target}" quiet="true" /> |
|
55 |
|
56 <delete file="${zipfile}" quiet="true"/> |
|
57 @@ -76,12 +85,12 @@ |
|
58 </macrodef> |
|
59 |
|
60 <target name="build" depends="versiontag"> |
|
61 - <junit_compilation srcdir="${src}" destdir="${bin}" classpath="${hamcrestlib}"/> |
|
62 - <unjar src="${hamcrestlib}" dest="${bin}" /> |
|
63 - <junit_compilation srcdir="${testsrc}" destdir="${testbin}" classpath="${hamcrestlib};${bin}"/> |
|
64 + <junit_compilation srcdir="${hamcrestsrc}" destdir="${bin}" classpath=""/> |
|
65 + <junit_compilation srcdir="${src}" destdir="${bin}" classpath="${bin}"/> |
|
66 + <junit_compilation srcdir="${testsrc}" destdir="${testbin}" classpath="${bin}"/> |
|
67 </target> |
|
68 |
|
69 - <target name="jars" depends="build"> |
|
70 + <target name="jars"> |
|
71 <mkdir dir="${dist}" /> |
|
72 <jar |
|
73 jarfile="${dist}/${srcjar}" |
|
74 @@ -121,40 +130,33 @@ |
|
75 |
|
76 <target name="samples-and-tests"> |
|
77 <copy todir="${dist}"> |
|
78 - <fileset dir="${testbin}" /> |
|
79 - <fileset dir="${testsrc}" /> |
|
80 + <fileset dir="${testsrc}" /> |
|
81 </copy> |
|
82 </target> |
|
83 |
|
84 - <target name="unjar.hamcrest"> |
|
85 - <unjar src="${hamcrestlib}" dest="${hamcrestsrc}" /> |
|
86 - </target> |
|
87 - |
|
88 + |
|
89 <target name="release-notes"> |
|
90 <property name="basename" value="doc/ReleaseNotes${version-base}" /> |
|
91 - <exec executable="build/Markdown.pl" failonerror="true"> |
|
92 + <exec executable="perl" failonerror="true"> |
|
93 + <arg file="../../Markdown.pl"/> |
|
94 <arg file="${basename}.txt"/> |
|
95 <redirector output="${basename}.html" /> |
|
96 </exec> |
|
97 </target> |
|
98 |
|
99 - <target name="javadoc" depends="unjar.hamcrest"> |
|
100 - <javadoc destdir="${javadocdir}" |
|
101 + <target name="javadoc" > |
|
102 + <javadoc packagenames="${javadocpackages}" |
|
103 + destdir="${javadocdir}" |
|
104 author="false" |
|
105 version="false" |
|
106 use="false" |
|
107 windowtitle="JUnit API" |
|
108 - stylesheetfile="stylesheet.css" |
|
109 - > |
|
110 - <excludepackage name="junit.*" /> |
|
111 - <excludepackage name="org.junit.internal.*" /> |
|
112 - <excludepackage name="org.junit.experimental.theories.internal.*" /> |
|
113 - |
|
114 - <sourcepath location="${src}" /> |
|
115 - <sourcepath location="${hamcrestsrc}" /> |
|
116 - <link href="http://java.sun.com/javase/6/docs/api/" /> |
|
117 - </javadoc> |
|
118 - </target> |
|
119 + stylesheetfile="javadoc/stylesheet.css" |
|
120 + > |
|
121 + <sourcepath location="${src}" /> |
|
122 + <sourcepath location="${hamcrestsrc}" /> |
|
123 + </javadoc> |
|
124 + </target> |
|
125 |
|
126 <target name="javadoczip"> |
|
127 <delete file="${javadoczip}" /> |
|
128 @@ -163,7 +165,7 @@ |
|
129 </target> |
|
130 |
|
131 <target name="populate-dist" |
|
132 - depends="clean, build, jars, samples-and-tests, javadoc, release-notes" |
|
133 + depends="clean, build, jars, samples-and-tests, javadoc" |
|
134 > |
|
135 <copy todir="${dist}/doc"> |
|
136 <fileset dir="doc"/> |
|
137 @@ -171,7 +173,6 @@ |
|
138 <copy file="README.html" tofile="${dist}/README.html" /> |
|
139 <copy file="BUILDING" tofile="${dist}/BUILDING" /> |
|
140 <copy file="cpl-v10.html" tofile="${dist}/cpl-v10.html" /> |
|
141 - <copy file="build.xml" tofile="${dist}/build.xml" /> |
|
142 </target> |
|
143 |
|
144 <macrodef name="run-tests"> |
|