我试图使用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
之间进行选择。我在这里错过了一个特定的参数吗?home
zipurlinstaller
这是我的蚂蚁代码:
<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>