Reputation: 494
I'm using Tomcat 6.0.32 (with the new user management system (manager-gui, manager-script,...)), and I'm having some issues with the undeployment process using maven.
I keep getting this error:
[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:undeploy (default-cli) on project test: Cannot invoke Tomcat manager: <html>
The issues seems to be with the tomcat target. Currently on my pom.xml I have this:
<configuration>
<url>http://localhost:8080/manager/html</url>
<server>tomcat6</server>
<path>/test/*</path>
</configuration>
I've read some issues with targeting /html or /text, but at this point I don't really know how should it work. /html is working fine for deploying (while /text is not), but not for undeploy.
Any ideas?
Thanks!
Upvotes: 0
Views: 1969
Reputation: 101
I had the similar issue. Remote deployment via the tomcat plugin for Maven did not work properly.
Thus, after applying the suggested approach of Matt, I agree that Tomcat6 and Tomcat7 need different deployment-urls!
For Tomcat 6 it is:
http://%HOSTNAME%:8080/manager
For Tomcat 7 it is:
http://%HOSTNAME%:8080/manager/text
For sake of completeness, it is also important that the user (defined in %MAVEN_PATH%/conf/settings.xml
for the tomcat plugin) has the correct role (defined in %TOMCAT_PATH%/conf/tomcat-users.xml
). The user requires to have the manager-script role.
Upvotes: 1
Reputation: 795
I don't know if this is still an issue, but in the interest of making it easier for folks that find this thread through google, I had a similar issue.
My fix for tomcat6 was:
admin
and manager
roleshttp://localhost:8080/manager
(i.e. - no "html" or "text" for t6)I was using ant, though. But that being said, I think this will help for tomcat6 regardless of build tool.
Upvotes: 0
Reputation: 21
To get both the tomcat:undeploy and tomcat:deploy to work I just had to add the role 'manager-script' to tomcat's tomcat-users.xml
Using the '/manager/text' url, I'm finally able to run them both. Without the role, I was able to run deploy and redeploy.
Upvotes: 2
Reputation: 18405
As far as I can remember, the Manager App in Tomcat 7 in different to the previous one and the Tomcat Maven Plugin has no explicit support for. Check this instead.
Upvotes: 0