Hi James, Actually I need to remove the default "clover" goal that someone had introduced (I hadn't put it there initially for a good reason ... :-)).
The reason is that clover database logs are written on JVM shutdown. Thus if you call the clover test goal and then the report immediately after, you'll get an empty report. Actually this is supposed to be documented in the plugin docs. So, to make it work, simply run : maven clover:test and then, in a separate command: maven clover:html-report Note: this is a known limitation from Clover 0.6b. -Vincent > -----Original Message----- > From: James CE Johnson [mailto:[EMAIL PROTECTED]] > Sent: 27 August 2002 22:44 > To: [EMAIL PROTECTED] > Subject: There's something wrong with the clover plugin... > > This is on Linux with jdk 1.4 if it matters... > > When I do 'maven clover' I get this: > /home/jcej/common/com.imperitek.util > > clover:prepare: > [mkdir] Created dir: > /home/jcej/common/com.imperitek.util/target/clover > [mkdir] Created dir: > /home/jcej/common/com.imperitek.util/target/clover/classes [mkdir] > Created dir: > > /home/jcej/common/com.imperitek.util/target/clover/databasejava:prepare- > filesystem: > [mkdir] Created dir: > /home/jcej/common/com.imperitek.util/target/classes > > java:compile: > [javac] Compiling 21 source files to > /home/jcej/common/com.imperitek.util/target/classes > java:prepare-filesystem: > > java:compile: > > java:jar-resources: > > test:prepare-filesystem: > [mkdir] Created dir: > /home/jcej/common/com.imperitek.util/target/test-classes [mkdir] > Created dir: > /home/jcej/common/com.imperitek.util/target/test-reports > test:compile: > [javac] Compiling 7 source files to > /home/jcej/common/com.imperitek.util/target/test-classes [copy] > Copying 9 files to > /home/jcej/common/com.imperitek.util/target/test-classes > > clover:compile: > [javac] Compiling 21 source files to > /home/jcej/common/com.imperitek.util/target/clover/classes [javac] > Clover Version 0.6b, built on June 26 2002 > [javac] No coverage database > > '/home/jcej/common/com.imperitek.util/target/clover/database/clover_cove ra > ge.db' > found. Creating a fresh one. [javac] Clover all over. Instrumented > 21 files. > [copy] Copying 5 files to > /home/jcej/common/com.imperitek.util/target/clover/classes > clover:test: > [junit] dir attribute ignored if running in the same VM > [junit] Running ExampleTest > [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.188 sec > [junit] dir attribute ignored if running in the same VM > [junit] Running com.imperitek.util.ConfigurationTest > [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.014 sec > [junit] dir attribute ignored if running in the same VM > [junit] Running com.imperitek.util.RangeTest > [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.056 sec > [junit] dir attribute ignored if running in the same VM > [junit] Running com.imperitek.util.cache.CacheTest > [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 5.063 sec > [junit] dir attribute ignored if running in the same VM > [junit] Running com.imperitek.util.sql.WhereClauseTest > [junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 0.088 sec > [junit] dir attribute ignored if running in the same VM > [junit] Running com.imperitek.util.collection.AdaptingIteratorTest > [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.019 sec > [junit] dir attribute ignored if running in the same VM > [junit] Running com.imperitek.util.geo.ZipcodeExploderTest > [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 2.269 sec > > clover:html-report: > [mkdir] Created dir: > /home/jcej/common/com.imperitek.util/target/docs/clover [java] > Clover Version 0.6b, built on June 26 2002 > [java] Reading data for database at > > '/home/jcej/common/com.imperitek.util/target/clover/database/clover_cove ra > ge.db' [java] WARN: com.cortexeb.tools.clover.CloverDbRegistry: no > coverage > recordings found for coverage db > > '/home/jcej/common/com.imperitek.util/target/clover/database/clover_cove ra > ge.db'. > clover: > > BUILD SUCCESSFUL > Total time: 23 seconds > > > Of interest is the fact that both clover:compile *and* clover:html-report > initialize the coverage database. As a result of the latter the report > indicates that there are no test cases at all. > On the other hand, if I do: > maven clover:test > maven clover:html-report > > then only the compile goal complains and I get the expected report output. > > > In the broken case it is as though the database hasn't been sync'd to the > filesystem and thus when html-report comes along it tries to open an empty > file... > Fixable? > > > Thanks, > James > > > > > -- > To unsubscribe, e-mail: <mailto:turbine-maven-user- > [EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:turbine-maven-user- > [EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
