I'm trying auto deploy war file to apache-tomcat-server(6.0.33) using tomcat-maven-plugin6, but on tomcat:deploy command, maven(3.5.1/1.5.1.xxx EclipseIDE-embedded) is trying to install to incorrect URL (localhost:8080/webapplication), I have seen similar Q&A here (1,2) but it's answers does not solved my problem. Please find more details below.
Settings.xml
<servers>
<server>
<id>localhost</id>
<username>admin</username>
<password>admin</password>
</server>
</servers>
pom.xml
<plugin>
<groupId> org.apache.tomcat.maven</groupId>
<artifactId>tomcat6-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<configuration>
<url>http://localhost:8080/manager</url>
<!-- <username>usr</username> <password>pwd</password> -->
<server>localhost</server>
<path>/datatest</path>
<warFile>target/service-manager.war</warFile>
</configuration>
</plugin>
Maven Console:
[INFO] <<< tomcat-maven-plugin:1.1:deploy (default-cli) @ service-manager <<<
[INFO]
[INFO] --- tomcat-maven-plugin:1.1:deploy (default-cli) @ service-manager ---
[INFO] Deploying war to http://localhost:8080/service-manager
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Data manager ...................................... SUCCESS [ 7.454 s]
[INFO] Business Manager .................................. SUCCESS [ 0.109 s]
[INFO] Core module ....................................... SUCCESS [ 6.699 s]
[INFO] Booter Application ................................ SUCCESS [ 1.016 s]
[INFO] Booter Service Webapp ............................. FAILURE [ 33.289 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 49.099 s
[INFO] Finished at: 2015-08-09T16:09:15+05:30
[INFO] Final Memory: 21M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:deploy (default-cli) on project service-manager: Cannot invoke Tomcat manager: Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/deploy?path=%2Fservice-manager&war= -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:deploy (default-cli) on project service-manager: Cannot invoke Tomcat manager