[
http://jira.codehaus.org/browse/MOJO-1299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=168859#action_168859
]
Philippe Laflamme commented on MOJO-1299:
-----------------------------------------
My initial description wasn't very clear...
I agree with the solution of spliting the report generation from the test
coverage execution. In the end, that's what I was asking for.
The important bit I think is in the emma:report goal: it should only launch the
test cycle if at least one of the instrumented test classes or resource file is
more recent that the coverage.em or if there is no coverage.em file.
By having this behaviour, I can configure maven in a way that will solve my
use-case (ie: with the suggested pom.xml in the initial report). Although I
agree with your point of view about running test cases twice, maven shouldn't
be taking this decision for me :)
It could be its default behaviour, but not its one and only behaviour.
> [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
> Priority: Minor
>
> 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