When I run maven task for (re)deploy, the file is always being uploaded twice. I think the problem is related to manager path.
In front of Tomcat there is a Apache server (from security reasons), which redirects requests from /manager-server-app to /manager on Tomcat server. Plugin should deal with it.
[INFO] Deploying war to http: Uploading: http: Uploaded: http:28.8.2013 8:44:35 org.apache.http.client.protocol.ResponseProcessCookies processCookies
WARNING: Cookie rejected: "[version: 0][name: JSESSIONID][value: 7ACBBD27F97F86C3477C988006B02073][domain: 192.168.191.83][path: /manager][expiry: null]". Illegal path attribute "/manager". Path of origin: "/server-app
Uploading: http:Uploaded: http:
After second automatic upload it's deployed successfully.
The htaccess file content:
RewriteRule ^manager-server-app/(.*)$ ajp:RewriteRule ^manager-server-app$ /manager/ [L,R]