我正在尝试使用.bat文件在Apache Tomcat / 7.0.70上使用JVM版本1.7.0_80-b15和apache-ant-1.7.1进行自动部署。 但是,总是当我运行.bat文件时没有警告连续的消息出现
部署.war:Target'deploy.war '失败,消息为java.io.FileNotFoundException: http:// localhost:8080 / manager / deploy?path =%2Fportal2CA&config = C%3A%2FTeste%2FAPRO%2Fportal2CA.xml&war = C %3A%2FTeste%2FAPRO%2Fportal2CA.war&update = true '。
BUILD FAILED java.io.FileNotFoundException: http:// localhost:8080 / manager / deploy?path =%2Fportal2CA&config = C%3A%2FTeste%2FAPRO%2Fportal2CA.xml&war = C%3A%2FTeste%2FAPRO%2Fportal2CA.war&update = true
。蝙蝠
回声versao = 1.01
REM *****variables*****
SET APP-URL =“http:// localhost:8080 / portal2CA”SET MGR-URL =“http:// localhost:8080 / manager”SET MGR-USERNAME =“XX”SET MGR-PASSWORD =“XX”SET MGR -CONTEXT-PATH =“/ portal2CA”SET MGR-WAR-FILE =“C:/Teste/APRO/portal2CA.war”SET MGR-CONTEXT-DESCRIPTOR =“C:/Teste/APRO/portal2CA.xml”
调用ant -v -k -f instalar.xml -Dapp.url =%APP-URL%-Dmgr.url =%MGR-URL%-Dmgr.username =%MGR-USERNAME%-Dmgr.password =%MGR-PASSWORD %-Dmgr.context.path =%MGR-CONTEXT-PATH%-Dmgr.war.file =%MGR-WAR-FILE%-Dmgr.context.descriptor =%MGR-CONTEXT-DESCRIPTOR%
暂停
OBS:对于Set em .bat的参数抱歉,但我不想显示企业使用的名称,但path正确,我想知道如果在.bat脚本中缺less的东西。
.XML
(
<property name="versao" value="1.02" /> <!-- Configure the custom Ant tasks for the Manager application --> <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" /> <taskdef name="list" classname="org.apache.catalina.ant.ListTask" /> <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask" /> <taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask" /> <taskdef name="roles" classname="org.apache.catalina.ant.RolesTask" /> <taskdef name="start" classname="org.apache.catalina.ant.StartTask" /> <taskdef name="stop" classname="org.apache.catalina.ant.StopTask" /> <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask" /> <target name="deploy.war"> <deploy url="${mgr.url}" username="${mgr.username}" password="${mgr.password}" update="true" path="${mgr.context.path}" localWar="${mgr.war.file}" config="${mgr.context.descriptor}" /> </target>
)
对不起,编辑不好,我还是不知道如何去修补操作系统的工具
解决了,只需要在MRG-URL中添加一个“/ text”,在tomcat.users.xml中的angular色中添加一个“manager-script”