Nitish Kulkarni
Nitish Kulkarni

Reputation: 31

Unable to redeploy the java application to tomcat7 using maven deployment

This is my 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

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

Upvotes: 2

Views: 1344

Answers (1)

Nitish Kulkarni
Nitish Kulkarni

Reputation: 31

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

Upvotes: 1

Related Questions