Hello,

 

            I'm looking into using a feature of Clover, test
optimization, and run into a tricky situation.  I would like to use the
test optimization to speed up build times on Hudson and the issue comes
in that Clover, as part of it's test optimization, puts hooks inside
your code.  This effectively means you cannot use any artifacts
generated during the test optimization process for deployment, which in
turn means the CI can't automatically deploy snapshots if Clover
optimization is on.

 

So, where's the Maven question?  Well what I'm trying to figure out is
can you, in one call, specify variables per plugin or even a profile per
plugin?  For example, I believe the following "could" work:

 

mvn verify -Pclover.optimize clean deploy

 

NOTE: the clover.optimize profile simply configures the clover2 plugin
to run the proper clover goals, it doesn't change any other behavior
with other plugins.

 

I say it could work IF tests were disabled for deploy.  If tests are not
disabled for deploy then what's the point of trying to optimize as all
the tests would be run anyhow - right?  This is where things get tricky,
I could just disable tests but then the clover plugin thinks it doesn't
have any work to do so my question is: is there a way with Maven to say
that tests are disabled for the deploy goal but NOT for the clover
portion?

 

I thought for a minute that    mvn verify -Pclover.optimize clean
package deploy might work but of course the default lifecycle is going
to run the test goal when deploy runs, which I can't disable - at least
not per goal/plugin that I've found.

 

Any advice is appreciated.

 

Regards,

 

Randall

Reply via email to