我想用 cargo-maven2-plugin 部署我的 War,但它不像预期的那样工作。当我第一次部署时,它可以工作,但是当我第二次部署时,执行取消部署后出现错误。
org.apache.maven.lifecycle.LifecycleExecutionException: 无法执行目标 org.codehaus.cargo:cargo-maven2-plugin:1.7.16:redeploy (deploy) on project XXX-deploy: 目标 org.codehaus.cargo 的执行部署: cargo-maven2-plugin:1.7.16:重新部署失败:部署失败:null
这是我的代码:
<profile>
<id>payara-remote</id>
<activation>
<property>
<name>deployAll</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<configuration>
<properties>
<cargo.servlet.port>${servlet.port}</cargo.servlet.port>
</properties>
</configuration>
<deployables>
<deployable>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<type>war</type>
</deployable>
</deployables>
</configuration>
<executions>
<execution>
<id>deploy</id>
<phase>pre-integration-test</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
'''