1

我试图使用Cargo Ant 任务版本 1.0.6 将 WAR 文件部署到远程 Tomcat 服务器。据我从文档中可以看出,我必须将容器类型设置为remote并将配置类型设置为runtime. 但是,当我运行它时,我收到以下错误消息:

You must specify either a [home] attribute pointing to the location where the Tomcat 6.x Remote is installed, or a nested [zipurlinstaller] element

此错误消息对我来说不太有意义,因为我不想设置home(它位于不同的服务器上)并且我不想从 URL(zipurlinstaller)下载 Tomcat,因为我已经安装了服务器。我认为使用该类型可以避免在和remote之间进行选择。我在这里错过了一个特定的参数吗?homezipurlinstaller

这是我的蚂蚁代码:

<taskdef resource="cargo.tasks">
  <classpath>
    <pathelement location="${cargo-uberjar}"/>
    <pathelement location="${cargo-antjar}"/>
  </classpath>
</taskdef>

<target name="cargostart" depends="war">
  <cargo containerId="tomcat6x" type="remote" action="start" wait="false">
    <configuration type="runtime">
      <property name="cargo.tomcat.manager.url" value="http://someserver:8080/manager"/>
      <property name="cargo.remote.username" value="username"/>
      <property name="cargo.remote.password" value="password"/>
      <deployable type="war" file="${mywarfile}"/>
    </configuration>
  </cargo>
</target>
4

1 回答 1

0

长话短说 Cargo 1.0.6 版不支持通过 Ant 任务进行远程部署。但是,1.1.0 将支持它,它将在接下来的几周内发布。您在Cargo 用户邮件列表中阅读了有关此主题的讨论。Jira 票CARGO-962解决了这个问题。

于 2011-04-07T21:50:00.700 回答