2

次のように 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 が maven プロセスをブロックし、 Maven と Exec: forking a process? . この問題に対するプラットフォームに依存しない解決策はありますか?

追加の質問もあります: アプリケーションの startet を exec-maven-plugin で再び閉じるにはどうすればよいですか?

4

0 に答える 0