You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Andreas Rudolf <ar...@gmx.com> on 2006/04/07 14:59:42 UTC

lifecycle configuration

Hi,

I develop a  plugin for emma and have a question about lifecycle
configuration.

I setup a custom lifecycle "emma" (just like the clover plugin). 

Here is it:

<lifecycles>
  <lifecycle>
    <id>emma</id>
    <phases>
      <phase>
        <id>process-classes</id>
        <executions>
          <execution>
            <goals>
              <goal>instr</goal>
            </goals>
          </execution>
        </executions>
      </phase>
      <phase>
        <id>test</id>
        <executions>
          <execution>
          	<configuration>
	<testFailureIgnore>true</testFailureIgnore>	
	<forkMode>pertest</forkMode>
	<classesDirectory>						    target/emma/data
	</classesDirectory>
	<systemProperties>
	  <property>
                 <name>emma.coverage.out.file</name>	
			<value>target/emma/coverage.ec</value>
	</property>

	<property>
					<name>emma.coverage.out.merge</name>
	<value>true</value>
	</property>
	</systemProperties>
	</configuration>			
           <goals>
             <goal>test</goal>
           </goals>
          </execution>
        </executions>
      </phase>      
    </phases>
  </lifecycle>
</lifecycles>

I call the test phase from my report mojo, but there must exist a test goal
inside of my plugin. But I don't want to write a new test goal. Want just to
use the existing surefire plugin with different configuration.

I take a look into clover plugin, but the author of this plugin use a
slightly different way with an additional compile step I think. But this is
not nessesary for emma.

I want it this way:
Emma lifecycle: compile-instrument-(modified)test-report


Is this possible ? If yes how can I configure the standard test in a custom
lifecycle?

Regards
        Andreas
--
View this message in context: http://www.nabble.com/lifecycle-configuration-t1411902.html#a3803140
Sent from the Maven - Dev forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: lifecycle configuration

Posted by Brett Porter <br...@apache.org>.
That doesn't sound right. I'm not sure what it looks like now - are you
using cobertura as an example?

- Brett

Andreas Rudolf wrote:
> Hi Brett,
> 
> Thank you for your advice. I tried it in this way with the result, that the
> classesDirectory for example is set for both phase. 
> 
> Is there no way to set the configuration especially for test phase only, or
> is it a bug?
> 
> Regards
>         Andreas
> --
> View this message in context: http://www.nabble.com/lifecycle-configuration-t1411902.html#a3858227
> Sent from the Maven - Dev forum at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: lifecycle configuration

Posted by Andreas Rudolf <ar...@gmx.com>.
Hi Brett,

Thank you for your advice. I tried it in this way with the result, that the
classesDirectory for example is set for both phase. 

Is there no way to set the configuration especially for test phase only, or
is it a bug?

Regards
        Andreas
--
View this message in context: http://www.nabble.com/lifecycle-configuration-t1411902.html#a3858227
Sent from the Maven - Dev forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: lifecycle configuration

Posted by Brett Porter <br...@apache.org>.
Leave out the executions on the test phase. See the cobertura plugin
instead - its closer to EMMA (I believe).

- Brett

Andreas Rudolf wrote:
> Hi,
> 
> I develop a  plugin for emma and have a question about lifecycle
> configuration.
> 
> I setup a custom lifecycle "emma" (just like the clover plugin). 
> 
> Here is it:
> 
> <lifecycles>
>   <lifecycle>
>     <id>emma</id>
>     <phases>
>       <phase>
>         <id>process-classes</id>
>         <executions>
>           <execution>
>             <goals>
>               <goal>instr</goal>
>             </goals>
>           </execution>
>         </executions>
>       </phase>
>       <phase>
>         <id>test</id>
>         <executions>
>           <execution>
>           	<configuration>
> 	<testFailureIgnore>true</testFailureIgnore>	
> 	<forkMode>pertest</forkMode>
> 	<classesDirectory>						    target/emma/data
> 	</classesDirectory>
> 	<systemProperties>
> 	  <property>
>                  <name>emma.coverage.out.file</name>	
> 			<value>target/emma/coverage.ec</value>
> 	</property>
> 
> 	<property>
> 					<name>emma.coverage.out.merge</name>
> 	<value>true</value>
> 	</property>
> 	</systemProperties>
> 	</configuration>			
>            <goals>
>              <goal>test</goal>
>            </goals>
>           </execution>
>         </executions>
>       </phase>      
>     </phases>
>   </lifecycle>
> </lifecycles>
> 
> I call the test phase from my report mojo, but there must exist a test goal
> inside of my plugin. But I don't want to write a new test goal. Want just to
> use the existing surefire plugin with different configuration.
> 
> I take a look into clover plugin, but the author of this plugin use a
> slightly different way with an additional compile step I think. But this is
> not nessesary for emma.
> 
> I want it this way:
> Emma lifecycle: compile-instrument-(modified)test-report
> 
> 
> Is this possible ? If yes how can I configure the standard test in a custom
> lifecycle?
> 
> Regards
>         Andreas
> --
> View this message in context: http://www.nabble.com/lifecycle-configuration-t1411902.html#a3803140
> Sent from the Maven - Dev forum at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org