Search code examples
maven-2coberturaemma

emma not generating reports but cobertura does?


basic reason to put the comparison question between these 2 is I am able to generate the reports in site directory(for cobertura) after putting the following plug in information in build section of my pom. But same would not happening with emma. I checked documentation in codehause mojo its almost same for both. My configuration is :

<plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>emma-maven-plugin</artifactId>
            <version>1.0-alpha-2</version>
            <executions>
                <execution>
                    <phase>process-classes</phase>
                    <goals>
                        <goal>emma</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

but it dont generate reports as expected in site directory but I can see coverage.em generated and classes instrumented every time. am I missing any configuration ?


Solution

  • this is really strange: corrected plugin entry is : see the output directory

    <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>emma-maven-plugin</artifactId>
                <version>1.0-alpha-2</version>
                <inherited>true</inherited>
                <executions>
                    <execution>
                        <id>emma</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>emma</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <outputDirectory>${project.build.directory}</outputDirectory>
                </configuration>
            </plugin>
    

    emma even does not accept ${project.build.directory}/emma.

    conclusion : emma not generated reports when you add any sub-directory to ${project.build.directory} e.g. ${project.build.directory}/emma-reports.