首页 > 解决方案 > Surefire 2.22.0:java.lang.IllegalStateException:错误 [STOPPED] 读取进程

问题描述

When i execute unit tests i get this error from surefire plugin 
am using maven-surefire-plugin, jacoco plugin and junit 4.12. This is the plugins from my pom :
 

        <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.22.0</version>
                        <configuration>
                            <skipTests>${skipTests}</skipTests>
                            <forkCount>1</forkCount>
                            <reuseForks>false</reuseForks>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>org.apache.maven.surefire</groupId>
                                <artifactId>surefire-junit47</artifactId>
                                <version>2.21.0</version>
                            </dependency>
                        </dependencies>
                    </plugin>
     <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.7.7.201606060606</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
    # Created at 2020-10-28T17:58:53.813

System.exit() 或本机命令错误中断进程检查器。java.lang.IllegalStateException:错误 [STOPPED] 在 org.apache.maven.surefire.booter.PpidChecker.isProcessAlive( PpidChecker.java:116) 在 org.apache.maven.surefire.booter.ForkedBooter$2.run(ForkedBooter.java:213) 在 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 在 java。 util.concurrent.FutureTask.runAndReset(FutureTask.java:308) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)在 java.lang.Thread.run(Thread.java:748)

标签: junit4maven-surefire-pluginjacoco-maven-plugin

解决方案


推荐阅读