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.<init>(FileOutputStream.java:179)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
        at java.io.FileWriter.<init>(FileWriter.java:73)
        at
org.apache.maven.jcoveragereport.CoverageReport.generateClassList(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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to