Grokbase Groups Maven users May 2005
FAQ
Hi,

I have Mock*DAO classes in the "test" subdir. These classes mirror the few
DAO classes in use to fake the database access in unit tests. They contain
no "*Test" methods.

The tests and plugins successfully run, including JCoverage generating
"coverage.xml".

JCoverage compiles and places class files as I would expect - the Mock
classes to its "test-classes" subdir.

The problem is, JCoverage throws "FileNotFoundException" on generating the
HTML report.

I think JCoverage is trying to process (or incorrectly including) the Mock
classes when generating the report:

...
Generate report for
c:/devroot/healthmatch/builds/healthmatchbatch/jcoverage/coverage.xml file.
OutputDir = c:/devroot/healthmatch/builds/healthmatchbatch/docs/jcoverage
java.io.FileNotFoundException:
c:\devroot\healthmatch\builds\healthmatchbatch\docs\jcoverage\us\state\vanta
ge\hm\batch\ar\dao\mock\package-frame.html (The system cannot find the path
specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:131)
at java.io.FileWriter.(CoverageRe
port.java:162)
at
org.apache.maven.jcoveragereport.CoverageReport.generatePackageList(Coverage
Report.java:132)
at
org.apache.maven.jcoveragereport.CoverageReport.generate(CoverageReport.java
:59)
at
org.apache.maven.jcoveragereport.CoverageReportGenerator.execute(CoverageRep
ortGenerator.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...


I can't determine why this file is not there, nor how to make it ignore
it/not expect it's existence.

I tried to exclude these files using these settings, but they all failed:

In project.properties:
maven.jcoverage.instrumentation.excludes=**/Mock*.java

In project.xml:
include alone:
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
</unitTest>
added an exclude:
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/Mock*.java</exclude>
</excludes>
</unitTest>


Do I have a config error/not understanding something?
Perhaps is JCoverage plugin not respecting these exclude settings?

Trying to exclude is probably the wrong path anyways.(?)

Can JCoverage (or the plugin?) not handle classes without tests in the test
source dir??

Can anyone shed light on this or give any guidance please?!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupusers @
categoriesmaven
postedMay 30, '05 at 5:59a
activeMay 30, '05 at 5:59a
posts1
users1
websitemaven.apache.org
irc#maven

1 user in discussion

Jeff Jensen: 1 post

People

Translate

site design / logo © 2021 Grokbase