From what i read on the maven site plugin, it forks the different
report plugins into separate lifecycles. So since both of the plugins require the test cases to be compiled, both lifecycles are going to have to compile them in there own lifecycles.
Not sure as I havent done much research on this yet, but what if the maven site plugin compiled the sources then ran the report plugins, neither of the plugins would need to compile the test sources then. Please correct me if im wrong. On 11/7/06, Craig McClanahan <[EMAIL PROTECTED]> wrote:
On 11/7/06, jp4 <[EMAIL PROTECTED]> wrote: > > > This seems like a big issue since our nightly builds usually run all of > our > unit and container test cases. If we have to run the tests twice, it will > almost double the build time which is already several hours. The Shale build also includes Cobertura (thanks to Wendy :-), and it only runs the second set of tests twice if you execute "site" ... if you execute only "install" it just does the normal one time. Is it required that your nightly builds generate the site? If it is, you might see if Maven has a command line option to suppress the "normal" test phase ... since you know the tests will be run anyway by the plugin. Before relying on this, though, I'd want to verify that a test failure during the Cobertura part actually does abort the build so you hear about them. Is there any way to instrument without invoking the test cases? It seems > like you would want to clean, compile, instrument, test, install create > site > docs. Has anyone found a workaround? The way that Cobertura works, it has to actually execute the tests (using the instrumented classes) in order to determine which code paths you've covered and which you haven't. Just instrumenting wouldn't accomplish much that is useful. Thanks, > > jp4 Craig Wendy Smoak-3 wrote: > > > > On 11/7/06, jp4 < [EMAIL PROTECTED]> wrote: > > > >> I removed the coberatura plugin and unit test cases run only once... > >> Here is > >> what I have in my pom > > ... > >> Any ideas? Looks like the test cases get run during instrumentation? > > > > I think it's normal based on Maven's current design. The tests are > > run once during the 'test' phase, then in order to produce the > > coverage report, the tests have to be re-run on the instrumented code. > > > > Take a look at this post from Vincent which talks about a similar > > issue with the Clover plugin: > > > http://www.nabble.com/-M2--My-tests-are-launched-3-times-%21-t2190279s177.html#a6075779 > > > > -- > > Wendy > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/mvn-site-running-test-cases-twice-tf2571386s177.html#a7226443 > Sent from the Maven - Users mailing list archive at Nabble.com<http://nabble.com/> . > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >