[ 
http://jira.codehaus.org/browse/MTOMCAT-68?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=259897#action_259897
 ] 

Maxime Gréau commented on MTOMCAT-68:
-------------------------------------

Hi,

I don't think this is exactly the good way to configure tomcat-maven-plugin for 
Tomcat 7 and there is the same problem with Tomcat 6.0.29+.

I explain my point of view. To sum up, I think the URL containing the key word  
"html" is for users, I mean when you get access to Tomcat manager with a 
browser. That's not for  the plugin. The main difference is only in the HTTP 
content response which is analysed by the plugin to determine if the goal was 
succeed. In one case, the HTTP content response contains HTML code with text, 
in the other case it contains only text.

The second thing  is that Tomcat roles are different if you choose one URL or 
an other, so :

* For Apache Tomcat 6.0.29+ :
-----------------------------
Tomcat manager URLs are :
- http://localhost:8080/manager/html -> role : manager-gui 
(conf/tomcat-users.xml)
- http://localhost:8080/manager -> role : manager-script (conf/tomcat-users.xml)

In your POM, let the default conf but don't forget to update tomcat user/role 
in tomcat-users.xml and settings.xml. 
If you use http://localhost:8080/manager/html, the tomcat:deploy mojo is OK but 
not tomcat:stop, tomcat:start, tomcat:undeploy... because of the HTTP response 
starts with "<html><head>...." but Mojos are waiting for "OK -".


* For Apache Tomcat 7 :
-----------------------------
Tomcat manager URLs are :
- http://localhost:8080/manager/html -> role : manager-gui 
(conf/tomcat-users.xml)
- http://localhost:8080/manager/text -> role : manager-script 
(conf/tomcat-users.xml)

In your POM, you have to override the default URL. You can use the property 
tomcat.url like that :

<properties>
        <maven.tomcat.url>http://localhost:8080/manager/text</maven.tomcat.url>
</properties>

And don't forget to update tomcat user/role in tomcat-users.xml and 
settings.xml.

I have tested this conf with Tomcat 6.0.32 and 7.0.11.
Regards. 

> document how to deploy war to tomcat 7 
> ---------------------------------------
>
>                 Key: MTOMCAT-68
>                 URL: http://jira.codehaus.org/browse/MTOMCAT-68
>             Project: Maven 2.x Tomcat Plugin
>          Issue Type: Wish
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>             Fix For: 1.2
>
>         Attachments: MTOMCAT-68.patch
>
>
> add a page with content of 
> http://www.jroller.com/Fabszn/entry/tomcat_7_et_le_plugin but in english :-)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to