Author: tfmorris Date: 2008-04-26 00:48:56-0700 New Revision: 14473 Modified: trunk/src/argouml-app/build.xml
Log: Remove Cobertura taskdef from default path Modified: trunk/src/argouml-app/build.xml Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/build.xml?view=diff&rev=14473&p1=trunk/src/argouml-app/build.xml&p2=trunk/src/argouml-app/build.xml&r1=14472&r2=14473 ============================================================================== --- trunk/src/argouml-app/build.xml (original) +++ trunk/src/argouml-app/build.xml 2008-04-26 00:48:56-0700 @@ -93,6 +93,8 @@ <path refid="src.compile.classpath"/> </path> + <property name="cobertura.dir" value="${argo.tools.dir}/cobertura-1.9" /> + <path id="tests.run.classpath"> <path refid="tests.compile.classpath"/> <fileset dir="../argouml-core-model-mdr/build/"> @@ -104,7 +106,6 @@ </fileset> </path> - <!-- In order to use ant optional tasks which use jars that are not --> <!-- copied into ANT_HOME/lib, we must declare the tasks ourselves. --> @@ -118,19 +119,22 @@ <property name="version.package" value="org/argouml/application"/> - <property name="cobertura.dir" value="${argo.tools.dir}/cobertura-1.9" /> - + <path id="cobertura.classpath"> - <fileset dir="${cobertura.dir}"> - <include name="cobertura.jar" /> - <include name="lib/**/*.jar" /> - </fileset> + <fileset dir="${cobertura.dir}"> + <include name="cobertura.jar" /> + <include name="lib/**/*.jar" /> + </fileset> </path> + + </target> + - <taskdef classpathref="cobertura.classpath" resource="tasks.properties" /> - + <target name="init-coverage" depends="init"> + <taskdef classpathref="cobertura.classpath" resource="tasks.properties" /> </target> + <!-- =================================================================== --> <!-- Initialization target for optional ant tasks --> <!-- =================================================================== --> @@ -451,8 +455,8 @@ <!-- - - - - - - - - - - - - - - - - - target: cobertura-instrument - - - - - - - - - - - - - - - - - --> - <target name="coverage-instrument" depends="compile" - if="test.coverage"> + <target name="coverage-instrument" depends="init-coverage,compile" + if="test.coverage"> <cobertura-instrument todir="${build.dir}/instrumented"> <fileset dir="${build.classes}"> <include name="**/*.class" /> @@ -483,7 +487,7 @@ </delete> </target> - <target name="coverage-report-xml" depends="init" if="test.coverage"> + <target name="coverage-report-xml" depends="init-coverage" if="test.coverage"> <cobertura-report format="xml" datafile="${tests.reports}/cobertura.ser" destdir="${tests.reports}/coverage/xml" > <fileset dir="src"> @@ -492,7 +496,7 @@ </cobertura-report> </target> - <target name="coverage-report-html" depends="init" + <target name="coverage-report-html" depends="init-coverage" description="create HTML coverage report (default is XML)"> <cobertura-report format="html" datafile="${tests.reports}/cobertura.ser" destdir="${tests.reports}/coverage/html" > @@ -548,18 +552,16 @@ </target> - <!-- =================================================================== --> <!-- Run the junit tests. --> <!-- =================================================================== --> <target name="tests-with-coverage" - description="Run tests target while recording test coverage using Cobertura"> + description="Run tests while recording coverage using Cobertura"> <property name="test.coverage" value="true"/> <antcall target="coverage-report-clean"/> <antcall target="coverage-instrument"/> <antcall target="tests"/> <antcall target="coverage-report-xml"/> - </target> <target name="tests" @@ -703,3 +705,4 @@ </project> <!-- End of file --> + --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
