From: Elliotte H. <el...@me...> - 2005-09-20 13:10:54
|
I've managed to verify that the problem with the Cobertura plugin for Maven is that the classpath is not pointing to the right directories. This is controlled by the properties maven.build.dest and maven.test.dest. These are set correctly in the cobertura plugin.jelly, but the test plugin does not pick up these values. that is, these lines fail silently: <maven:set plugin="maven-java-plugin" property="maven.build.dest" value="${instrumented}"/> <maven:set plugin="maven-test-plugin" property="maven.build.dest" value="${instrumented}"/> <maven:set plugin="maven-test-plugin" property="maven.test.dest" value="${instrumented}"/> <maven:set plugin="maven-java-plugin" property="maven.test.dest" value="${instrumented}"/> The following info from the maven documentation may or may not have something to do with this: "As you will have seen many plugins have their own properties. You can set these values in the current project before the plugin is initialised, and they will be recognised. However, once it is initialised, setting them in the current project will have no effect, and changes made within the plugin are not visible to the current project." Does this help anyone see what's wrong? When would the test plugin be initialized? Also, the cobertura plugin attempts to store the old values of maven.build.dest and maven.test.dest, change them to the instrumented directory, run the tests, then restore the old values of maven.build.dest and maven.test.dest. is there any way this can work? -- Elliotte Rusty Harold el...@me... XML in a Nutshell 3rd Edition Just Published! http://www.cafeconleche.org/books/xian3/ http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim |