Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Environment:Maven 1.0, Java 1.4.2_05, Windows XP
-
Number of attachments :3
Description
I get a FileNotFoundException running the jcoverage goal after a clean goal has been run. See attached stacktrace.
-
- CoverageReport.java
- 13/Sep/05 5:59 PM
- 23 kB
- Steve Gudmundson
-
Hide
- maven-jcoverage-plugin-1.0.9-PATCHED-MPJCOVERAGE-15.jar
- 13/Sep/05 6:00 PM
- 32 kB
- Steve Gudmundson
-
- project.xml 6 kB
- META-INF/LICENSE.txt 11 kB
- META-INF/MANIFEST.MF 0.5 kB
- META-INF/NOTICE.txt 0.1 kB
- org/apache/.../jcoveragereport/Clazz.class 3 kB
- org/apache/.../ClazzComparator.class 0.9 kB
- org/apache/.../Coverage.class 4 kB
- org/apache/.../CoverageReport.class 15 kB
- org/apache/.../CoverageReportGenerator.class 3 kB
- org/apache/.../CoverageUnmarshaller.class 3 kB
- org/apache/.../JavaToHtml.class 6 kB
- org/apache/.../jcoveragereport/Line.class 0.7 kB
- org/apache/.../jcoveragereport/Main.class 0.7 kB
- org/apache/.../jcoveragereport/Package.class 3 kB
- org/apache/.../PackageComparator.class 1.0 kB
- plugin-resources/style.css 2 kB
- plugin.jelly 10 kB
- plugin.properties 1 kB
- project.properties 0.9 kB
Show- maven-jcoverage-plugin-1.0.9-PATCHED-MPJCOVERAGE-15.jar
- 13/Sep/05 6:00 PM
- 32 kB
- Steve Gudmundson
-
- stacktrace.txt
- 06/Oct/04 6:03 AM
- 4 kB
- Ricardo Gladwell
Activity
This is caused by an out-of-date jcoverage.ser file. Since this file is not stored in the target directory when it is generated, but in the root of the project it is not deleted during a 'clean' goal and therefore attempts to generate output for deleted files, etc.
I am also getting this error. I have found that if I create the full directory path that the FileNotFoundException references then run the goal again, it will work. So the problem seems to be that it is trying to write the file to a directory that has not yet been created. Is anyone working on this? If not maybe I will pop the code open and have a look.
Here is the fix compared to MAVEN_JCOVERAGE_1_0_9 version of the CoverageReport.java file:
159a160,164
> // BEGIN MPJCOVERAGE-15 FIX //
> String pkgdirname = pkg.getDirectory() + "/";
> File pkgFileDir = new File(dir, pkgdirname);
> pkgFileDir.mkdirs();
> // END MPJCOVERAGE-15 FIX //
Attached is the .class file with this change and a new maven-jcoverage-plugin.jar containing this change.
Stack trace of FileNotFoundException.