The following comment has been added to this issue:
Author: gilles dodinet
Created: Mon, 8 Sep 2003 3:47 PM
Body:
Emmanuel,
I thougth i was missing something since the jcoverage report displays informations
about the test classes coverage, that doesnot really make sense. I hope the
informations below will be kinda useful.
(im not sure if i should attach them as a separate file). A reproductible test case
can be found in mevenide cvs head
(http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mevenide/mevenide-core/)
I override only the maven.jcoverage.junit.fork property, setting it to false (xml
issues otherwise).
Ive restored my jcoverage plugin.jelly and rerun it. Here s the output :
<snip/>
[junit] Tests run: 9, Failures: 0, Errors: 0, Time elapsed: 0,241 sec
[junit] dir attribute ignored if running in the same VM
[junit] Running org.mevenide.util.DefaultProjectUnmarshallerTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,131 sec
[junit] dir attribute ignored if running in the same VM
[junit] Running org.mevenide.util.MevenideUtilTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,05 sec
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
Generate report for E:\workspace\mevenide-core/target/jcoverage/coverage.xml fil
e.
OutputDir = E:\workspace\mevenide-core/target/docs/jcoverage
org/mevenide/project/io/ProjectWriter.java
org/mevenide/project/source/AllTests.java
2 bis
java.io.FileNotFoundException: E:\workspace\mevenide-core\src\java\org\mevenide\
project\source\AllTests.java (Le fichier sp�cifi� est introuvable)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at java.io.FileReader.<init>(FileReader.java:55)
at org.apache.maven.jcoveragereport.CoverageReport.generateSourceFile(Co
verageReport.java:414)
at org.apache.maven.jcoveragereport.CoverageReport.generateSourceFiles(C
overageReport.java:374)
at org.apache.maven.jcoveragereport.CoverageReport.generate(CoverageRepo
rt.java:83)
at org.apache.maven.jcoveragereport.CoverageReportGenerator.execute(Cove
rageReportGenerator.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
<snip/>
AllTests is defined in src/test/java. the structure of the project is as follow :
mevenide-core
/src/java
/src/test/java
/src/test/etc
/etc
i use default outputDirectory end default testOutputDirectory. Also it can be noted
that in ${maven.build.dest}/jcoverage/coverage.xml we find references to *all* java
classes, including test classes. I guess the problem comes from here.
Below are parts of the relevant poms.
<project>
<extend>${basedir}/../mevenide-master/base-project.xml</extend>
<snip/>
<dependencies>
<snip/>
</dependencies>
</project>
parent pom :
<project>
<snip/>
<dependencies>
<snip/>
</dependencies>
<build>
<nagEmailAddress>[EMAIL PROTECTED]</nagEmailAddress>
<sourceDirectory>src/java</sourceDirectory>
<unitTestSourceDirectory>src/test/java</unitTestSourceDirectory>
<aspectSourceDirectory>src/aspects</aspectSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
<resources>
<resource>
<directory>${basedir}/etc</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/test/etc</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/test/etc</directory>
<includes>
<include>fixtures/*.*</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/test/conf</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
<resource>
<directory>${basedir}/etc</directory>
<includes>
<include>*.*</include>
<include>META-INF/services/*.*</include>
<include>templates/**/*.*</include>
</includes>
</resource>
</resources>
</unitTest>
<resources>
<resource>
<directory>${basedir}/etc</directory>
<includes>
<include>*.*</include>
</includes>
</resource>
<resource>
<directory>${basedir}/etc</directory>
<includes>
<include>META-INF/services/*.*</include>
</includes>
</resource>
</resources>
</build>
<reports>
<snip/>
</reports>
</project>
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-795
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MAVEN-795
Summary: jcovergae plugin doesnot seem to merge sourceDirectory and
unitTestSourceDIrectory
Type: Bug
Status: Reopened
Priority: Major
Time Spent: Unknown
Remaining: Unknown
Project: maven
Fix Fors:
1.0-rc1
Assignee:
Reporter: gilles dodinet
Created: Sun, 7 Sep 2003 10:14 AM
Updated: Mon, 8 Sep 2003 7:24 AM
Environment: winxp, maven built yesterday from cvs head
Description:
when running jcoverage plugin (maven jcoverage) i end up with FileNotFoundException :
<my basedir>/src/java/ProjectAggregatorTest.java.
After digging in the plugin, it seems that sourceDirectory and unitTestSourceDirectory
should be merged (currently only sourceDirectory is passed to report, causing that
exception. merging sourceDirectory and unitTestSourceDirectory in
${maven.jcoverage.sourceDirectory} and passing that directory to report seem to solve
the issue. i hope im not missing something or a configuration thingy. attached is a
patch.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]