Hi,

In preparation to implementing the clover plugin for m2, I need to
understand what are the options WRT generated sources. Indeed clover
modifies the source files (.java files) and generate instrumented source
files.

I can see 2 options:

1/ Option 1: A mechanism similar to the Ant <javac> task where there is a
notion of pluggable compiler adapter. In that case I could write a
CloverCompilerAdapter.

2/ Option 2: Generate instrumented sources in target/ somewhere and somehow
convince the compile plugin to use those sources rather than the ones in
src/main/java.

Please note that I'd like to support the use case where main sources are
instrumented and they generate clover data either when the unit tests are
run or when functional tests are run or when a user manually brings up the
application to test it.

Also, I'd prefer that instrumented sources do not inadvertently find their
way in the release and thus I'd like to keep the 2 main source trees
separate (unmodified files and modified ones) so that running:

m2 clover:on test:test clover:report

and then:

m2 install

will still generate an install without instrumented sources. "clover:on"
could act as a trigger that says "use those generated sources instead of the
main runtime ones". I think this would fit option 1.

For option 2, it would be more like:

m2 clover:test clover:report

and then

m2 install

But this option seems less good because how do I get the WAR plugin to
incorporate instrumented sources (for example) so that functional tests can
be run?

Any advice for doing this in m2?

Thanks
-Vincent




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to