|
1 | 1 | <project name="Codec" default="compile" basedir="."> |
2 | | - |
3 | | - |
4 | | -<!-- |
| 2 | + <!-- |
5 | 3 | "Codec" component of the Jakarta Commons Subproject |
6 | | - $Id: build.xml,v 1.3 2003/04/30 13:35:14 ggregory Exp $ |
| 4 | + $Id: build.xml,v 1.4 2003/05/30 00:42:16 ggregory Exp $ |
7 | 5 | --> |
8 | | - |
9 | | - |
10 | | -<!-- ========== Initialize Properties ===================================== --> |
11 | | - |
12 | | - <property file="${user.home}/${component.name}.build.properties" /> |
13 | | - <property file="${user.home}/build.properties" /> |
14 | | - <property file="${basedir}/build.properties" /> |
15 | | - <property file="${basedir}/default.properties" /> |
16 | | - |
17 | | -<!-- ========== Construct compile classpath =============================== --> |
18 | | - |
19 | | - <path id="compile.classpath"> |
20 | | - <pathelement location="${build.home}/classes"/> |
21 | | - </path> |
22 | | - |
23 | | -<!-- ========== Construct unit test classpath ============================= --> |
24 | | - |
25 | | - <path id="test.classpath"> |
26 | | - <pathelement location="${build.home}/classes"/> |
27 | | - <pathelement location="${build.home}/tests"/> |
28 | | - <pathelement location="${junit.jar}"/> |
29 | | - </path> |
30 | | - |
31 | | -<!-- ========== Executable Targets ======================================== --> |
32 | | - |
33 | | - <target name="init" |
34 | | - description="Initialize and evaluate conditionals"> |
35 | | - <echo message="-------- ${component.name} ${component.version} --------"/> |
36 | | - <filter token="name" value="${component.name}"/> |
37 | | - <filter token="package" value="${component.package}"/> |
38 | | - <filter token="version" value="${component.version}"/> |
39 | | - </target> |
40 | | - |
41 | | - |
42 | | - <target name="prepare" depends="init" |
43 | | - description="Prepare build directory"> |
44 | | - <mkdir dir="${build.home}"/> |
45 | | - <mkdir dir="${build.home}/classes"/> |
46 | | - <mkdir dir="${build.home}/conf"/> |
47 | | - <mkdir dir="${build.home}/tests"/> |
48 | | - <mkdir dir="${build.home}/test-reports"/> |
49 | | - </target> |
50 | | - |
51 | | - |
52 | | - <target name="static" depends="prepare" |
53 | | - description="Copy static files to build directory"> |
54 | | - <tstamp/> |
55 | | - <copy todir="${build.home}/conf" filtering="on"> |
56 | | - <fileset dir="${conf.home}" includes="*.MF"/> |
57 | | - </copy> |
58 | | - </target> |
59 | | - |
60 | | - |
61 | | - <target name="compile" depends="static" |
62 | | - description="Compile shareable components"> |
63 | | - <javac srcdir="${source.home}" |
64 | | - destdir="${build.home}/classes" |
65 | | - debug="${compile.debug}" |
66 | | - deprecation="${compile.deprecation}" |
67 | | - optimize="${compile.optimize}"> |
68 | | - <classpath refid="compile.classpath"/> |
69 | | - </javac> |
70 | | - <copy todir="${build.home}/classes" filtering="on"> |
71 | | - <fileset dir="${source.home}" excludes="**/*.java"/> |
72 | | - </copy> |
73 | | - </target> |
74 | | - |
75 | | - |
76 | | - <target name="clean" |
77 | | - description="Clean build and distribution directories"> |
78 | | - <delete dir="${build.home}"/> |
79 | | - <delete dir="${dist.home}"/> |
80 | | - </target> |
81 | | - |
82 | | - |
83 | | - <target name="all" depends="clean,compile" |
84 | | - description="Clean and compile all components"/> |
85 | | - |
86 | | - |
87 | | - <target name="javadoc" depends="compile" |
88 | | - description="Create component Javadoc documentation"> |
89 | | - <mkdir dir="${dist.home}"/> |
90 | | - <mkdir dir="${dist.home}/docs"/> |
91 | | - <mkdir dir="${dist.home}/docs/api"/> |
92 | | - <javadoc sourcepath="${source.home}" |
93 | | - destdir="${dist.home}/docs/api" |
94 | | - packagenames="org.apache.commons.*" |
95 | | - author="true" |
96 | | - private="true" |
97 | | - version="true" |
98 | | - doctitle="<h1>${component.title}</h1>" |
99 | | - windowtitle="${component.title} (Version ${component.version})" |
100 | | - bottom="Copyright (c) 2003 - Apache Software Foundation"> |
101 | | - <classpath refid="compile.classpath"/> |
102 | | - </javadoc> |
103 | | - </target> |
104 | | - |
105 | | - |
106 | | - <target name="dist" depends="compile,javadoc" |
107 | | - description="Create binary distribution"> |
108 | | - <mkdir dir="${dist.home}"/> |
109 | | - <copy file="../LICENSE" |
110 | | - todir="${dist.home}"/> |
111 | | - <copy file="${basedir}/RELEASE-NOTES.txt" |
112 | | - todir="${dist.home}"/> |
113 | | - <antcall target="jar"/> |
114 | | - </target> |
115 | | - |
116 | | - |
117 | | - <target name="jar" depends="compile" |
118 | | - description="Create jar"> |
119 | | - <mkdir dir="${dist.home}"/> |
120 | | - <mkdir dir="${build.home}/classes/META-INF"/> |
121 | | - <copy file="../LICENSE" |
122 | | - tofile="${build.home}/classes/META-INF/LICENSE.txt"/> |
123 | | - <jar jarfile="${dist.home}/${final.name}.jar" |
124 | | - basedir="${build.home}/classes" |
125 | | - manifest="${build.home}/conf/MANIFEST.MF"/> |
126 | | - </target> |
127 | | - |
128 | | - |
129 | | - <target name="install-jar" depends="jar" |
130 | | - description="--> Installs jar file in ${lib.repo}"> |
131 | | - <copy todir="${lib.repo}" filtering="no"> |
132 | | - <fileset dir="${dist.home}"> |
133 | | - <include name="${final.name}.jar"/> |
134 | | - </fileset> |
135 | | - </copy> |
136 | | - </target> |
137 | | - |
138 | | - |
139 | | -<!-- ========== Unit Test Targets ========================================= --> |
140 | | - |
141 | | - <target name="compile.tests" depends="compile" |
142 | | - description="Compile unit test cases"> |
143 | | - <javac srcdir="${test.home}" |
144 | | - destdir="${build.home}/tests" |
145 | | - debug="${compile.debug}" |
146 | | - deprecation="${compile.deprecation}" |
147 | | - optimize="${compile.optimize}"> |
148 | | - <classpath refid="test.classpath"/> |
149 | | - </javac> |
150 | | - <copy todir="${build.home}/tests" filtering="on"> |
151 | | - <fileset dir="${test.home}" excludes="**/*.java"/> |
152 | | - </copy> |
153 | | - </target> |
154 | | - |
155 | | - |
156 | | - |
157 | | - |
158 | | - <!-- Run all the JUnit Tests --> |
159 | | - <target name="test" depends="compile.tests" description="Compiles and runs unit test cases"> |
160 | | - <record name="${build.home}/test-output.txt" |
161 | | - append="no" |
162 | | - action="start"/> |
163 | | - <junit printsummary="yes" haltonfailure="yes"> |
164 | | - <classpath refid="test.classpath"/> |
165 | | - |
166 | | - <formatter type="plain"/> |
167 | | - |
168 | | - <batchtest fork="yes" todir="${build.home}/test-reports"> |
169 | | - <fileset dir="${test.home}"> |
170 | | - <include name="**/*Test.java"/> |
171 | | - <exclude name="**/*AbstractTest.java"/> |
172 | | - </fileset> |
173 | | - </batchtest> |
174 | | - </junit> |
175 | | - <record name="${build.home}/test-output.txt" |
176 | | - action="stop"/> |
177 | | - </target> |
178 | | - |
| 6 | + <!-- ========== Initialize Properties ===================================== --> |
| 7 | + <property file="${user.home}/${component.name}.build.properties"/> |
| 8 | + <property file="${user.home}/build.properties"/> |
| 9 | + <property file="${basedir}/build.properties"/> |
| 10 | + <property file="${basedir}/default.properties"/> |
| 11 | + <!-- ========== Construct compile classpath =============================== --> |
| 12 | + <path id="compile.classpath"> |
| 13 | + <pathelement location="${build.home}/classes"/> |
| 14 | + </path> |
| 15 | + <!-- ========== Construct unit test classpath ============================= --> |
| 16 | + <path id="test.classpath"> |
| 17 | + <pathelement location="${build.home}/classes"/> |
| 18 | + <pathelement location="${build.home}/tests"/> |
| 19 | + <pathelement location="${junit.jar}"/> |
| 20 | + </path> |
| 21 | + <!-- ========== Executable Targets ======================================== --> |
| 22 | + <target name="init" description="Initialize and evaluate conditionals"> |
| 23 | + <echo message="-------- ${component.name} ${component.version} --------"/> |
| 24 | + <filter token="name" value="${component.name}"/> |
| 25 | + <filter token="package" value="${component.package}"/> |
| 26 | + <filter token="version" value="${component.version}"/> |
| 27 | + </target> |
| 28 | + <target name="prepare" depends="init" description="Prepare build directory"> |
| 29 | + <mkdir dir="${build.home}"/> |
| 30 | + <mkdir dir="${build.home}/classes"/> |
| 31 | + <mkdir dir="${build.home}/conf"/> |
| 32 | + <mkdir dir="${build.home}/tests"/> |
| 33 | + <mkdir dir="${build.home}/test-reports"/> |
| 34 | + </target> |
| 35 | + <target name="static" depends="prepare" description="Copy static files to build directory"> |
| 36 | + <tstamp/> |
| 37 | + <copy todir="${build.home}/conf" filtering="on"> |
| 38 | + <fileset dir="${conf.home}" includes="*.MF"/> |
| 39 | + </copy> |
| 40 | + </target> |
| 41 | + <target name="compile" depends="static" description="Compile shareable components"> |
| 42 | + <javac srcdir="${source.home}" destdir="${build.home}/classes" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}"> |
| 43 | + <classpath refid="compile.classpath"/> |
| 44 | + </javac> |
| 45 | + <copy todir="${build.home}/classes" filtering="on"> |
| 46 | + <fileset dir="${source.home}" excludes="**/*.java"/> |
| 47 | + </copy> |
| 48 | + </target> |
| 49 | + <target name="clean" description="Clean build and distribution directories"> |
| 50 | + <delete dir="${build.home}"/> |
| 51 | + <delete dir="${dist.home}"/> |
| 52 | + </target> |
| 53 | + <target name="all" depends="clean,compile" description="Clean and compile all components"/> |
| 54 | + <target name="javadoc" depends="compile" description="Create component Javadoc documentation"> |
| 55 | + <mkdir dir="${dist.home}"/> |
| 56 | + <mkdir dir="${dist.home}/docs"/> |
| 57 | + <mkdir dir="${dist.home}/docs/api"/> |
| 58 | + <javadoc sourcepath="${source.home}" destdir="${dist.home}/docs/api" packagenames="org.apache.commons.*" author="true" private="true" version="true" doctitle="<h1>${component.title}</h1>" windowtitle="${component.title} (Version ${component.version})" bottom="Copyright (c) 2003 - Apache Software Foundation" use="true"> |
| 59 | + <classpath refid="compile.classpath"/> |
| 60 | + </javadoc> |
| 61 | + </target> |
| 62 | + <target name="dist" depends="compile,javadoc" description="Create binary distribution"> |
| 63 | + <mkdir dir="${dist.home}"/> |
| 64 | + <copy file="../LICENSE" todir="${dist.home}"/> |
| 65 | + <copy file="${basedir}/RELEASE-NOTES.txt" todir="${dist.home}"/> |
| 66 | + <antcall target="jar"/> |
| 67 | + </target> |
| 68 | + <target name="jar" depends="compile" description="Create jar"> |
| 69 | + <mkdir dir="${dist.home}"/> |
| 70 | + <mkdir dir="${build.home}/classes/META-INF"/> |
| 71 | + <copy file="../LICENSE" tofile="${build.home}/classes/META-INF/LICENSE.txt"/> |
| 72 | + <jar jarfile="${dist.home}/${final.name}.jar" basedir="${build.home}/classes" manifest="${build.home}/conf/MANIFEST.MF"/> |
| 73 | + </target> |
| 74 | + <target name="install-jar" depends="jar" description="--> Installs jar file in ${lib.repo}"> |
| 75 | + <copy todir="${lib.repo}" filtering="no"> |
| 76 | + <fileset dir="${dist.home}"> |
| 77 | + <include name="${final.name}.jar"/> |
| 78 | + </fileset> |
| 79 | + </copy> |
| 80 | + </target> |
| 81 | + <!-- ========== Unit Test Targets ========================================= --> |
| 82 | + <target name="compile.tests" depends="compile" description="Compile unit test cases"> |
| 83 | + <javac srcdir="${test.home}" destdir="${build.home}/tests" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}"> |
| 84 | + <classpath refid="test.classpath"/> |
| 85 | + </javac> |
| 86 | + <copy todir="${build.home}/tests" filtering="on"> |
| 87 | + <fileset dir="${test.home}" excludes="**/*.java"/> |
| 88 | + </copy> |
| 89 | + </target> |
| 90 | + <!-- Run all the JUnit Tests --> |
| 91 | + <target name="test" depends="compile.tests" description="Compiles and runs unit test cases"> |
| 92 | + <record name="${build.home}/test-output.txt" append="no" action="start"/> |
| 93 | + <junit printsummary="yes" haltonfailure="yes"> |
| 94 | + <classpath refid="test.classpath"/> |
| 95 | + <formatter type="plain"/> |
| 96 | + <batchtest fork="yes" todir="${build.home}/test-reports"> |
| 97 | + <fileset dir="${test.home}"> |
| 98 | + <include name="**/*Test.java"/> |
| 99 | + <exclude name="**/*AbstractTest.java"/> |
| 100 | + </fileset> |
| 101 | + </batchtest> |
| 102 | + </junit> |
| 103 | + <record name="${build.home}/test-output.txt" action="stop"/> |
| 104 | + </target> |
179 | 105 | </project> |
0 commit comments