将Maven货物部署到战争档案无法作为Teamcity的一部分进行部署 [英] maven cargo deploy to war file fails to deploy as part of teamcity
问题描述
相同的部署在Windows和Linux上都可以正常工作-但是使用teamcity及其内置的maven时出现错误.本地部署,错误为:
The same deployment works correctly on windows, and on linux - but using teamcity and its built in maven I get an error. Local deploys, and the error is :
容器配置目录 "/BuildAgent/work/68d4a71c8dc5cfd9/target/cargo/configurations/tomcat8x" 不存在.请先配置容器,然后再尝试 执行任何本地部署.
the container configuration directory "/BuildAgent/work/68d4a71c8dc5cfd9/target/cargo/configurations/tomcat8x" does not exist. Please configure the container before attempting to perform any local deployment.
pom的相关部分如下所示:
The relevant section of pom looks like this :
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.8</version>
<configuration>
<container>
<containerId>tomcat8x</containerId>
<home>${env.CATALINA_HOME}</home>
</container>
<configuration>
<type>existing</type>
<home>${env.CATALINA_HOME}</home>
</configuration>
<deployables>
<deployable>
<groupId>com.myapp</groupId>
<artifactId>ROOT</artifactId>
<type>war</type>
<properties>
<context>${project.build.finalName}</context>
</properties>
</deployable>
</deployables>
<deployer>
<type>installed</type>
</deployer>
</configuration>
</plugin>
我是否错过了ubuntu所需的pom部分? teamcity与香草专家有什么不同吗?我在两种环境中都使用相同版本的Maven.
Have I missed a section of the pom that is required for ubuntu ? Does teamcity do something different to vanilla maven ? I am using same version of maven in both environments.
推荐答案
在TeamCity以外的linux机器上执行部署工作时,您的部署工作是否可行?
${env.CATALINA_HOME}
定义正确吗?
Does your deploy work when you perform it on linux machine outside TeamCity?
Is ${env.CATALINA_HOME}
defined correctly?
我的猜测是${env.CATALINA_HOME}
指向错误的地方
My guess is that ${env.CATALINA_HOME}
is pointing to the wrong place
这篇关于将Maven货物部署到战争档案无法作为Teamcity的一部分进行部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!