Stephen,

        Agreed... it's a bit wacked to say the least but I've got to
basically do that to get ride of the 'optimized' source code, which has
the clover hooks in it - the compiled src / jar cannot be deployed to a
repository for production use as it has the clover 'hooks' in it.

Optimally, (using Hudson BTW) Hudson would have multiple "executions"
for a phase and that would make things easier but it would still result
in two lifecycle executions... something like:

1.  mvn verify -Pclover.optimize
2.  mvn clean deploy -Dmaven.tests.skip=true

Basically I'm trying to save time by using Clover's test optimization
but in the same 'build' on the CI server deploy a cloverLESS package.
Hudson doesn't provide for running maven "twice" (that I've seen) and so
I'm trying to see if I can get Maven to do it. Thinking more on it, it
does require two lifecycle runs in order to eliminate the src with the
clover hooks in it BEFORE deployment.

Thanks for the response.

Regards,

Randall

-----Original Message-----
From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] 
Sent: Monday, February 23, 2009 2:19 PM
To: Maven Users List
Cc: Maven Users List
Subject: Re: Disable/Enable tests per plugin/goal

wtf...

you do know running verify followed by deploy is running the lifecycle  
twice!

if you are using the freestyle project type (and _I_ do not recommend  
the m2 project type as it fecks with your pons behind your back) just  
run maven twice, problem solved

Sent from my [rhymes with myPod] ;-)

On 23 Feb 2009, at 21:08, "Randall Fidler"
<randall.fid...@testadvantage.com 
 > wrote:

> 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
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to