vinayakb | 5ee049d | 2013-04-06 21:21:29 +0000 | [diff] [blame^] | 1 | <project> |
| 2 | <target name="instrument"> |
| 3 | <antcall target="instrumentAModule"> |
| 4 | <param name="module" value="asterix-aql"/> |
| 5 | <param name="module" value="asterix-om"/> |
| 6 | <param name="module" value="asterix-metadata"/> |
| 7 | <param name="module" value="asterix-tools"/> |
| 8 | <param name="module" value="asterix-common"/> |
| 9 | <param name="module" value="asterix-transactions"/> |
| 10 | </antcall> |
| 11 | </target> |
| 12 | |
| 13 | <target name="report" depends="merge"> |
| 14 | <property name="src.dir" value="src/main/java/"/> |
| 15 | <cobertura-report datafile="sum.ser" |
| 16 | format="html" |
| 17 | destdir="./target/report"> |
| 18 | <!-- Add all modules that should be included below --> |
| 19 | <!-- fileset dir="./MODULE_NAME_TO_REPLACE/${src.dir}"/ --> |
| 20 | <fileset dir="./asterix-aql/${src.dir}"/> |
| 21 | <fileset dir="./asterix-om/${src.dir}"/> |
| 22 | <fileset dir="./asterix-metadata/${src.dir}"/> |
| 23 | <fileset dir="./asterix-tools/${src.dir}"/> |
| 24 | <fileset dir="./asterix-common/${src.dir}"/> |
| 25 | <fileset dir="./asterix-runtime/${src.dir}"/> |
| 26 | <fileset dir="./asterix-transactions/${src.dir}"/> |
| 27 | </cobertura-report> |
| 28 | </target> |
| 29 | |
| 30 | <target name="merge"> |
| 31 | <cobertura-merge datafile="sum.ser"> |
| 32 | <fileset dir="."> |
| 33 | <include name="**/cobertura.ser"/> |
| 34 | </fileset> |
| 35 | </cobertura-merge> |
| 36 | </target> |
| 37 | |
| 38 | <target name="instrumentAModule"> |
| 39 | <property name="classes.dir" value="target/classes"/> |
| 40 | <cobertura-instrument todir="./${module}/${classes.dir}"> |
| 41 | <fileset dir="./asterix-aql/target/classes"> |
| 42 | <include name="**/*.class"/> |
| 43 | </fileset> |
| 44 | <fileset dir="./asterix-om/target/classes"> |
| 45 | <include name="**/*.class"/> |
| 46 | </fileset> |
| 47 | <fileset dir="./asterix-metadata/target/classes"> |
| 48 | <include name="**/*.class"/> |
| 49 | </fileset> |
| 50 | <fileset dir="./asterix-tools/target/classes"> |
| 51 | <include name="**/*.class"/> |
| 52 | </fileset> |
| 53 | <fileset dir="./asterix-common/target/classes"> |
| 54 | <include name="**/*.class"/> |
| 55 | </fileset> |
| 56 | <fileset dir="./asterix-runtime/target/classes"> |
| 57 | <include name="**/*.class"/> |
| 58 | </fileset> |
| 59 | <fileset dir="./asterix-transactions/target/classes"> |
| 60 | <include name="**/*.class"/> |
| 61 | </fileset> |
| 62 | </cobertura-instrument> |
| 63 | </target> |
| 64 | |
| 65 | <property environment="env"/> |
| 66 | <property name="COBERTURA_HOME" value="../../.m2/repository/net/sourceforge/cobertura/cobertura/1.9.4.1"/> |
| 67 | <property name="cobertura.dir" value="${COBERTURA_HOME}"/> |
| 68 | <path id="cobertura.classpath"> |
| 69 | <fileset dir="${cobertura.dir}"> |
| 70 | <include name="cobertura.jar"/> |
| 71 | <include name="lib/**/*.jar"/> |
| 72 | </fileset> |
| 73 | </path> |
| 74 | <taskdef classpathref="cobertura.classpath" resource="tasks.properties"/> |
| 75 | </project> |