I'm Using Jenkins and Tomcat7. if i deploy a single war file in tomcat using Jenkins it's working fine. I tried to deploy multiple different war file in tomcat one by one. first war file was deployed successfully, after that i can't deploy another war file in same tomcat folder. But i want deploy multiple .war file of different application in single tomcat folder using Jenkins.
Is it possible to deploy multiple war file in tomcat using Jenkins? If it is yes means how can i achieve? OR any other way to solve this issue?
ERROR:
Caused by: org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: FAIL - Deployed application at context path /warttwo but context failed to start
答案 0 :(得分:1)
就我而言:
将所有war文件复制到一个文件夹(发布步骤下的执行shell )
mkdir -p战争
rm -f wars / *
mv app1 / target / app1.war wars /
mv app2 / target / app2.war wars /
在建造后动作部分
下的将战争/战争部署到集装箱下WAR / EAR文件:wars / *。war
上下文路径:[留空]
容器-> Tomcat URL:http://localhost:8080
然后,您可以访问http://localhost:8080/app1或http://localhost:8080/app2
注意:将战争/战争部署到容器中的凭据必须具有 manager-script 角色,以便可以将战争文件部署到您在tomcat中的 webapps 文件夹