2014-04-21 111 views
3

相同的部署在Windows和Linux上正常工作 - 但使用teamcity及其內置的maven我得到一個錯誤。本地部署並錯誤是:maven cargo部署到戰爭文件無法作爲teamcity的一部分部署

容器配置目錄 「/ BuildAgent /工作/ 68d4a71c8dc5cfd9 /目標/貨運/配置/ tomcat8x」 不存在。請在嘗試 執行任何本地部署之前配置容器。

POM的相關部分看起來是這樣的:

<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不同的事情?我在兩種環境中都使用相同版本的maven。

回答

2

當你在TeamCity之外的Linux機器上執行它時,你的部署是否工作? 是否正確定義了${env.CATALINA_HOME}

我的猜測是,${env.CATALINA_HOME}指向錯誤的地方

+0

還沒有機會還檢查這一點,但獎金對方式,它的這麼簡單。 – NimChimpsky

+0

@NimChimpsky你不能訪問拋出ssh到端點機器來檢查$ {env}變量的值嗎? – herau

+0

maven在teamcity之外工作正常。 – NimChimpsky