Project

General

Profile

« Previous | Next » 

Revision 1049

Added by Jing Tao over 22 years ago

Revise junit testing part and make it working.
Delete the variables for httpclient.jar and junit.jar

View differences:

build.xml
44 44
   <target name="postgresql">
45 45
     <!-- Customize these properties if you are using postgres -->
46 46
     <property name="jdbc-connect" 
47
               value="jdbc:postgresql://localhost/exp"/>
47
               value="jdbc:postgresql://localhost/song"/>
48 48
     <property name="dbDriver" value="org.postgresql.Driver"/>
49 49
     <property name="dbAdapter" 
50 50
               value="edu.ucsb.nceas.dbadapter.PostgresqlAdapter"/>
......
58 58
      <!-- Customize these properties for your system -->
59 59
      <property name="tomcat" value="/home/tao/tomcat" />
60 60
      <property name="webapps" value="/home/tao/tomcat/webapps" />
61
      <property name="context" value="tao" />
61
      <property name="context" value="song" />
62 62
      <property name="user" value="tao"/>
63 63
      <property name="password" value="your-pw-goes-here"/>
64 64
      <property name="server" value="epsilon.nceas.ucsb.edu:8443"/>
65 65
      <property name="systemidserver" value="http://epsilon.nceas.ucsb.edu:8080" />
66 66
      <property name="datadir" value="data" />
67 67
      <property name="replication" value="on" />
68
      <property name="replicationdata" value="off" />
68
      <property name="replicationdata" value="on" />
69 69
      <property name="web-base-url" 
70 70
                value="http://knb.ecoinformatics.org"/>
71 71
      <property name="default-style" value="knb" />
......
86 86
                value="lib/xalan/xalan.jar" />
87 87
      <property name="apis"
88 88
                value="lib/xalan/xml-apis.jar" />
89
      <property name="junit"
90
		value="lib/junit.jar" />
91
      <property name="httpclient"
92
		value="lib/httpclient.jar" />
93 89
   </target>
94 90

  
95 91
   <target name="init" depends="config">
......
114 110
                value=":ext:tao@cvs.ecoinformatics.org:/cvs" />
115 111

  
116 112
      <property name="cpath" 
117
                value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${srb}:${cos}:${morpho}:${junit}:${httpclient}"/>
113
                value="${xmlp}:${xalan}:${apis}:${jdbc}:${jsdk}:${srb}:${cos}:${morpho}"/>
118 114

  
119 115
      <filter token="docrooturl" value="./" />
120 116
      <filter token="jdbc-connect" value="${jdbc-connect}"/>
......
276 272
   <target name="test" depends="install">
277 273
      <!-- copy and compile the tests into a jar file -->
278 274
      <mkdir dir="${build.junittests}"/>
279
      <copy todir="${build.junittests}" filtering="yes">
280
        <fileset dir="${junittestsdir}">
281
          <exclude name="**/CVS*"/>
282
          <exclude name="**/.#*"/>
283
        </fileset>
284
      </copy>
285
      <javac srcdir="${build.junittests}"
286
             destdir="${build.dest}"
287
             classpath="${cpath}" />
275
      <javac srcdir="${junittestsdir}"
276
             destdir="${build.junittests}"
277
             classpath="${cpath}:${build.dir}/${name}.jar"
278
	     includes="**/*.java" />
288 279

  
289
      <jar jarfile="${build.dir}/${name}-junittests.jar" basedir="${build.dest}"
290
           includes="${package.home}/${name}junittests/**" />
280
      <jar jarfile="${build.dir}/${name}-junittests.jar" 
281
		    basedir="${build.junittests}"
282
          	    includes="**/*.class" />
291 283

  
292 284
      <!-- use the ant "junit" task to run JUnit tests. -->
293 285
      <junit printsummary="yes" haltonfailure="no" fork="no"
294 286
             haltonerror="no">
295 287
        <classpath>
296
          <pathelement path="${cpath}:${build.dir}/${name}-junittests.jar" />
288
          <pathelement path="${cpath}:${build.dir}/${name}.jar:${build.dir}/${name}-junittests.jar" />
297 289
        </classpath>
298 290

  
299 291
        <formatter type="plain" />
300 292

  
301 293
        <batchtest fork="yes" todir="${build.dir}">
302
          <fileset dir="${build.junittests}">
294
          <fileset dir="${junittestsdir}">
303 295
            <include name="**/*.java" />
304 296
          </fileset>
305 297
        </batchtest>

Also available in: Unified diff