| 1 | <?xml version="1.0"?> |
|---|
| 2 | |
|---|
| 3 | <project name="report"> |
|---|
| 4 | |
|---|
| 5 | <!-- Redefine to make included build file self contained and |
|---|
| 6 | make eclipse happy. --> |
|---|
| 7 | <property name="base.dir" value="../"/> |
|---|
| 8 | |
|---|
| 9 | <!-- The ruleset files --> |
|---|
| 10 | <property name="pmd.rules" value="${base.dir}/config/jcoderz-pmd.xml"/> |
|---|
| 11 | <property name="checkstyle.rules" value="${base.dir}/config/jcoderz-checkstyle.xml" /> |
|---|
| 12 | <property name="findbugs.rules" value="${base.dir}/config/jcoderz-findbugs.xml" /> |
|---|
| 13 | <property name="filter.rules" value="${base.dir}/config/jcoderz-report-filter.xsl" /> |
|---|
| 14 | |
|---|
| 15 | <target name="summary-report"> |
|---|
| 16 | <!-- This is the classpath used by the JcReportAntTask --> |
|---|
| 17 | <path id="jcreport.classpath"> |
|---|
| 18 | <pathelement path="${base.dir}/build/classes"/> |
|---|
| 19 | <fileset dir="${base.dir}/lib"> |
|---|
| 20 | <include name="default/jaxb/*.jar"/> |
|---|
| 21 | <include name="default/chart2d/*.jar"/> |
|---|
| 22 | <include name="default/jedit/*.jar"/> |
|---|
| 23 | </fileset> |
|---|
| 24 | </path> |
|---|
| 25 | <taskdef name="jcsummaryreport" |
|---|
| 26 | classname="org.jcoderz.phoenix.report.JcSummaryReportAntTask"> |
|---|
| 27 | <classpath refid="jcreport.classpath"/> |
|---|
| 28 | </taskdef> |
|---|
| 29 | <jcsummaryreport name="fawkez-summary" |
|---|
| 30 | summary="${env.CRUISECONTROL_HOME}/artifacts/${name}/global/history.csv" |
|---|
| 31 | dest="${build.dir}/doc/summary" |
|---|
| 32 | basedir="${env.CRUISECONTROL_HOME}/artifacts/${name}"/> |
|---|
| 33 | </target> |
|---|
| 34 | |
|---|
| 35 | <target name="report"> |
|---|
| 36 | |
|---|
| 37 | <path id="emma.lib"> |
|---|
| 38 | <pathelement location="${base.dir}/lib/default/emma/emma.jar"/> |
|---|
| 39 | <pathelement location="${base.dir}/lib/default/emma_ant/emma_ant.jar"/> |
|---|
| 40 | </path> |
|---|
| 41 | <taskdef resource="emma_ant.properties" classpathref="emma.lib"/> |
|---|
| 42 | <emma enabled="${build.coverage}" > |
|---|
| 43 | <merge outfile="${build.dir}/full-coverage.es"> |
|---|
| 44 | <fileset dir="${build.dir}" includes="*.em, *.ec" /> |
|---|
| 45 | <fileset dir="${base.dir}" includes="*.em, *.ec"> |
|---|
| 46 | <exclude name="full-coverage.es"/> |
|---|
| 47 | </fileset> |
|---|
| 48 | </merge> |
|---|
| 49 | </emma> |
|---|
| 50 | <delete> |
|---|
| 51 | <fileset dir="${base.dir}"> |
|---|
| 52 | <include name="*.em"/> |
|---|
| 53 | <include name="*.ec"/> |
|---|
| 54 | </fileset> |
|---|
| 55 | </delete> |
|---|
| 56 | |
|---|
| 57 | <!-- This is the classpath used by the JcReportAntTask --> |
|---|
| 58 | <path id="jcreport.classpath"> |
|---|
| 59 | <pathelement path="${base.dir}/build/classes"/> |
|---|
| 60 | <fileset dir="${base.dir}/lib"> |
|---|
| 61 | <include name="default/jaxb/*.jar"/> |
|---|
| 62 | <include name="default/chart2d/*.jar"/> |
|---|
| 63 | <include name="default/emma/*.jar"/> |
|---|
| 64 | </fileset> |
|---|
| 65 | <fileset dir="${build.dir}"> |
|---|
| 66 | <include name="jedit-syntax.jar"/> |
|---|
| 67 | </fileset> |
|---|
| 68 | </path> |
|---|
| 69 | <taskdef name="jcreport" |
|---|
| 70 | classname="org.jcoderz.phoenix.report.JcReportAntTask"> |
|---|
| 71 | <classpath refid="jcreport.classpath" /> |
|---|
| 72 | </taskdef> |
|---|
| 73 | |
|---|
| 74 | <!-- This classpath is used by the checkstyle process --> |
|---|
| 75 | <path id="checkstyle.classpath"> |
|---|
| 76 | <fileset dir="${base.dir}/lib"> |
|---|
| 77 | <include name="default/antlr/*.jar"/> |
|---|
| 78 | <include name="default/checkstyle/*.jar"/> |
|---|
| 79 | <include name="default/commons-beanutils/*.jar"/> |
|---|
| 80 | <include name="default/commons-beanutils-core/*.jar"/> |
|---|
| 81 | <include name="default/commons-cli/*.jar"/> |
|---|
| 82 | <include name="default/jcl-over-slf4j/*.jar"/> |
|---|
| 83 | <include name="default/slf4j-api/*.jar"/> |
|---|
| 84 | <include name="default/slf4j-jdk14/*.jar"/> |
|---|
| 85 | </fileset> |
|---|
| 86 | <path location="${base.dir}/build/classes"/> |
|---|
| 87 | <fileset dir="${base.dir}/lib"> |
|---|
| 88 | <include name="default/jaxb/jaxb-api.jar"/> |
|---|
| 89 | </fileset> |
|---|
| 90 | </path> |
|---|
| 91 | <!-- This classpath is used by the pmd and cpd process --> |
|---|
| 92 | <path id="pmd.classpath"> |
|---|
| 93 | <fileset dir="${base.dir}/lib"> |
|---|
| 94 | <include name="default/pmd/*.jar"/> |
|---|
| 95 | <include name="default/asm*/*.jar"/> |
|---|
| 96 | <include name="default/backport-util-concurrent/*.jar"/> |
|---|
| 97 | <include name="default/jaxen/*.jar"/> |
|---|
| 98 | <include name="default/oro/*.jar"/> |
|---|
| 99 | </fileset> |
|---|
| 100 | </path> |
|---|
| 101 | <!-- This classpath is used by the findbugs process --> |
|---|
| 102 | <path id="findbugs.classpath"> |
|---|
| 103 | <fileset dir="${base.dir}/lib"> |
|---|
| 104 | <include name="default/findbugs/*.jar"/> |
|---|
| 105 | <include name="default/asm*/*.jar"/> |
|---|
| 106 | <include name="default/jaxen/*.jar"/> |
|---|
| 107 | <include name="default/dom4j/*.jar"/> |
|---|
| 108 | <include name="default/commons-lang/*.jar"/> |
|---|
| 109 | <exclude name="**/fb-contrib.jar"/> |
|---|
| 110 | </fileset> |
|---|
| 111 | </path> |
|---|
| 112 | <path id="findbugs.plugins"> |
|---|
| 113 | <path location="${base.dir}/lib/default/fb-contrib/fb-contrib.jar"/> |
|---|
| 114 | </path> |
|---|
| 115 | <!-- This is the auxiliary classpath used by findbugs --> |
|---|
| 116 | <path id="findbugs.aux.classpath"> |
|---|
| 117 | <path location="${base.dir}/build/classes"/> |
|---|
| 118 | <path location="${env.JAVA_HOME}/lib/tools.jar"/> |
|---|
| 119 | <fileset dir="${base.dir}/lib"> |
|---|
| 120 | <include name="default/**/*.jar"/> |
|---|
| 121 | </fileset> |
|---|
| 122 | </path> |
|---|
| 123 | |
|---|
| 124 | |
|---|
| 125 | |
|---|
| 126 | <delete dir="${base.dir}/build/jcreport"/> |
|---|
| 127 | <jcreport name="fawkez" |
|---|
| 128 | dest="${base.dir}/build/doc/findings-report" |
|---|
| 129 | wikibase="http://www.jcoderz.org/fawkez/wiki/jcreport:" |
|---|
| 130 | webrcsbase="http://www.jcoderz.org/fawkez/browser/trunk" |
|---|
| 131 | webrcssuffix="" |
|---|
| 132 | packagebase="org.jcoderz" |
|---|
| 133 | projectbase="${base.dir}" |
|---|
| 134 | tempfolder="${base.dir}/build/jcreport" |
|---|
| 135 | debug="false" |
|---|
| 136 | maxheap="128" |
|---|
| 137 | encoding="US-ASCII" |
|---|
| 138 | cpus="1" |
|---|
| 139 | oldReportFile="${env.CRUISECONTROL_HOME}/artifacts/${name}/global/jcoderz-report.xml"> |
|---|
| 140 | <classpath refid="jcreport.classpath"/> |
|---|
| 141 | <reports> |
|---|
| 142 | <report name="fawkez-test" |
|---|
| 143 | level="test" |
|---|
| 144 | sourcepath="${base.dir}/test/java" |
|---|
| 145 | classpath="${build.dir}/test-classes"> |
|---|
| 146 | </report> |
|---|
| 147 | <report name="fawkez-prod" |
|---|
| 148 | level="prod" |
|---|
| 149 | sourcepath="${base.dir}/src/java" |
|---|
| 150 | classpath="${build.dir}/classes"> |
|---|
| 151 | </report> |
|---|
| 152 | </reports> |
|---|
| 153 | <mappings> |
|---|
| 154 | <webrcs pattern="**/fawkez" url="http://" suffix=""/> |
|---|
| 155 | </mappings> |
|---|
| 156 | <tools> |
|---|
| 157 | <pmd config="${pmd.rules}" |
|---|
| 158 | targetjdk="1.4"> |
|---|
| 159 | <classpath refid="pmd.classpath"/> |
|---|
| 160 | </pmd> |
|---|
| 161 | <cpd minimumtokens="100"> |
|---|
| 162 | <classpath refid="pmd.classpath"/> |
|---|
| 163 | </cpd> |
|---|
| 164 | <!-- Could not disable UnreadFields cause further dependencies --> |
|---|
| 165 | <findbugs maxheap="256" |
|---|
| 166 | effort="max" |
|---|
| 167 | debug="false" |
|---|
| 168 | omitVisitors="RuntimeExceptionCapture,FindUncalledPrivateMethods,CustomBuiltXML,DeclaredRuntimeException,PossiblyRedundantMethodCalls,ExceptionSoftening" |
|---|
| 169 | warninglevel="low"> |
|---|
| 170 | <classpath refid="findbugs.classpath"/> |
|---|
| 171 | <auxclasspath refid="findbugs.aux.classpath"/> |
|---|
| 172 | <pluginlist refid="findbugs.plugins"/> |
|---|
| 173 | </findbugs> |
|---|
| 174 | <checkstyle config="${checkstyle.rules}" |
|---|
| 175 | maxHeap="256"> |
|---|
| 176 | <classpath refid="checkstyle.classpath" /> |
|---|
| 177 | </checkstyle> |
|---|
| 178 | <!-- cobertura datafile="x.ser"> |
|---|
| 179 | </cobertura --> |
|---|
| 180 | <emma datafile="${build.dir}/full-coverage.es"/> |
|---|
| 181 | </tools> |
|---|
| 182 | <logfiles> |
|---|
| 183 | <logfile file="${build.dir}/javadoc.log" type="JavaDoc"/> |
|---|
| 184 | <logfile file="${build.dir}/javac.log" type="javac"/> |
|---|
| 185 | </logfiles> |
|---|
| 186 | <filters> |
|---|
| 187 | <filter file="${filter.rules}"/> |
|---|
| 188 | </filters> |
|---|
| 189 | </jcreport> |
|---|
| 190 | <!-- TODO: Only do this on the cc machine. --> |
|---|
| 191 | <copy |
|---|
| 192 | file="${base.dir}/build/doc/findings-report/jcoderz-report.xml" |
|---|
| 193 | tofile="${env.CRUISECONTROL_HOME}/artifacts/${name}/global/jcoderz-report.xml" /> |
|---|
| 194 | </target> |
|---|
| 195 | |
|---|
| 196 | <target name="view-report" depends="report, view-report-nodeps" |
|---|
| 197 | description="Generates a report and displays it on the os default browser."/> |
|---|
| 198 | <target name="view-report-nodeps"> |
|---|
| 199 | <!-- TODO: for not win os we might check if the $BROWSER environment |
|---|
| 200 | variable is set and if use this as command --> |
|---|
| 201 | <exec executable="cmd.exe" spawn="true" os="Windows XP"> |
|---|
| 202 | <arg value="/C" /> |
|---|
| 203 | <arg file="${build.dir}/build/doc/findings-report/index.html"/> |
|---|
| 204 | </exec> |
|---|
| 205 | </target> |
|---|
| 206 | |
|---|
| 207 | </project> |
|---|