Bug 55035 - Deploy ROOT webapp with version through text manager using Ant
Deploy ROOT webapp with version through text manager using Ant
Status: RESOLVED FIXED
Product: Tomcat 7
Classification: Unclassified
Component: Manager
7.0.40
PC All
: P2 major (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-05-31 16:05 UTC by Sergey Tcherednichenko
Modified: 2013-06-04 11:13 UTC (History)
1 user (show)



Attachments
Ant "deploy" task should also take "version" as a parameter, and can extend AbstractCatalinaCommandTask (659 bytes, patch)
2013-05-31 21:33 UTC, Sergey Tcherednichenko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Tcherednichenko 2013-05-31 16:05:20 UTC
Currently Ant "deploy" task does not support separate parameter "version" and, thanks to URLEncoder, there is no workaround for that.

But for apps with not empty context it's possible to define version using ##, like setting path to "/someContext#someVersion".

For apps with empty context we receive error:

Case #1:
<deploy url="{tomcat.manager}/text" username="${username}", password="${password}" path="/ROOT##12345" war="${pathtowar}" />

Result:
Failed to deploy application at context path /ROOT##12345

Case #1:
<deploy url="{tomcat.manager}/text" username="${username}", password="${password}" path="/##12345" war="${pathtowar}" />

Result:
Failed to deploy application at context path /##12345
Comment 1 Sergey Tcherednichenko 2013-05-31 21:33:07 UTC
Created attachment 30353 [details]
Ant "deploy" task should also take "version" as a parameter, and can extend AbstractCatalinaCommandTask

This patch makes DeployTask to extend AbstractCatalinaCommandTask, so path and version parameters are set uniformly ("version" parameter was missing in the deploy task, and usage like ${context}##{version} did not work fine for the root context).
Comment 2 Mark Thomas 2013-06-03 21:04:50 UTC
Thanks for the patch (it was inverted by the way). It has been applied to trunk and 7.0.x and will be included in 7.0.41 onwards.
Comment 3 Sergey Tcherednichenko 2013-06-04 11:08:28 UTC
thanks for including it to trunk :) and sorry for the problem with patch :)

though, this is a fix for ant task property "version", but the issue with using "/##someversion" path is not fixed by this patch. Should I create another issue, or maybe just call such usage as deprecated?
Comment 4 Mark Thomas 2013-06-04 11:13:00 UTC
I'd say treat using ##version in a path as deprecated / unsupported.