Error while running Cobertura tests in framework/base

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Error while running Cobertura tests in framework/base

Adrian Crum
I downloaded the latest Cobertura jar and dropped it in
framework/base/lib. I tried to run the tests-cobertura ant task and I
got an error message:


classes:
   [javac16] Compiling 2 source files to
C:\ofbiz\framework\base\build\classes
   [javac16]
C:\ofbiz\framework\base\src\org\ofbiz\base\config\CoberturaInstrumenter.java:83:
cannot find symbol
   [javac16] symbol  : method getGlobalProjectData()
   [javac16] location: class
net.sourceforge.cobertura.coveragedata.ProjectData
   [javac16]             ClassVisitor ci = (ClassVisitor)
INSTRUMENTER_CONSTRUCTOR.newInstance(projectData != null ? projectData :
ProjectData.getGlobalProjectData(), cw, Collections.EMPTY_LIST,
Collections.EMPTY_LIST);
   [javac16]
                                                                       ^
   [javac16] 1 error

BUILD FAILED

I figured out that I need to use a previous version of Cobertura -
1.9.3. When I replaced the library and ran the tests-cobertura ant task
again, I got an error message:

tests-cobertura:
     [mkdir] Created dir: C:\ofbiz\framework\base\build\cobertura-lib
   [taskdef] Could not load definitions from resource tasks.properties.
It could not be found.

BUILD FAILED
C:\ofbiz\common.xml:148: Problem: failed to create task or type
cobertura-instrument
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

Now I'm lost. I don't know enough about Cobertura to go any farther.

Any ideas?

-Adrian