Author: doogie Date: Tue Jun 24 23:07:39 2014 New Revision: 1605216 URL: http://svn.apache.org/r1605216 Log: Fix detection of cobertura, for compilation of the hook used by the runtime container; also fixes the classpath used to define the ant task. Now, command-line api tests run underneath cobertura work.
Modified: ofbiz/trunk/common.xml ofbiz/trunk/framework/base/build.xml ofbiz/trunk/macros.xml Modified: ofbiz/trunk/common.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/common.xml?rev=1605216&r1=1605215&r2=1605216&view=diff ============================================================================== --- ofbiz/trunk/common.xml (original) +++ ofbiz/trunk/common.xml Tue Jun 24 23:07:39 2014 @@ -131,19 +131,7 @@ under the License. <target name="tests-cobertura" depends="jar"> <mkdir dir="${build.dir}/cobertura-lib"/> - <taskdef resource="tasks.properties"> - <classpath> - <fileset dir="${ofbiz.home.dir}/framework/base/lib"> - <include name="cobertura-1.9.4.1.jar" /> - <include name="log4j-1.2.17.jar" /> - </fileset> - <fileset dir="${ofbiz.home.dir}/framework/base/lib/scripting"> - <include name="asm-3.2.jar" /> - <include name="asm-tree-3.2.jar" /> - <include name="jakarta-oro-2.0.8.jar" /> - </fileset> - </classpath> - </taskdef> + <taskdef resource="tasks.properties" classpathref="cobertura.class.path"/> <delete file="${build.dir}/test-results/cobertura.dat"/> <cobertura-instrument datafile="${build.dir}/test-results/cobertura.dat" todir="${build.dir}/cobertura-lib"> <fileset dir="${build.dir}/lib"> Modified: ofbiz/trunk/framework/base/build.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/build.xml?rev=1605216&r1=1605215&r2=1605216&view=diff ============================================================================== --- ofbiz/trunk/framework/base/build.xml (original) +++ ofbiz/trunk/framework/base/build.xml Tue Jun 24 23:07:39 2014 @@ -72,7 +72,7 @@ under the License. </condition> <condition property="exclude.cobertura" value="org/ofbiz/base/config/Cobertura*.java"> <not> - <available classname="net.sourceforge.cobertura.instrument.ClassInstrumenter" classpathref="local.class.path"/> + <available classname="net.sourceforge.cobertura.instrument.ClassInstrumenter" classpathref="cobertura.class.path"/> </not> </condition> <patternset id="src.exc.set"> Modified: ofbiz/trunk/macros.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/macros.xml?rev=1605216&r1=1605215&r2=1605216&view=diff ============================================================================== --- ofbiz/trunk/macros.xml (original) +++ ofbiz/trunk/macros.xml Tue Jun 24 23:07:39 2014 @@ -69,6 +69,13 @@ under the License. <fileset dir="${ofbiz.home.dir}/framework/base/lib/scripting/" includes="*.jar"/> <pathelement location="${ofbiz.home.dir}/framework/base/lib/ant/ant-apache-bsf-1.7.1.jar"/> </path> + <path id="cobertura.class.path"> + <pathelement location="${ofbiz.home.dir}/framework/base/lib/cobertura-1.9.4.1.jar" /> + <pathelement location="${ofbiz.home.dir}/framework/base/lib/log4j-1.2.17.jar" /> + <pathelement location="${ofbiz.home.dir}/framework/base/lib/scripting/asm-3.2.jar" /> + <pathelement location="${ofbiz.home.dir}/framework/base/lib/scripting/asm-tree-3.2.jar" /> + <pathelement location="${ofbiz.home.dir}/framework/base/lib/scripting/jakarta-oro-2.0.8.jar" /> + </path> <path id="local.class.path"/> <presetdef name="default-javac"> <javac debug="on" deprecation="on" destdir="${build.dir}/classes" srcdir="${src.dir}" classpathref="local.class.path">