进程以exec-maven-plugin块mvn验证开始

时间:2013-05-18 08:56:45

标签: process block exec-maven-plugin

我正在使用这样的exec-maven-plugin启动服务器:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>1.2.1</version>
    <executions>
        <execution>
            <id>start-server</id>
            <phase>pre-integration-test</phase>
            <goals>
                <goal>exec</goal>
            </goals>
            <configuration>
                <executable>java</executable>
                <arguments>
                    <argument>-classpath</argument>
                    <!-- automatically creates the classpath using all project dependencies, 
                        also adding the project build directory -->
                    <classpath />
                    <argument>MyGroup.MyServer.MyServerpjki</argument>
                    <argument>-batch</argument>
                    <argument>-port</argument>
                    <argument>1025</argument>
                </arguments>
            </configuration>
        </execution>
    </executions>
</plugin>

问题是在执行服务器进程后它停在那里。虽然它在exec-maven-plugin页面上显示“exec:exec在一个单独的进程中执行程序和Java程序”,但似乎该进程阻止了其他进程。

我能做些什么吗?我看到了Process spawned by exec-maven-plugin blocks the maven processMaven and Exec: forking a process?。这个问题是否有独立于平台的解决方案?

我还有一个问题:exec-maven-plugin再次关闭应用程序启动的最佳方法是什么?

0 个答案:

没有答案
相关问题