1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+
3+ <!-- build.xml generated by maven from project.xml version 0.1-dev
4+ on date May 4 2006, time 2356-->
5+
6+ <project default =" jar" name =" commons-csv" basedir =" ." >
7+ <!-- Load local and user build preferences-->
8+
9+ <property file =" build.properties" >
10+ </property >
11+ <property file =" ${ user.home } /build.properties" >
12+ </property >
13+ <!-- Build properties-->
14+
15+ <property name =" defaulttargetdir" value =" ${ basedir } /target" >
16+ </property >
17+ <property name =" libdir" value =" ${ user.home } /.maven/repository" >
18+ </property >
19+ <property name =" classesdir" value =" ${ basedir } /target/classes" >
20+ </property >
21+ <property name =" testclassesdir" value =" ${ basedir } /target/test-classes" >
22+ </property >
23+ <property name =" testreportdir" value =" ${ basedir } /target/test-reports" >
24+ </property >
25+ <property name =" distdir" value =" ${ basedir } /dist" >
26+ </property >
27+ <property name =" javadocdir" value =" ${ basedir } /dist/docs/api" >
28+ </property >
29+ <property name =" final.name" value =" commons-csv-0.1-dev" >
30+ </property >
31+ <property name =" proxy.host" value =" " >
32+ </property >
33+ <property name =" proxy.port" value =" " >
34+ </property >
35+ <property name =" proxy.username" value =" " >
36+ </property >
37+ <property name =" proxy.password" value =" " >
38+ </property >
39+ <path id =" build.classpath" >
40+ <pathelement location =" ${ libdir } /junit/jars/junit-3.8.1.jar" >
41+ </pathelement >
42+ </path >
43+ <target name =" init" description =" o Initializes some properties" >
44+ <mkdir dir =" ${ libdir } " >
45+ </mkdir >
46+ <condition property =" noget" >
47+ <equals arg2=" only" arg1=" ${ build.sysclasspath } " >
48+ </equals >
49+ </condition >
50+ <!-- Test if JUNIT is present in ANT classpath-->
51+
52+ <available property =" Junit.present" classname =" junit.framework.Test" >
53+ </available >
54+ <!-- Test if user defined a proxy-->
55+
56+ <condition property =" useProxy" >
57+ <and >
58+ <isset property =" proxy.host" >
59+ </isset >
60+ <not >
61+ <equals trim =" true" arg2=" " arg1=" ${ proxy.host } " >
62+ </equals >
63+ </not >
64+ </and >
65+ </condition >
66+ </target >
67+ <target name =" compile" description =" o Compile the code" depends =" get-deps" >
68+ <mkdir dir =" ${ classesdir } " >
69+ </mkdir >
70+ <javac destdir =" ${ classesdir } " deprecation =" true" debug =" true" optimize =" false" excludes =" **/package.html" >
71+ <src >
72+ <pathelement location =" ${ basedir } /src/java" >
73+ </pathelement >
74+ </src >
75+ <classpath refid =" build.classpath" >
76+ </classpath >
77+ </javac >
78+ </target >
79+ <target name =" jar" description =" o Create the jar" depends =" compile,test" >
80+ <jar jarfile =" ${ defaulttargetdir } /${ final.name } .jar" excludes =" **/package.html" basedir =" ${ classesdir } " >
81+ </jar >
82+ </target >
83+ <target name =" clean" description =" o Clean up the generated directories" >
84+ <delete dir =" ${ defaulttargetdir } " >
85+ </delete >
86+ <delete dir =" ${ distdir } " >
87+ </delete >
88+ </target >
89+ <target name =" dist" description =" o Create a distribution" depends =" jar, javadoc" >
90+ <mkdir dir =" dist" >
91+ </mkdir >
92+ <copy todir =" dist" >
93+ <fileset dir =" ${ defaulttargetdir } " includes =" *.jar" >
94+ </fileset >
95+ <fileset dir =" ${ basedir } " includes =" LICENSE*, README*" >
96+ </fileset >
97+ </copy >
98+ </target >
99+ <target name =" test" description =" o Run the test cases" if =" test.failure" depends =" internal-test" >
100+ <fail message =" There were test failures." >
101+ </fail >
102+ </target >
103+ <target name =" internal-test" if =" Junit.present" depends =" junit-present,compile-tests" >
104+ <mkdir dir =" ${ testreportdir } " >
105+ </mkdir >
106+ <junit dir =" ${ basedir } " failureproperty =" test.failure" printSummary =" yes" fork =" true" haltonerror =" true" >
107+ <sysproperty key =" basedir" value =" ." >
108+ </sysproperty >
109+ <formatter type =" xml" >
110+ </formatter >
111+ <formatter usefile =" false" type =" plain" >
112+ </formatter >
113+ <classpath >
114+ <path refid =" build.classpath" >
115+ </path >
116+ <pathelement path =" ${ testclassesdir } " >
117+ </pathelement >
118+ <pathelement path =" ${ classesdir } " >
119+ </pathelement >
120+ </classpath >
121+ <batchtest todir =" ${ testreportdir } " >
122+ <fileset dir =" ${ basedir } /src/test" >
123+ <include name =" **/*Test*" >
124+ </include >
125+ </fileset >
126+ </batchtest >
127+ </junit >
128+ </target >
129+ <target name =" junit-present" unless =" Junit.present" depends =" init" >
130+ <echo >================================= WARNING ================================</echo >
131+ <echo >Junit isn't present in your ${ ANT_HOME } /lib directory. Tests not executed.</echo >
132+ <echo >==========================================================================</echo >
133+ </target >
134+ <target name =" compile-tests" if =" Junit.present" depends =" junit-present,compile" >
135+ <mkdir dir =" ${ testclassesdir } " >
136+ </mkdir >
137+ <javac destdir =" ${ testclassesdir } " deprecation =" true" debug =" true" optimize =" false" excludes =" **/package.html" >
138+ <src >
139+ <pathelement location =" ${ basedir } /src/test" >
140+ </pathelement >
141+ </src >
142+ <classpath >
143+ <path refid =" build.classpath" >
144+ </path >
145+ <pathelement path =" ${ classesdir } " >
146+ </pathelement >
147+ </classpath >
148+ </javac >
149+ </target >
150+ <target name =" javadoc" description =" o Generate javadoc" depends =" get-deps" >
151+ <mkdir dir =" ${ javadocdir } " >
152+ </mkdir >
153+ <tstamp >
154+ <format pattern =" 2005-yyyy" property =" year" >
155+ </format >
156+ </tstamp >
157+ <property name =" copyright" value =" Copyright &copy; . All Rights Reserved." >
158+ </property >
159+ <property name =" title" value =" Commons CSV 0.1-dev API" >
160+ </property >
161+ <javadoc use =" true" private =" true" destdir =" ${ javadocdir } " author =" true" version =" true" sourcepath =" ${ basedir } /src/java" packagenames =" .*" >
162+ <classpath >
163+ <path refid =" build.classpath" >
164+ </path >
165+ </classpath >
166+ </javadoc >
167+ </target >
168+ <target name =" get-dep-junit.jar" description =" o Download the dependency : junit.jar" unless =" junit.jar" depends =" init,setProxy,noProxy,get-custom-dep-junit.jar" >
169+ <mkdir dir =" ${ libdir } /junit/jars/" >
170+ </mkdir >
171+ <get dest =" ${ libdir } /junit/jars/junit-3.8.1.jar" usetimestamp =" true" ignoreerrors =" true" src =" http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar" >
172+ </get >
173+ </target >
174+ <target name =" get-custom-dep-junit.jar" if =" junit.jar" depends =" init,setProxy,noProxy" >
175+ <mkdir dir =" ${ libdir } /junit/jars/" >
176+ </mkdir >
177+ <get dest =" ${ libdir } /junit/jars/junit-3.8.1.jar" usetimestamp =" true" ignoreerrors =" true" src =" ${ junit.jar } " >
178+ </get >
179+ </target >
180+ <target name =" get-deps" unless =" noget" depends =" get-dep-junit.jar" >
181+ </target >
182+ <target name =" setProxy" if =" useProxy" depends =" init" >
183+ <!-- Proxy settings works only with a JDK 1.2 and higher.-->
184+
185+ <echo >Proxy used :</echo >
186+ <echo >Proxy host [${ proxy.host } ]</echo >
187+ <echo >Proxy port [${ proxy.port } ]</echo >
188+ <echo >Proxy user [${ proxy.username } ]</echo >
189+ <setproxy proxyuser =" ${ proxy.username } " proxyport =" ${ proxy.port } " proxypassword =" ${ proxy.password } " proxyhost =" ${ proxy.host } " >
190+ </setproxy >
191+ </target >
192+ <target name =" noProxy" unless =" useProxy" depends =" init" >
193+ <echo >Proxy not used.</echo >
194+ </target >
195+ <target name =" install-maven" >
196+ <get dest =" ${ user.home } /maven-install-latest.jar" usetimestamp =" true" src =" ${ repo } /maven/maven-install-latest.jar" >
197+ </get >
198+ <unjar dest =" ${ maven.home } " src =" ${ user.home } /maven-install-latest.jar" >
199+ </unjar >
200+ </target >
201+ </project >
0 commit comments