[英]Unable to redeploy the java application to tomcat7 using maven deployment
This is my pom.xml这是我的 pom.xml
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://192.168.10.42:8086/manager/html</url>
<server>TomcatServer</server>
<path>/MavenExample321</path>
<username>XXX</username>
<password>XXXXXX</password>
</configuration>
</plugin>
Am trying to redeploy the java application using maven using following command我正在尝试使用以下命令使用 maven 重新部署 java 应用程序
mvn tomcat7:redeploy
am able to deploy but unable to redeploy application to same path second time, its giving the following error我能够部署但无法第二次将应用程序重新部署到相同的路径,它给出了以下错误
[INFO] tomcatManager status code:200, ReasonPhrase:OK
[INFO] OK - Undeployed application at context path /MavenExample321
[INFO] FAIL - Failed to deploy application at context path /MavenExample321
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56.490s
[INFO] Finished at: Wed Nov 25 11:00:38 IST 2015
[INFO] Final Memory: 16M/183M
[INFO] ------------------------------------------------------------------------
Finally I found the solution.最后我找到了解决方案。
Use following update tag in configuration在配置中使用以下更新标签
<update>true</update>
and use the following command to undeploy last deployed application and redeploy the new war file with same name.并使用以下命令取消部署上次部署的应用程序并重新部署同名的新战争文件。
mvn clean tomcat:deploy
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.