我想写一个maven profile
将运行cargo:run
goal
,将启动一个容器,等待用户按CTRL + C
停止运行。但是,当我运行mvn clean install -PstartApplication
时,该命令成功完成,无需等待。我错过了什么?执行货物:从一个Maven轮廓
<profile>
<id>startApplication</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<wait>true</wait>
<container>
<containerId>tomcat7x</containerId>
<type>installed</type>
<home>${catalina.home}</home>
</container>
<configuration>
<type>standalone</type>
<home>${project.basedir}/target/tomcat7x</home>
</configuration>
<deployables>
<deployable>
<properties>
<context>ROOT</context>
</properties>
<groupId>com.demo.web</groupId>
<artifactId>sample-web-app</artifactId>
<type>war</type>
</deployable>
</deployables>
<executions>
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</configuration>
</plugin>
</plugins>
</build>
</profile>