Emma运行时控制器没有启动

ilu*_*ilu 4 maven-2 code-coverage emma maven-plugin

我的主要目标是使用CTL coverage.get在正在运行的Web应用程序上使用EMMA获取代码覆盖率.我使用emma maven插件.

因此,我使用检测代码部署我的Web应用程序.
在tomcat日志中看到:

EMMA: collecting runtime coverage data ...
Run Code Online (Sandbox Code Playgroud)

但没有:

EMMA: runtime controller started on port [47653]
Run Code Online (Sandbox Code Playgroud)

这意味着我无法使用ctl,因为没有人在听它.
运行时控制器无法启动的原因是什么?

我的父pom.xml:

<project>
        ...
         <build>
            <plugins>
                ...
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                        <artifactId>emma-maven-plugin</artifactId>
                        <inherited>true</inherited>   
                        <executions>
                            <execution>
                                <id>instrument</id>
                                <phase>process-test-classes</phase>
                                <goals>
                                    <goal>instrument</goal>
                                </goals>
                            </execution>                            
                        </executions>
                </plugin>
                ...
            </plugins>
        </build>
        ... 
        <reporting>
            <plugins>        
                ...
                <plugin>      
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>emma-maven-plugin</artifactId>
                    <version>1.0-alpha-3</version>
                    <inherited>true</inherited>      
                </plugin>
                ...
            </plugins>
        </reporting>
        ...
    </project>
Run Code Online (Sandbox Code Playgroud)

提前致谢.任何提示都受到高度赞赏.

Ste*_*art 5

试试这个:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.10</version>
    <configuration>
         <systemPropertyVariables combine.children="append">
             <emma.rt.control>true|false</emma.rt.control>
         </systemPropertyVariables>
    </configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)

  • 谢谢斯图尔特.这帮助了我.我发现你也可以在mvn命令中添加`-Demma.rt.control = false`.例如`mvn emma:emma -Demma.rt.control = false` (4认同)