优雅地停止maven exec插件启动的java程序
这与问题是一致的: 除了这与maven exec插件有关 我尝试了上面问题中提到的soultion,它使“maven进程插件”更具吸引力。 但是这个插件不支持提供类路径 我的pom.xml看起来像:优雅地停止maven exec插件启动的java程序,java,maven,maven-plugin,maven-exec-plugin,Java,Maven,Maven Plugin,Maven Exec Plugin,这与问题是一致的: 除了这与maven exec插件有关 我尝试了上面问题中提到的soultion,它使“maven进程插件”更具吸引力。 但是这个插件不支持提供类路径 我的pom.xml看起来像: <project> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId>
<project>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<execution>
<id>start the server for integration tests</id>
<phase>pre-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<classpathScope>test</classpathScope>
<async>true</async>
<asyncDestroyOnShutdown>true</asyncDestroyOnShutdown>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>com.abc.def.integration.Main</argument>
</arguments>
</configuration>
</execution>
<execution>
<phase>post-integration-test</phase>
<goals/>
</execution>
</plugin>
</plugins>
</build>
</project>
org.codehaus.mojo
有办法吗?如果要启动任何非守护进程线程,则需要在测试的执行后阶段停止它们。