Maybe this can help:

http://jira.codehaus.org/browse/MPJCOVERAGE-21


-Lukas


Siegmann Daniel, NY wrote:
I have a project which uses Maven 1.0.2. We wish to use jcoverage to
generate coverage information. We have used this in other projects. In this
project, it was working for a time, but now it fails.

If the jcoverage goal is run from a clean checkout, it runs java:compile
successfully but encounters an error during instrumentation:
=====================================
jcoverage:on:
    [mkdir] Created dir:
D:\projects\AProject\PIInternet\target\docs\jcoverage
    [mkdir] Created dir:
D:\projects\AProject\PIInternet\target\jcoverage\database
    [mkdir] Created dir:
D:\projects\AProject\PIInternet\target\jcoverage\classes
instrumenting the class-files...
jcoverage 1.0.5 copyright (c)2003 jcoverage ltd. http://jcoverage.com/
jcoverage is licensed under the GNU General Public License jcoverage comes
with ABSOLUTELY NO WARRANTY instrumenting 632 classes to
D:\projects\AProject\PIInternet\target\jcoverage\classes
    [instrument] [ERROR] java.io.IOException: CreateProcess:
D:\projects\tools\jdk\1.4.2_05\jre\bin\java.exe -classpath
D:\Profiles\SIE01876\.maven\repository\jcoverage\jars\jcoverage-1.0.5.jar;D:
\Profiles\SIE01876\.maven\repository\bcel\jars\bcel-5.1.jar;D:\Profiles\SIE0
1876\.maven\repository\urbanophile\jars\java-getopt-1.0.9.jar;D:\Profiles\SI
E01876\.maven\repository\log4j\jars\log4j-1.2.8.jar;D:\Profiles\SIE01876\.ma
ven\repository\oro\jars\oro-2.0.7.jar;D:\Profiles\SIE01876\.maven\repository
\junit\jars\junit-3.8.1.jar;D:\Profiles\SIE01876\.maven\repository\xerces\ja
rs\xercesImpl-2.4.0.jar;D:\Profiles\SIE01876\.maven\repository\xerces\jars\x
mlParserAPIs-2.2.1.jar com.jcoverage.coverage.Instrument -d
D:\projects\AProject\PIInternet\target\jcoverage\classes -basedir
D:\projects\AProject\PIInternet\target\classes
com\suncorp\piinternet\pdmm\producthierarchyrule\Optionallyinclude___busines
s_insurance.class com\suncorp\piinternet\model\CTPInfo.class
com\aproject\piinternet\pdmm\baseproduct\
Comprehensive_motor_insurance.class com\aproject\piinternet\pdmm\salesq?
    [copy] Copied 30 empty directories to
D:\projects\AProject\PIInternet\target\jcoverage\classes

java:jar-resources:
Copying 5 files to D:\projects\AProject\PIInternet\target\jcoverage\classes
=====================================

It continues on to test:test-compile but gets errors: "package does not
exist" and "cannot resolve symbol", since it failed to copy what it needed
apparently.

If I then run the jar goal, it will complete successfully. I then run
jcoverage again, which can now pass the test cases, but it gets the
following error: =====================================
jcoverage 1.0.5 copyright (c)2003 jcoverage ltd. http://jcoverage.com/
jcoverage is licensed under the GNU General Public License jcoverage comes
with ABSOLUTELY NO WARRANTY

jcoverage:html-report:
    [report] java.io.FileNotFoundException: jcoverage.ser (The system cannot
find the file specified)
    [report]    at java.io.FileInputStream.open(Native Method)
    [report]    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    [report]    at
com.jcoverage.coverage.reporting.xml.Main.main(Main.java:106)
    [report] Exception in thread "main"
org.apache.commons.jelly.JellyTagException:
D:\Profiles\SIE01876\.maven\cache\maven-jcoverage-plugin-1.0.9\plugin.jelly:
191:91: <report> org.apache.tools.ant.BuildException
org.apache.commons.jelly.JellyTagException:
D:\Profiles\SIE01876\.maven\cache\maven-jcoverage-plugin-1.0.9\plugin.jelly:
216:39: <ant:fail> org.apache.commons.jelly.JellyTagException:
D:\Profiles\SIE01876\.maven\cache\maven-jcoverage-plugin-1.0.9\plugin.jelly:
191:91: <report> org.apache.tools.ant.BuildException
=====================================

There are no properties set specifically for jcoverage, so I have no idea
what could be causing it to fail. Apparently it does not create the
jcoverage.ser file as it should, but I have no idea why.

Any ideas?

--
Daniel Siegmann
FJA-US, Inc.
(212) 840-2618 ext. 139

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to