简体   繁体   English

Ant将WAR文件部署到tomcat服务器故障

[英]Ant deploy WAR file to tomcat server failure

I am having a little trouble getting my deployment task in ant to function. 在让我的部署任务能够正常运行时,我遇到了一些麻烦。 I have a war file that is generated as part of the build process, and I am now trying to autodeploy that to my test server. 我有一个在构建过程中生成的war文件,现在我试图将其自动部署到测试服务器。 In ant I have defined a deployment task as seen below. 在ant中,我定义了一个部署任务,如下所示。 When I try to run it I get a file not found error on the server in the catalina.out log file. 当我尝试运行它时,在catalina.out日志文件中的服务器上出现文件未找到错误。 Does anyone have any idea what I am doing wrong that is causing this deploy to not function? 有谁知道我做错了什么导致该部署无法正常工作? I have checked the path, and it is correct and the WAR file exists. 我已经检查了路径,它是正确的并且WAR文件存在。 Thanks 谢谢

username="${lamp.user}" username =“ $ {lamp.user}”

password="${lamp.password}" 密码=“ $ {lamp.password}”

update="true" update =“ true”

path="/beam" localWar="file:${module.beam.basedir}\\out\\war\\beam.war" /> path =“ / beam” localWar =“ file:$ {module.beam.basedir} \\ out \\ war \\ beam.war” />

Apparently this is caused by using localWar instead of war in the build target. 显然,这是由在构建目标中使用localWar而不是war引起的。 By replacing localWar with war it correctly deploys to the remote server. 通过用war替换localWar,它可以正确部署到远程服务器。 It appears that localWar would be used if ant is being run from the same machine as the tomcat server. 如果从与tomcat服务器相同的机器上运行ant,则似乎将使用localWar。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM