Instrumentation seems to go okay but during the compilation of test coverage there is an exception that causes all coverage stats to be zero. The problem is only on Linux, on Windows it is fine.
[INFO] [cobertura:instrument]
[INFO] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Instrumenting 5 files to /export/boreeng/jeff-temp/trunk/target/generated-classes/cobertura
Cobertura: Saved information on 5 classes.
Instrument time: 377ms
[INFO] Instrumentation was successful.
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /export/boreeng/jeff-temp/trunk/src/test/resources
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory: /export/boreeng/jeff-temp/trunk/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.iontrading.backoffice.model.SecurityTypeTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.109 sec
Results :
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
Exception in thread "Thread-0" java.lang.ExceptionInInitializerError
at java.io.File.deleteOnExit(File.java:939)
at net.sourceforge.cobertura.util.FileLocker.<init>(FileLocker.java:80)
at net.sourceforge.cobertura.coveragedata.ProjectData.saveGlobalProjectData(ProjectData.java:230)
at net.sourceforge.cobertura.coveragedata.SaveTimer.run(SaveTimer.java:31)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalStateException: Shutdown in progress
at java.lang.Shutdown.add(Shutdown.java:62)
at java.lang.System$2.registerShutdownHook(System.java:1146)
at java.io.DeleteOnExitHook.<clinit>(DeleteOnExitHook.java:20)
... 5 more
[INFO] Preparing findbugs:findbugs
[INFO] [resources:resources]
I was wrong when I said that the issue was OS dependent. Actually the problem is with JDK 1.6.0_14. There is no problem with JDK 1.6.0_13. The issue is the same on both Windows and Linux.