11<?xml version =" 1.0" encoding =" UTF-8" ?>
22
3- <!-- build.xml generated by maven from project.xml version 1.0
4- on date May 2 2004, time 2227 -->
3+ <!-- build.xml generated by maven from project.xml version 1.1-dev
4+ on date October 23 2004, time 1747 -->
55
66<project default =" jar" name =" commons-io" basedir =" ." >
77 <property name =" defaulttargetdir" value =" target" >
1212 </property >
1313 <property name =" testclassesdir" value =" target/test-classes" >
1414 </property >
15+ <property name =" testclassesdir" value =" target/test-classes" >
16+ </property >
1517 <property name =" testreportdir" value =" target/test-reports" >
1618 </property >
1719 <property name =" distdir" value =" dist" >
1820 </property >
1921 <property name =" javadocdir" value =" dist/docs/api" >
2022 </property >
21- <property name =" final.name" value =" commons-io-1.0 " >
23+ <property name =" final.name" value =" commons-io-1.1-dev " >
2224 </property >
25+ <path id =" build.classpath" >
26+ <fileset dir =" ${ libdir } " >
27+ <include name =" **/*.jar" >
28+ </include >
29+ </fileset >
30+ </path >
2331 <target name =" init" description =" o Initializes some properties" >
2432 <mkdir dir =" ${ libdir } " >
2533 </mkdir >
2634 <condition property =" noget" >
2735 <equals arg2=" only" arg1=" ${ build.sysclasspath } " >
2836 </equals >
2937 </condition >
38+ <!-- Test if JUNIT is present in ANT classpath-->
39+
40+ <available property =" Junit.present" classname =" junit.framework.Test" >
41+ </available >
3042 </target >
3143 <target name =" compile" description =" o Compile the code" depends =" get-deps" >
3244 <mkdir dir =" ${ classesdir } " >
3648 <pathelement location =" src/java" >
3749 </pathelement >
3850 </src >
39- <classpath >
40- <fileset dir =" ${ libdir } " >
41- <include name =" *.jar" >
42- </include >
43- </fileset >
51+ <classpath refid =" build.classpath" >
4452 </classpath >
4553 </javac >
46- <copy todir =" ${ classesdir } " >
54+ <mkdir dir =" ${ classesdir } /META-INF" >
55+ </mkdir >
56+ <copy todir =" ${ classesdir } /META-INF" >
4757 <fileset dir =" ." >
4858 <include name =" NOTICE.txt" >
4959 </include >
5060 </fileset >
5161 </copy >
5262 </target >
5363 <target name =" jar" description =" o Create the jar" depends =" compile,test" >
54- <jar jarfile =" target /${ final.name } .jar" excludes =" **/package.html" basedir =" ${ classesdir } " >
64+ <jar jarfile =" ${ defaulttargetdir } /${ final.name } .jar" excludes =" **/package.html" basedir =" ${ classesdir } " >
5565 </jar >
5666 </target >
5767 <target name =" clean" description =" o Clean up the generated directories" >
7484 <fail message =" There were test failures." >
7585 </fail >
7686 </target >
77- <target name =" internal-test" depends =" compile-tests" >
87+ <target name =" internal-test" if = " Junit.present " depends =" junit-present, compile-tests" >
7888 <mkdir dir =" ${ testreportdir } " >
7989 </mkdir >
8090 <junit dir =" ./" failureproperty =" test.failure" printSummary =" yes" fork =" true" haltonerror =" true" >
8595 <formatter usefile =" false" type =" plain" >
8696 </formatter >
8797 <classpath >
88- <fileset dir =" ${ libdir } " >
89- <include name =" *.jar" >
90- </include >
91- </fileset >
98+ <path refid =" build.classpath" >
99+ </path >
92100 <pathelement path =" ${ testclassesdir } " >
93101 </pathelement >
94102 <pathelement path =" ${ classesdir } " >
104112 </batchtest >
105113 </junit >
106114 </target >
107- <target name =" compile-tests" depends =" compile" >
115+ <target name =" junit-present" unless =" Junit.present" depends =" init" >
116+ <echo >================================= WARNING ================================</echo >
117+ <echo >Junit isn't present in your ${ ANT_HOME } /lib directory. Tests not executed.</echo >
118+ <echo >==========================================================================</echo >
119+ </target >
120+ <target name =" compile-tests" if =" Junit.present" depends =" junit-present,compile" >
108121 <mkdir dir =" ${ testclassesdir } " >
109122 </mkdir >
110123 <javac destdir =" ${ testclassesdir } " deprecation =" true" debug =" true" optimize =" false" excludes =" **/package.html" >
113126 </pathelement >
114127 </src >
115128 <classpath >
116- <fileset dir =" ${ libdir } " >
117- <include name =" *.jar" >
118- </include >
119- </fileset >
129+ <path refid =" build.classpath" >
130+ </path >
120131 <pathelement path =" ${ classesdir } " >
121132 </pathelement >
122133 </classpath >
123134 </javac >
124135 </target >
125- <target name =" javadoc" description =" o Generate javadoc" depends =" jar " >
136+ <target name =" javadoc" description =" o Generate javadoc" depends =" get-deps " >
126137 <mkdir dir =" ${ javadocdir } " >
127138 </mkdir >
128139 <tstamp >
131142 </tstamp >
132143 <property name =" copyright" value =" Copyright &copy; The Apache Software Foundation. All Rights Reserved." >
133144 </property >
134- <property name =" title" value =" IO 1.0 API" >
145+ <property name =" title" value =" IO 1.1-dev API" >
135146 </property >
136147 <javadoc use =" true" private =" true" destdir =" ${ javadocdir } " author =" true" version =" true" sourcepath =" src/java" packagenames =" org.apache.commons.io.*" >
137148 <classpath >
138- <fileset dir =" ${ libdir } " >
139- <include name =" *.jar" >
140- </include >
141- </fileset >
142- <pathelement location =" target/${ final.name } .jar" >
143- </pathelement >
149+ <path refid =" build.classpath" >
150+ </path >
144151 </classpath >
145152 </javadoc >
146153 </target >
147154 <target name =" get-deps" unless =" noget" depends =" init" >
155+ <!-- Proxy settings works only with a JDK 1.2 and higher.-->
156+
157+ <setproxy >
158+ </setproxy >
148159 <get dest =" ${ libdir } /junit-3.8.1.jar" usetimestamp =" true" ignoreerrors =" true" src =" http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar" >
149160 </get >
150- <get dest =" ${ libdir } /junit-3.8.1.jar" usetimestamp =" true" ignoreerrors =" true" src =" http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar" >
151- </get >
152- <get dest =" ${ libdir } /ant-1.5.jar" usetimestamp =" true" ignoreerrors =" true" src =" http://www.ibiblio.org/maven/ant/jars/ant-1.5.jar" >
153- </get >
154- <get dest =" ${ libdir } /ant-optional-1.5.jar" usetimestamp =" true" ignoreerrors =" true" src =" http://www.ibiblio.org/maven/ant/jars/ant-optional-1.5.jar" >
155- </get >
156161 </target >
157162 <target name =" install-maven" >
158163 <get dest =" ${ user.home } /maven-install-latest.jar" usetimestamp =" true" src =" ${ repo } /maven/maven-install-latest.jar" >
159164 </get >
160165 <unjar dest =" ${ maven.home } " src =" ${ user.home } /maven-install-latest.jar" >
161166 </unjar >
162167 </target >
163- </project >
168+ </project >
0 commit comments