0

I'm trying to make use of a .bat file to do an automatic deployment on Apache Tomcat/7.0.70 with JVM Version 1.7.0_80-b15 and apache-ant-1.7.1. However always when I run the .bat file without warning a continuous message appears

deploy.war: Target 'deploy.war' failed with message '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

.bat

echo versao=1.01

REM ***** variable *****

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"

call 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%

pause

OBS: Sorry for the parameters of Set em .bat, but i dont want show the names that enterprise using, but the path its correct, I want to know if something is missing in the .bat script.

.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> 

)

Sorry for the bad editing, I still do not know how to tinker with the OS tools

1 Answer 1

0

Solved, there was only the need to in MRG-URL, at the end add a "/ text" and in tomcat.users.xml in roles, add a "manager-script"

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.