[emma-maven-plugin] Allow generating reports outside the emma:emma goal
-----------------------------------------------------------------------

                 Key: MOJO-1299
                 URL: http://jira.codehaus.org/browse/MOJO-1299
             Project: Mojo
          Issue Type: Improvement
          Components: emma
            Reporter: Philippe Laflamme


Currently, the emma:emma goals generates the reports but also forces the 
execution of a test lifecycle. This is limiting for users not wanting to run 
the unit tests twice (once instrumented, once not instrumented). It may seem 
like a minor issue, but we have projects with hundreds of test cases. One 
execution takes several minutes to complete.

The suggested improvement is to add a "report" goal that would only convert the 
coverage.em file to a coverage.xml/index.html file (as necessary). This would 
allow configuring everything through the <build> section like so (example):

 <build>
    <plugins>     
      <plugin>      
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>emma-maven-plugin</artifactId>
        <version>1.0-alpha-1</version>
        <inherited>true</inherited>          
        <executions>
          <execution>
            <phase>process-classes</phase>               
            <goals>
              <goal>instrument</goal>
            </goals>
          </execution>
          <execution>
            <phase>verify</phase>               
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <inherited>true</inherited>
        <configuration>
          <forkMode>once</forkMode>
          <reportFormat>xml</reportFormat>
          
<classesDirectory>${project.build.directory}/generated-classes/emma/classes</classesDirectory>
    
        </configuration>        
      </plugin>
    </plugins>
 </build>

I can now obtain the coverage.xml file without executing the test cases twice.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to