マルチモジュール プロジェクトをビルドし、ビルドを maven で実行するときに角度のあるフロント エンドと Java バック エンドに対して統合テストを実行するために修正する必要がある最後の部分として、これに戻ってきました。
生成されたノード サーバーを強制終了するために最後に行うことは、ant 実行プラグインを使用してそれを強制終了することです (非常に簡単です!)。
とにかく、これが将来誰かを助けるかもしれないことを願っています:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>Run grunt integration-test task in pre-integration-test phase</id>
<phase>pre-integration-test</phase>
<configuration>
<target name="starting">
<echo>
</echo>
<exec executable="cmd" spawn="true" dir="${project.basedir}"
osfamily="windows">
<arg line="/c grunt int-test --no-color > grunt.status " />
</exec>
<exec executable="bash" spawn="true" dir="${project.basedir}"
osfamily="unix">
<arg line="grunt int-test --no-color > grunt.status" />
</exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>Kill NodeServer in post-integration-test phase</id>
<phase>post-integration-test</phase>
<configuration>
<target name="ending">
<echo>
</echo>
<exec executable="cmd" spawn="true" dir="${project.basedir}"
osfamily="windows">
<arg line="/c Taskkill /IM node.exe /F " />
</exec>
<exec executable="bash" spawn="true" dir="${project.basedir}"
osfamily="unix">
<arg line="kill -9 $(ps aux | grep '\snode\s' | awk '{print $2}')" />
</exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>