| 1 | <?xml version="1.0"?> |
|---|
| 2 | |
|---|
| 3 | <project name="build-test"> |
|---|
| 4 | |
|---|
| 5 | <property name="initialcontext.factory.bea" |
|---|
| 6 | value="weblogic.jndi.WLInitialContextFactory"/> |
|---|
| 7 | |
|---|
| 8 | <target name="check-database-settings"/> |
|---|
| 9 | <target name="bea-set-properties"/> |
|---|
| 10 | |
|---|
| 11 | <path id="test.classpath"> |
|---|
| 12 | <pathelement path="${build.dir}/classes"/> |
|---|
| 13 | <path refid="default.classpath"/> |
|---|
| 14 | </path> |
|---|
| 15 | |
|---|
| 16 | <path id="test.runtime.classpath"> |
|---|
| 17 | <pathelement path="${build.dir}/instrumented-classes/classes"/> |
|---|
| 18 | <pathelement path="${build.dir}/test-classes"/> |
|---|
| 19 | <path refid="test.classpath"/> |
|---|
| 20 | </path> |
|---|
| 21 | |
|---|
| 22 | <!-- =================================================================== --> |
|---|
| 23 | <!-- TEST SECTION --> |
|---|
| 24 | <!-- =================================================================== --> |
|---|
| 25 | <!-- =================================================================== --> |
|---|
| 26 | <!-- run Xdoclet for all Beans --> |
|---|
| 27 | <!-- =================================================================== --> |
|---|
| 28 | <target name="test-ejbdoclet" |
|---|
| 29 | depends="prepare, test-ejbdoclet-uptodatecheck, test-ejbdoclet-nodeps"/> |
|---|
| 30 | <target name="test-ejbdoclet-uptodatecheck"> |
|---|
| 31 | <uptodate property="test-ejbdoclet.uptodate" |
|---|
| 32 | targetfile="${build.dir}/test-deploymentdescriptors/ejb-jar.xml" > |
|---|
| 33 | <srcfiles dir="${base.dir}/test/java"> |
|---|
| 34 | <include name="**/*Bean.java" /> |
|---|
| 35 | <exclude name="**/*MBean.java" /> |
|---|
| 36 | </srcfiles> |
|---|
| 37 | <srcfiles dir="${build.dir}/gen-test"> |
|---|
| 38 | <include name="**/*Bean.java" /> |
|---|
| 39 | <exclude name="**/*MBean.java" /> |
|---|
| 40 | </srcfiles> |
|---|
| 41 | </uptodate> |
|---|
| 42 | </target> |
|---|
| 43 | <target name="test-ejbdoclet-nodeps" unless="test-ejbdoclet.uptodate"> |
|---|
| 44 | <xdoclet-ejb |
|---|
| 45 | destdir="${build.dir}/gen-test" |
|---|
| 46 | dd-dir="${build.dir}/test-deploymentdescriptors"> |
|---|
| 47 | <sources> |
|---|
| 48 | <fileset dir="${base.dir}/test/java"> |
|---|
| 49 | <include name="**/*Bean.java" /> |
|---|
| 50 | <exclude name="**/*MBean.java" /> |
|---|
| 51 | </fileset> |
|---|
| 52 | <!--fileset dir="${build.dir}/gen-test"> |
|---|
| 53 | <include name="**/*Bean.java" /> |
|---|
| 54 | <exclude name="**/*MBean.java" /> |
|---|
| 55 | </fileset--> |
|---|
| 56 | </sources> |
|---|
| 57 | </xdoclet-ejb> |
|---|
| 58 | </target> |
|---|
| 59 | |
|---|
| 60 | <!-- =================================================================== --> |
|---|
| 61 | <!-- run Xdoclet/Web for production Servlets --> |
|---|
| 62 | <!-- =================================================================== --> |
|---|
| 63 | <target name="test-webdoclet" |
|---|
| 64 | depends="test-ejbdoclet, test-webdoclet-uptodatecheck, |
|---|
| 65 | test-webdoclet-nodeps"/> |
|---|
| 66 | <target name="test-webdoclet-uptodatecheck"> |
|---|
| 67 | <uptodate property="test-webdoclet.uptodate" |
|---|
| 68 | targetfile="${build.dir}/test-deploymentdescriptors/web.xml" > |
|---|
| 69 | <srcfiles dir="${base.dir}/test/java"> |
|---|
| 70 | <include name="**/*Servlet.java" /> |
|---|
| 71 | </srcfiles> |
|---|
| 72 | </uptodate> |
|---|
| 73 | </target> |
|---|
| 74 | <target name="test-webdoclet-nodeps" unless="test-webdoclet.uptodate"> |
|---|
| 75 | <taskdef name="webdoclet" |
|---|
| 76 | classname="xdoclet.modules.web.WebDocletTask"> |
|---|
| 77 | <classpath refid="default.classpath"/> |
|---|
| 78 | </taskdef> |
|---|
| 79 | <webdoclet destdir="${build.dir}" verbose="true"> |
|---|
| 80 | <fileset dir="${base.dir}/test/java"> |
|---|
| 81 | <include name="**/*Servlet.java" /> |
|---|
| 82 | </fileset> |
|---|
| 83 | <deploymentdescriptor |
|---|
| 84 | destdir="${build.dir}/test-deploymentdescriptors" |
|---|
| 85 | validatexml="true" |
|---|
| 86 | mergedir="${base.dir}/src/xml/xdoclet" /> |
|---|
| 87 | </webdoclet> |
|---|
| 88 | </target> |
|---|
| 89 | |
|---|
| 90 | <target name="test-compile" |
|---|
| 91 | depends="build, gen-test-classes, test-webdoclet, test-compile-nodeps" |
|---|
| 92 | description="Compile JUnit tests"></target> |
|---|
| 93 | <target name="test-compile-nodeps"> |
|---|
| 94 | <mkdir dir="${build.dir}/test-classes"/> |
|---|
| 95 | <javac destdir="${build.dir}/test-classes" |
|---|
| 96 | deprecation="${build.debug}" |
|---|
| 97 | debug="true" |
|---|
| 98 | source="1.4"> |
|---|
| 99 | <src path="${base.dir}/test/java"/> |
|---|
| 100 | <src path="${build.dir}/gen-test"/> |
|---|
| 101 | <classpath> |
|---|
| 102 | <pathelement path="${build.dir}/classes"/> |
|---|
| 103 | <pathelement path="${build.dir}/test-classes"/> |
|---|
| 104 | <path refid="test.classpath"/> |
|---|
| 105 | </classpath> |
|---|
| 106 | </javac> |
|---|
| 107 | </target> |
|---|
| 108 | |
|---|
| 109 | <target name="instrument" depends="test-compile, instrument-nodeps" |
|---|
| 110 | description="Add jcoverage instrumentation"></target> |
|---|
| 111 | <target name="instrument-nodeps" if="build.coverage"> |
|---|
| 112 | <path id="emma.lib"> |
|---|
| 113 | <pathelement location="${base.dir}/lib/default/emma/emma.jar"/> |
|---|
| 114 | <pathelement location="${base.dir}/lib/default/emma_ant/emma_ant.jar"/> |
|---|
| 115 | </path> |
|---|
| 116 | <taskdef resource="emma_ant.properties" classpathref="emma.lib"/> |
|---|
| 117 | <emma> |
|---|
| 118 | <instr destdir="${build.dir}/instrumented-classes" |
|---|
| 119 | metadatafile="${build.dir}/metadata.em" |
|---|
| 120 | merge="true" mode="fullcopy"> |
|---|
| 121 | <instrpath> |
|---|
| 122 | <path location="${build.dir}/classes"/> |
|---|
| 123 | <path location="${build.dir}/test-classes"/> |
|---|
| 124 | </instrpath> |
|---|
| 125 | </instr> |
|---|
| 126 | </emma> |
|---|
| 127 | |
|---|
| 128 | |
|---|
| 129 | <!-- Switch back after cobertura 1.9.1 is available |
|---|
| 130 | <taskdef resource="tasks.properties" |
|---|
| 131 | classpathref="default.classpath"/> |
|---|
| 132 | <mkdir dir="${build.dir}/instrumented-classes" /> |
|---|
| 133 | <cobertura-instrument todir="${build.dir}/instrumented-classes"> |
|---|
| 134 | <ignore regex="org.apache.log4j.*"/> |
|---|
| 135 | <fileset dir="${build.dir}"> |
|---|
| 136 | <include name="classes/**/*.class"/> |
|---|
| 137 | <exclude name="classes/**/jaxb/**/*.class"/> |
|---|
| 138 | <include name="test-classes/**/*.class"/> |
|---|
| 139 | <exclude name="test-classes/**/jaxb/**/*.class"/> |
|---|
| 140 | <exclude name="test-classes/**/org/jcoderz/commons/LogFormatterOutputTest.class"/> |
|---|
| 141 | </fileset> |
|---|
| 142 | </cobertura-instrument> |
|---|
| 143 | <move file="${base.dir}/cobertura.ser" |
|---|
| 144 | tofile="${build.dir}/instrumented-classes/cobertura.ser"/> |
|---|
| 145 | --> |
|---|
| 146 | </target> |
|---|
| 147 | |
|---|
| 148 | <!-- insert test data into database --> |
|---|
| 149 | <target name="test-insert-data" |
|---|
| 150 | depends="check-database-settings, test-insert-data-sql"/> |
|---|
| 151 | <target name="test-insert-data-sql"> |
|---|
| 152 | <sql driver="oracle.jdbc.driver.OracleDriver" |
|---|
| 153 | autocommit="true" |
|---|
| 154 | onError="continue" |
|---|
| 155 | url="${db.url}" |
|---|
| 156 | password="${db.passwd}" |
|---|
| 157 | userid="${db.user}" |
|---|
| 158 | encoding="UTF-8"> |
|---|
| 159 | <classpath> |
|---|
| 160 | <pathelement location="${oracleclient.jar}" /> |
|---|
| 161 | </classpath> |
|---|
| 162 | <fileset dir="${base.dir}/test/sql"> |
|---|
| 163 | <include name="*_insert_data.sql" /> |
|---|
| 164 | </fileset> |
|---|
| 165 | <fileset dir="${build.dir}/gen-sql"> |
|---|
| 166 | <include name="*_insert_data.sql" /> |
|---|
| 167 | </fileset> |
|---|
| 168 | </sql> |
|---|
| 169 | </target> |
|---|
| 170 | |
|---|
| 171 | <target name="test" depends="test-local, test-server" |
|---|
| 172 | description="Run all JUnit test suites"/> |
|---|
| 173 | <target name="test-nodeps" depends="test-local-nodeps"/> |
|---|
| 174 | <target name="test-local" |
|---|
| 175 | depends="test-compile, instrument, test-local-nodeps" |
|---|
| 176 | description="Run all local JUnit test suites"/> |
|---|
| 177 | <target name="test-local-nodeps" if="junit.present"> |
|---|
| 178 | <mkdir dir="${build.dir}/report/junit"/> |
|---|
| 179 | <junit printsummary="yes" haltonfailure="no" |
|---|
| 180 | dir="${base.dir}/build" fork="true" timeout="60000" |
|---|
| 181 | forkmode="perBatch"> <!-- should be forkmode="perBatch" after timeout fix --> |
|---|
| 182 | <classpath refid="test.runtime.classpath"/> |
|---|
| 183 | <sysproperty key="basedir" value="${base.dir}"/> |
|---|
| 184 | <sysproperty key="java.util.logging.config.file" |
|---|
| 185 | value="${base.dir}/src/etc/fawkez-logging.properties"/> |
|---|
| 186 | <sysproperty key="org.xml.sax.driver" |
|---|
| 187 | value="org.apache.xerces.parsers.SAXParser"/> |
|---|
| 188 | <!-- value="org.apache.crimson.parser.XMLReaderImpl"/ --> |
|---|
| 189 | <formatter type="brief" usefile="true"/> |
|---|
| 190 | <formatter type="xml" usefile="true"/> |
|---|
| 191 | <batchtest todir="${build.dir}/report/junit"> |
|---|
| 192 | <fileset dir="${base.dir}/test/java"> |
|---|
| 193 | <include name="**/*Test.java"/> |
|---|
| 194 | <exclude name="**/HttpClientConnectionTest.java"/> |
|---|
| 195 | <exclude name="**/*ServerTest.java"/> |
|---|
| 196 | <exclude name="**/*BeanTest.java"/> |
|---|
| 197 | </fileset> |
|---|
| 198 | <fileset dir="${build.dir}/gen-test"> |
|---|
| 199 | <include name="**/*Test.java"/> |
|---|
| 200 | <exclude name="**/*ServerTest.java"/> |
|---|
| 201 | <exclude name="**/*BeanTest.java"/> |
|---|
| 202 | </fileset> |
|---|
| 203 | </batchtest> |
|---|
| 204 | <batchtest todir="${build.dir}/report/junit"> |
|---|
| 205 | <fileset dir="${base.dir}/test/java"> |
|---|
| 206 | <include name="**/HttpClientConnectionTest.java"/> |
|---|
| 207 | </fileset> |
|---|
| 208 | </batchtest> |
|---|
| 209 | </junit> |
|---|
| 210 | </target> |
|---|
| 211 | <target name="test-single-local" |
|---|
| 212 | depends="test-compile, instrument, test-single-local-nodeps" |
|---|
| 213 | description="Run a single JUnit test suite"/> |
|---|
| 214 | <target name="test-single-local-nodeps" if="testcase"> |
|---|
| 215 | <mkdir dir="${build.dir}/report/junit"/> |
|---|
| 216 | <junit printsummary="yes" haltonfailure="no" |
|---|
| 217 | dir="${base.dir}/build" fork="true" timeout="60000" |
|---|
| 218 | showoutput="true"> |
|---|
| 219 | <classpath refid="test.runtime.classpath"/> |
|---|
| 220 | <sysproperty key="methods" value="${methods}"/> |
|---|
| 221 | <sysproperty key="basedir" value="${base.dir}"/> |
|---|
| 222 | <sysproperty key="java.util.logging.config.file" |
|---|
| 223 | file="${base.dir}/src/etc/fawkez-logging.properties"/> |
|---|
| 224 | <sysproperty key="org.xml.sax.driver" |
|---|
| 225 | value="org.apache.xerces.parsers.SAXParser"/> |
|---|
| 226 | <!--value="org.apache.crimson.parser.XMLReaderImpl"/--> |
|---|
| 227 | <formatter type="plain" usefile="false"/> |
|---|
| 228 | <test name="${testcase}"/> |
|---|
| 229 | </junit> |
|---|
| 230 | </target> |
|---|
| 231 | |
|---|
| 232 | <!-- SERVER TESTS --> |
|---|
| 233 | <target name="test-server" |
|---|
| 234 | depends="test-compile, instrument, check-database-settings, test-insert-data, test-server-nodeps" |
|---|
| 235 | description="Run all server JUnit test suites (w/ running server)"/> |
|---|
| 236 | <target name="test-server-nodeps" |
|---|
| 237 | depends="check-database-settings, bea-set-properties" |
|---|
| 238 | if="junit.present"> |
|---|
| 239 | <mkdir dir="${build.dir}/report/junit"/> |
|---|
| 240 | <junit printsummary="yes" haltonfailure="no" |
|---|
| 241 | dir="${base.dir}" fork="true" timeout="1200000" |
|---|
| 242 | forkmode="perBatch"> |
|---|
| 243 | <classpath refid="test.runtime.classpath"/> |
|---|
| 244 | <sysproperty key="basedir" value="${base.dir}"/> |
|---|
| 245 | <sysproperty key="java.util.logging.config.file" |
|---|
| 246 | value="${base.dir}/src/etc/fawkez-logging.properties"/> |
|---|
| 247 | <sysproperty key="java.naming.factory.initial" |
|---|
| 248 | value="${initialcontext.factory.bea}"/> |
|---|
| 249 | <sysproperty key="java.naming.provider.url" value="${bea.url}"/> |
|---|
| 250 | <sysproperty key="DB_HOST" value="${db.host}"/> |
|---|
| 251 | <sysproperty key="DB_DOMAIN" value="${db.domain}"/> |
|---|
| 252 | <sysproperty key="DB_PORT" value="${db.port}"/> |
|---|
| 253 | <sysproperty key="DB_USER" value="${db.user}"/> |
|---|
| 254 | <sysproperty key="DB_PASSWD" value="${db.passwd}"/> |
|---|
| 255 | <sysproperty key="DB_SID" value="${db.sid}"/> |
|---|
| 256 | <sysproperty key="DB_URL_THICK" value="jdbc:oracle:oci8:@${db.connect_string}"/> |
|---|
| 257 | <sysproperty key="SRV_HOSTNAME" value="${env.SRV_HOSTNAME}"/> |
|---|
| 258 | <sysproperty key="SRV_HTTP_PORT" value="${env.SRV_HTTP_PORT}"/> |
|---|
| 259 | <sysproperty key="java.security.auth.login.config" |
|---|
| 260 | value="jar:file:${build.dir}/fawkez.jar!/app_jaas.config"/> |
|---|
| 261 | <formatter type="brief" usefile="true"/> |
|---|
| 262 | <formatter type="xml" usefile="true"/> |
|---|
| 263 | <batchtest todir="${build.dir}/report/junit"> |
|---|
| 264 | <fileset dir="${base.dir}/test/java"> |
|---|
| 265 | <include name="**/*ServerTest.java"/> |
|---|
| 266 | <include name="**/*BeanTest.java"/> |
|---|
| 267 | </fileset> |
|---|
| 268 | </batchtest> |
|---|
| 269 | <batchtest todir="${build.dir}/report/junit"> |
|---|
| 270 | <fileset dir="${base.dir}/build/gen-test"> |
|---|
| 271 | <include name="**/*ServerTest.java"/> |
|---|
| 272 | <include name="**/*BeanTest.java"/> |
|---|
| 273 | </fileset> |
|---|
| 274 | </batchtest> |
|---|
| 275 | <batchtest todir="${build.dir}/report/junit"> |
|---|
| 276 | <fileset dir="${base.dir}/test/java"> |
|---|
| 277 | </fileset> |
|---|
| 278 | </batchtest> |
|---|
| 279 | </junit> |
|---|
| 280 | <echo message="Find detailed junit results at ${build.dir}/report/junit." |
|---|
| 281 | level="info"/> |
|---|
| 282 | </target> |
|---|
| 283 | |
|---|
| 284 | <!-- SINGLE SERVER TESTS --> |
|---|
| 285 | <target name="test-single-server" |
|---|
| 286 | depends="test-testcase-property-set, test-compile, instrument, test-single-server-nodeps" |
|---|
| 287 | description="Run all single server JUnit test (w/ running server)"/> |
|---|
| 288 | <target name="test-testcase-property-set" unless="testcase"> |
|---|
| 289 | <fail message="missing testcase property"> |
|---|
| 290 | +-----------------------------------------------------------------+ |
|---|
| 291 | ! You must set the property 'testcase' for the requested target. ! |
|---|
| 292 | ! ! |
|---|
| 293 | ! For example: ! |
|---|
| 294 | ! $ ant -Dtestcase=package.FooTest test-single-local | |
|---|
| 295 | ! or ! |
|---|
| 296 | ! $ ant -Dtestcase=package.FooServerTest test-single-server | |
|---|
| 297 | ! or ! |
|---|
| 298 | ! $ ant -Dtestcase=package.FooBeanTest test-single-server ! |
|---|
| 299 | +-----------------------------------------------------------------+ |
|---|
| 300 | </fail> |
|---|
| 301 | </target> |
|---|
| 302 | <target name="test-single-server-nodeps" |
|---|
| 303 | depends="bea-set-properties" if="testcase, junit.present"> |
|---|
| 304 | <junit printsummary="yes" haltonfailure="yes" |
|---|
| 305 | dir="${base.dir}" fork="true" timeout="1200000"> |
|---|
| 306 | <classpath refid="test.runtime.classpath"/> |
|---|
| 307 | <sysproperty key="basedir" value="${base.dir}"/> |
|---|
| 308 | <sysproperty key="java.naming.factory.initial" |
|---|
| 309 | value="${initialcontext.factory.bea}"/> |
|---|
| 310 | <sysproperty key="java.naming.provider.url" value="${bea.url}"/> |
|---|
| 311 | <sysproperty key="DB_HOST" value="${db.host}"/> |
|---|
| 312 | <sysproperty key="DB_DOMAIN" value="${db.domain}"/> |
|---|
| 313 | <sysproperty key="DB_PORT" value="${db.port}"/> |
|---|
| 314 | <sysproperty key="DB_USER" value="${db.user}"/> |
|---|
| 315 | <sysproperty key="DB_PASSWD" value="${db.passwd}"/> |
|---|
| 316 | <sysproperty key="DB_SID" value="${db.sid}"/> |
|---|
| 317 | <sysproperty key="DB_URL_THICK" value="jdbc:oracle:oci8:@${db.connect_string}"/> |
|---|
| 318 | <sysproperty key="methods" value="${methods}"/> |
|---|
| 319 | <formatter type="plain" usefile="false"/> |
|---|
| 320 | <test name="${testcase}"/> |
|---|
| 321 | </junit> |
|---|
| 322 | </target> |
|---|
| 323 | |
|---|
| 324 | <!-- PUBLIC: JUnit HTML report --> |
|---|
| 325 | <target name="test-report" depends="test, test-report-nodeps"/> |
|---|
| 326 | <target name="test-report-nodeps"> |
|---|
| 327 | <mkdir dir="${build.dir}/doc/junit"/> |
|---|
| 328 | <junitreport todir="${build.dir}/report/junit"> |
|---|
| 329 | <fileset dir="${build.dir}/report/junit"> |
|---|
| 330 | <include name="TEST-*.xml"/> |
|---|
| 331 | </fileset> |
|---|
| 332 | <report format="frames" |
|---|
| 333 | styledir="${base.dir}/config" |
|---|
| 334 | todir="${build.dir}/doc/junit"/> |
|---|
| 335 | </junitreport> |
|---|
| 336 | <!-- Remove properties from the report xml --> |
|---|
| 337 | <xslt basedir="${base.dir}" |
|---|
| 338 | in="${build.dir}/report/junit/TESTS-TestSuites.xml" |
|---|
| 339 | out="${build.dir}/report/junit/TESTS-TestSuites.xml.tmp" |
|---|
| 340 | style="${base.dir}/config/filter-test-properties.xsl"></xslt> |
|---|
| 341 | <move file="${build.dir}/report/junit/TESTS-TestSuites.xml.tmp" |
|---|
| 342 | toFile="${build.dir}/report/junit/TESTS-TestSuites.xml"/> |
|---|
| 343 | <echo level="info" |
|---|
| 344 | message="JUnit Report available at ${build.dir}/doc/junit"/> |
|---|
| 345 | </target> |
|---|
| 346 | |
|---|
| 347 | <target name="gen-test-classes"> |
|---|
| 348 | <taskdef name="simple-type-generator" |
|---|
| 349 | classname="org.jcoderz.commons.taskdefs.SimpleTypeGenerator"> |
|---|
| 350 | <classpath> |
|---|
| 351 | <pathelement location="${build.dir}/classes"/> |
|---|
| 352 | <path refid="default.classpath"/> |
|---|
| 353 | </classpath> |
|---|
| 354 | </taskdef> |
|---|
| 355 | <simple-type-generator in="${base.dir}/test/xml/simple-types.xml" |
|---|
| 356 | out="${build.dir}/simple-types.log" |
|---|
| 357 | destDir="${build.dir}/gen-test" |
|---|
| 358 | failonerror="true" |
|---|
| 359 | force="true"/> |
|---|
| 360 | <simple-type-generator in="${base.dir}/test/xml/simple-types.xml" |
|---|
| 361 | out="${build.dir}/simple-types.log" |
|---|
| 362 | destDir="${build.dir}/gen-test" |
|---|
| 363 | failonerror="true" |
|---|
| 364 | force="true"/> |
|---|
| 365 | <taskdef name="log-message-generator" |
|---|
| 366 | classname="org.jcoderz.commons.taskdefs.LogMessageGenerator"> |
|---|
| 367 | <classpath> |
|---|
| 368 | <pathelement location="${build.dir}/classes"/> |
|---|
| 369 | <path refid="default.classpath"/> |
|---|
| 370 | </classpath> |
|---|
| 371 | </taskdef> |
|---|
| 372 | <log-message-generator |
|---|
| 373 | in="${base.dir}/test/xml/app-info-test.xml" |
|---|
| 374 | out="${build.dir}/app-info-test-log-message-info.out" |
|---|
| 375 | destDir="${build.dir}/gen-test" |
|---|
| 376 | application="TCS" |
|---|
| 377 | failonerror="true" |
|---|
| 378 | force="true"/> |
|---|
| 379 | </target> |
|---|
| 380 | |
|---|
| 381 | |
|---|
| 382 | <!-- Tests the execution of some ant tasks provided by this project --> |
|---|
| 383 | <target name="test-ant-tasks"> |
|---|
| 384 | <taskdef name="log-message-generator" |
|---|
| 385 | classname="org.jcoderz.commons.taskdefs.LogMessageGenerator"> |
|---|
| 386 | <classpath> |
|---|
| 387 | <pathelement location="${build.dir}"/> |
|---|
| 388 | </classpath> |
|---|
| 389 | </taskdef> |
|---|
| 390 | <taskdef name="simple-type-generator" |
|---|
| 391 | classname="orz.jcoderz.commons.taskdefs.SimpleTypeGenerator"> |
|---|
| 392 | <classpath> |
|---|
| 393 | <pathelement location="${build.dir}"/> |
|---|
| 394 | </classpath> |
|---|
| 395 | </taskdef> |
|---|
| 396 | <taskdef name="jsf-converter-generator" |
|---|
| 397 | classname="org.jcoderz.commons.taskdefs.JsfConverterGenerator"> |
|---|
| 398 | <classpath> |
|---|
| 399 | <pathelement location="${build.dir}"/> |
|---|
| 400 | </classpath> |
|---|
| 401 | </taskdef> |
|---|
| 402 | <log-message-generator in="${base.dir}/test/xml/log-message-info.xml" |
|---|
| 403 | out="${build.dir}/test-log-message-info.log" |
|---|
| 404 | destDir="${build.dir}/test" |
|---|
| 405 | application="Fawkez" |
|---|
| 406 | failonerror="true" |
|---|
| 407 | force="true"/> |
|---|
| 408 | <simple-type-generator in="${base.dir}/test/xml/simple-types.xml" |
|---|
| 409 | out="${build.dir}/simple-types.log" |
|---|
| 410 | destDir="${build.dir}/test" |
|---|
| 411 | failonerror="true" |
|---|
| 412 | force="true"/> |
|---|
| 413 | <jsf-converter-generator in="${base.dir}/test/xml/jsf-converters.xml" |
|---|
| 414 | out="${build.dir}/jsf-converters.log" |
|---|
| 415 | destDir="${build.dir}/test" |
|---|
| 416 | failonerror="true" |
|---|
| 417 | force="true"/> |
|---|
| 418 | </target> |
|---|
| 419 | |
|---|
| 420 | |
|---|
| 421 | <!-- Test report encoding support --> |
|---|
| 422 | <!-- The ruleset files --> |
|---|
| 423 | <property name="pmd.rules" value="${base.dir}/config/jcoderz-pmd.xml"/> |
|---|
| 424 | <property name="checkstyle.rules" value="${base.dir}/config/jcoderz-checkstyle.xml" /> |
|---|
| 425 | <property name="findbugs.rules" value="${base.dir}/config/jcoderz-findbugs.xml" /> |
|---|
| 426 | <property name="filter.rules" value="${base.dir}/config/jcoderz-report-filter.xsl" /> |
|---|
| 427 | |
|---|
| 428 | |
|---|
| 429 | |
|---|
| 430 | <target name="report-test"> |
|---|
| 431 | <!-- This is the classpath used by the JcReportAntTask --> |
|---|
| 432 | <path id="jcreport.classpath"> |
|---|
| 433 | <pathelement path="${base.dir}/build/classes"/> |
|---|
| 434 | <fileset dir="${base.dir}/lib"> |
|---|
| 435 | <include name="default/jaxb/*.jar"/> |
|---|
| 436 | <include name="default/chart2d/*.jar"/> |
|---|
| 437 | </fileset> |
|---|
| 438 | </path> |
|---|
| 439 | <taskdef name="jcreport" |
|---|
| 440 | classname="org.jcoderz.phoenix.report.JcReportAntTask"> |
|---|
| 441 | <classpath refid="jcreport.classpath" /> |
|---|
| 442 | </taskdef> |
|---|
| 443 | |
|---|
| 444 | <!-- This classpath is used by the checkstyle process --> |
|---|
| 445 | <path id="checkstyle.classpath"> |
|---|
| 446 | <fileset dir="${base.dir}/lib"> |
|---|
| 447 | <include name="default/antlr/*.jar"/> |
|---|
| 448 | <include name="default/checkstyle/*.jar"/> |
|---|
| 449 | <include name="default/commons-beanutils/*.jar"/> |
|---|
| 450 | <include name="default/commons-beanutils-core/*.jar"/> |
|---|
| 451 | <include name="default/commons-cli/*.jar"/> |
|---|
| 452 | <include name="default/commons-logging/*.jar"/> |
|---|
| 453 | </fileset> |
|---|
| 454 | </path> |
|---|
| 455 | <!-- This classpath is used by the pmd and cpd process --> |
|---|
| 456 | <path id="pmd.classpath"> |
|---|
| 457 | <fileset dir="${base.dir}/lib"> |
|---|
| 458 | <include name="default/pmd/*.jar"/> |
|---|
| 459 | <include name="default/asm*/*.jar"/> |
|---|
| 460 | <include name="default/backport-util-concurrent/*.jar"/> |
|---|
| 461 | <include name="default/jaxen/*.jar"/> |
|---|
| 462 | <include name="default/oro/*.jar"/> |
|---|
| 463 | </fileset> |
|---|
| 464 | </path> |
|---|
| 465 | <!-- This classpath is used by the findbugs process --> |
|---|
| 466 | <path id="findbugs.classpath"> |
|---|
| 467 | <fileset dir="${base.dir}/lib"> |
|---|
| 468 | <include name="default/findbugs/*.jar"/> |
|---|
| 469 | <include name="default/asm*/*.jar"/> |
|---|
| 470 | <include name="default/jaxen/*.jar"/> |
|---|
| 471 | <exclude name="**/fb-contrib.jar"/> |
|---|
| 472 | </fileset> |
|---|
| 473 | </path> |
|---|
| 474 | <path id="findbugs.plugins"> |
|---|
| 475 | <path location="${base.dir}/lib/default/fb-contrib/fb-contrib.jar"/> |
|---|
| 476 | </path> |
|---|
| 477 | <!-- This is the auxiliary classpath used by findbugs --> |
|---|
| 478 | <path id="findbugs.aux.classpath"> |
|---|
| 479 | <path location="${base.dir}/build/classes"/> |
|---|
| 480 | <path location="${env.JAVA_HOME}/lib/tools.jar"/> |
|---|
| 481 | <fileset dir="${base.dir}/lib"> |
|---|
| 482 | <include name="default/**/*.jar"/> |
|---|
| 483 | </fileset> |
|---|
| 484 | </path> |
|---|
| 485 | |
|---|
| 486 | <delete dir="${build.dir}/report-test"/> |
|---|
| 487 | <property name="utf8-base.dir" |
|---|
| 488 | location="${build.dir}/report-test/utf8"/> |
|---|
| 489 | <property name="utf8-src.dir" |
|---|
| 490 | location="${base.dir}/test/charset/java-utf8"/> |
|---|
| 491 | <property name="utf8-class.dir" |
|---|
| 492 | location="${utf8-base.dir}/classes"/> |
|---|
| 493 | <mkdir dir="${utf8-class.dir}"/> |
|---|
| 494 | <javac encoding="UTF-8" |
|---|
| 495 | srcdir="${utf8-src.dir}" |
|---|
| 496 | destdir="${utf8-class.dir}"/> |
|---|
| 497 | <jcreport name="fawkez" |
|---|
| 498 | dest="${utf8-base.dir}/doc/findings-report" |
|---|
| 499 | wikibase="http://www.jcoderz.org/fawkez/wiki/jcreport:" |
|---|
| 500 | webrcsbase="http://www.jcoderz.org/fawkez/browser/trunk" |
|---|
| 501 | webrcssuffix="" |
|---|
| 502 | packagebase="org.jcoderz" |
|---|
| 503 | projectbase="${base.dir}" |
|---|
| 504 | tempfolder="${utf8-base.dir}/tmp" |
|---|
| 505 | debug="false" |
|---|
| 506 | encoding="utf-8" |
|---|
| 507 | cpus="0"> <!-- Increase to speed up --> |
|---|
| 508 | <classpath refid="jcreport.classpath"/> |
|---|
| 509 | <reports> |
|---|
| 510 | <report name="fawkez-test" |
|---|
| 511 | level="prod" |
|---|
| 512 | sourcepath="${utf8-src.dir}" |
|---|
| 513 | classpath="${utf8-class.dir}"> |
|---|
| 514 | </report> |
|---|
| 515 | </reports> |
|---|
| 516 | <tools> |
|---|
| 517 | <pmd config="${pmd.rules}" |
|---|
| 518 | targetjdk="1.4"> |
|---|
| 519 | <classpath refid="pmd.classpath"/> |
|---|
| 520 | </pmd> |
|---|
| 521 | <cpd minimumtokens="100"> |
|---|
| 522 | <classpath refid="pmd.classpath"/> |
|---|
| 523 | </cpd> |
|---|
| 524 | <!-- Could not disable UnreadFields cause further dependencies --> |
|---|
| 525 | <findbugs maxheap="256" > |
|---|
| 526 | <classpath refid="findbugs.classpath"/> |
|---|
| 527 | <auxclasspath refid="findbugs.aux.classpath"/> |
|---|
| 528 | <pluginlist refid="findbugs.plugins"/> |
|---|
| 529 | </findbugs> |
|---|
| 530 | <checkstyle config="${checkstyle.rules}"> |
|---|
| 531 | <classpath refid="checkstyle.classpath" /> |
|---|
| 532 | </checkstyle> |
|---|
| 533 | </tools> |
|---|
| 534 | </jcreport> |
|---|
| 535 | |
|---|
| 536 | <property name="cp500-base.dir" |
|---|
| 537 | location="${build.dir}/report-test/cp500"/> |
|---|
| 538 | <property name="cp500-src.dir" |
|---|
| 539 | location="${base.dir}/test/charset/java-cp500"/> |
|---|
| 540 | <property name="cp500-class.dir" |
|---|
| 541 | location="${cp500-base.dir}/classes"/> |
|---|
| 542 | <mkdir dir="${cp500-class.dir}"/> |
|---|
| 543 | <javac encoding="cp500" |
|---|
| 544 | srcdir="${cp500-src.dir}" |
|---|
| 545 | destdir="${cp500-class.dir}"/> |
|---|
| 546 | <jcreport name="fawkez" |
|---|
| 547 | dest="${cp500-base.dir}/doc/findings-report" |
|---|
| 548 | wikibase="http://www.jcoderz.org/fawkez/wiki/jcreport:" |
|---|
| 549 | webrcsbase="http://www.jcoderz.org/fawkez/browser/trunk" |
|---|
| 550 | webrcssuffix="" |
|---|
| 551 | packagebase="org.jcoderz" |
|---|
| 552 | projectbase="${base.dir}" |
|---|
| 553 | tempfolder="${cp500-base.dir}/tmp" |
|---|
| 554 | debug="false" |
|---|
| 555 | encoding="cp500" |
|---|
| 556 | cpus="0"> <!-- Increase to speed up --> |
|---|
| 557 | <classpath refid="jcreport.classpath"/> |
|---|
| 558 | <reports> |
|---|
| 559 | <report name="fawkez-test" |
|---|
| 560 | level="prod" |
|---|
| 561 | sourcepath="${cp500-src.dir}" |
|---|
| 562 | classpath="${cp500-class.dir}"> |
|---|
| 563 | </report> |
|---|
| 564 | </reports> |
|---|
| 565 | <tools> |
|---|
| 566 | <pmd config="${pmd.rules}" targetjdk="1.4"> |
|---|
| 567 | <classpath refid="pmd.classpath"/> |
|---|
| 568 | </pmd> |
|---|
| 569 | <cpd minimumtokens="100"> |
|---|
| 570 | <classpath refid="pmd.classpath"/> |
|---|
| 571 | </cpd> |
|---|
| 572 | <findbugs> |
|---|
| 573 | <classpath refid="findbugs.classpath"/> |
|---|
| 574 | <auxclasspath refid="findbugs.aux.classpath"/> |
|---|
| 575 | <pluginlist refid="findbugs.plugins"/> |
|---|
| 576 | </findbugs> |
|---|
| 577 | <checkstyle config="${checkstyle.rules}"> |
|---|
| 578 | <classpath refid="checkstyle.classpath" /> |
|---|
| 579 | </checkstyle> |
|---|
| 580 | </tools> |
|---|
| 581 | </jcreport> |
|---|
| 582 | |
|---|
| 583 | </target> |
|---|
| 584 | |
|---|
| 585 | </project> |
|---|