{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments/110742410","pull_request_review_id":31936889,"id":110742410,"diff_hunk":"@@ -37,14 +37,26 @@ export function getMSDeployCmdArgs(webAppPackage: string, webAppName: string, pu\n         msDeployCmdArgs += \" -source:IisApp=\\'\" + webAppPackage + \"\\'\";\n         msDeployCmdArgs += \" -dest:iisApp=\\'\" + webApplicationDeploymentPath + \"\\'\";\n     }\n-    else {       \n-        msDeployCmdArgs += \" -source:package=\\'\" + webAppPackage + \"\\'\";\n-\n-        if(isParamFilePresentInPacakge) {\n-            msDeployCmdArgs += \" -dest:auto\";\n-        }\n-        else {\n-            msDeployCmdArgs += \" -dest:contentPath=\\'\" + webApplicationDeploymentPath + \"\\'\";\n+    else {\n+        if (webAppPackage && webAppPackage.toLowerCase().endsWith('.war')) {\n+            tl.debug('WAR: webAppPackage = ' + webAppPackage);\n+            let warFile = path.basename(webAppPackage.toLowerCase().slice(0, webAppPackage.length - '.war'.length));\n+            tl.debug('WAR: warFile = ' + warFile);\n+            warFile = (virtualApplication) ? warFile + \"/\" + virtualApplication + '.war' : warFile + '.war';\n+            tl.debug('WAR: warFile = ' + warFile);\n+            msDeployCmdArgs += \" -source:contentPath=\\'\" + webAppPackage + \"\\'\";\n+            // tomcat, jetty location on server => /site/webapps/\n+            tl.debug('WAR: dest = /site/webapps/' + warFile);\n+            msDeployCmdArgs += \" -dest:contentPath=\\'/site/webapps/\" + warFile + \"\\'\";\n+        } else {\n+            msDeployCmdArgs += \" -source:package=\\'\" + webAppPackage + \"\\'\";\n+\n+            if(isParamFilePresentInPacakge) {\n+                msDeployCmdArgs += \" -dest:auto\";\n+            }\n+            else {\n+                msDeployCmdArgs += \" -dest:contentPath=\\'\" + webApplicationDeploymentPath + \"\\'\";\n+            }","path":"Tasks/Common/webdeployment-common/msdeployutility.ts","position":31,"original_position":31,"commit_id":"42e386776b286d440c3e54aa4752d91fd9491e6e","original_commit_id":"42e386776b286d440c3e54aa4752d91fd9491e6e","user":{"login":"ericsciple","id":12102068,"avatar_url":"https://avatars2.githubusercontent.com/u/12102068?v=3","gravatar_id":"","url":"https://api.github.com/users/ericsciple","html_url":"https://github.com/ericsciple","followers_url":"https://api.github.com/users/ericsciple/followers","following_url":"https://api.github.com/users/ericsciple/following{/other_user}","gists_url":"https://api.github.com/users/ericsciple/gists{/gist_id}","starred_url":"https://api.github.com/users/ericsciple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericsciple/subscriptions","organizations_url":"https://api.github.com/users/ericsciple/orgs","repos_url":"https://api.github.com/users/ericsciple/repos","events_url":"https://api.github.com/users/ericsciple/events{/privacy}","received_events_url":"https://api.github.com/users/ericsciple/received_events","type":"User","site_admin":false},"body":"it would be great if one day this function returned an array since toolrunner handles escaping and the convention already set forth in this function is concat without escaping.","created_at":"2017-04-10T19:28:26Z","updated_at":"2017-04-10T19:28:26Z","html_url":"https://github.com/Microsoft/vsts-tasks/pull/3982#discussion_r110742410","pull_request_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/3982","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments/110742410"},"html":{"href":"https://github.com/Microsoft/vsts-tasks/pull/3982#discussion_r110742410"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/3982"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/3982","id":115170892,"html_url":"https://github.com/Microsoft/vsts-tasks/pull/3982","diff_url":"https://github.com/Microsoft/vsts-tasks/pull/3982.diff","patch_url":"https://github.com/Microsoft/vsts-tasks/pull/3982.patch","issue_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/3982","number":3982,"state":"open","locked":false,"title":"Change msdeploy utility so it can recognize WAR files","user":{"login":"jpricketMSFT","id":2790254,"avatar_url":"https://avatars1.githubusercontent.com/u/2790254?v=3","gravatar_id":"","url":"https://api.github.com/users/jpricketMSFT","html_url":"https://github.com/jpricketMSFT","followers_url":"https://api.github.com/users/jpricketMSFT/followers","following_url":"https://api.github.com/users/jpricketMSFT/following{/other_user}","gists_url":"https://api.github.com/users/jpricketMSFT/gists{/gist_id}","starred_url":"https://api.github.com/users/jpricketMSFT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpricketMSFT/subscriptions","organizations_url":"https://api.github.com/users/jpricketMSFT/orgs","repos_url":"https://api.github.com/users/jpricketMSFT/repos","events_url":"https://api.github.com/users/jpricketMSFT/events{/privacy}","received_events_url":"https://api.github.com/users/jpricketMSFT/received_events","type":"User","site_admin":false},"body":"Change msdeploy utility so it can recognize WAR files\r\n    - the .war extension failed previously so this minimal change should do no harm.\r\n    - updating the version number of AzureRMWebAppDeployment to force a rebuild that will include the changes made in the common folder.\r\n    - Later we will tackle the problem of transforming the files inside the WAR to allow for deployments to other environments. This change makes it easy to deploy from a build to one and only one environment.","created_at":"2017-04-10T19:11:36Z","updated_at":"2017-04-10T19:28:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24ada90b3b3a3d1c206472782f0b12462ad0a2d1","assignee":{"login":"DavidStaheli","id":1767415,"avatar_url":"https://avatars0.githubusercontent.com/u/1767415?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidStaheli","html_url":"https://github.com/DavidStaheli","followers_url":"https://api.github.com/users/DavidStaheli/followers","following_url":"https://api.github.com/users/DavidStaheli/following{/other_user}","gists_url":"https://api.github.com/users/DavidStaheli/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidStaheli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidStaheli/subscriptions","organizations_url":"https://api.github.com/users/DavidStaheli/orgs","repos_url":"https://api.github.com/users/DavidStaheli/repos","events_url":"https://api.github.com/users/DavidStaheli/events{/privacy}","received_events_url":"https://api.github.com/users/DavidStaheli/received_events","type":"User","site_admin":false},"assignees":[{"login":"DavidStaheli","id":1767415,"avatar_url":"https://avatars0.githubusercontent.com/u/1767415?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidStaheli","html_url":"https://github.com/DavidStaheli","followers_url":"https://api.github.com/users/DavidStaheli/followers","following_url":"https://api.github.com/users/DavidStaheli/following{/other_user}","gists_url":"https://api.github.com/users/DavidStaheli/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidStaheli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidStaheli/subscriptions","organizations_url":"https://api.github.com/users/DavidStaheli/orgs","repos_url":"https://api.github.com/users/DavidStaheli/repos","events_url":"https://api.github.com/users/DavidStaheli/events{/privacy}","received_events_url":"https://api.github.com/users/DavidStaheli/received_events","type":"User","site_admin":false},{"login":"kmkumaran","id":11780076,"avatar_url":"https://avatars1.githubusercontent.com/u/11780076?v=3","gravatar_id":"","url":"https://api.github.com/users/kmkumaran","html_url":"https://github.com/kmkumaran","followers_url":"https://api.github.com/users/kmkumaran/followers","following_url":"https://api.github.com/users/kmkumaran/following{/other_user}","gists_url":"https://api.github.com/users/kmkumaran/gists{/gist_id}","starred_url":"https://api.github.com/users/kmkumaran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmkumaran/subscriptions","organizations_url":"https://api.github.com/users/kmkumaran/orgs","repos_url":"https://api.github.com/users/kmkumaran/repos","events_url":"https://api.github.com/users/kmkumaran/events{/privacy}","received_events_url":"https://api.github.com/users/kmkumaran/received_events","type":"User","site_admin":false},{"login":"ericsciple","id":12102068,"avatar_url":"https://avatars2.githubusercontent.com/u/12102068?v=3","gravatar_id":"","url":"https://api.github.com/users/ericsciple","html_url":"https://github.com/ericsciple","followers_url":"https://api.github.com/users/ericsciple/followers","following_url":"https://api.github.com/users/ericsciple/following{/other_user}","gists_url":"https://api.github.com/users/ericsciple/gists{/gist_id}","starred_url":"https://api.github.com/users/ericsciple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericsciple/subscriptions","organizations_url":"https://api.github.com/users/ericsciple/orgs","repos_url":"https://api.github.com/users/ericsciple/repos","events_url":"https://api.github.com/users/ericsciple/events{/privacy}","received_events_url":"https://api.github.com/users/ericsciple/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/3982/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/3982/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/3982/comments","statuses_url":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/42e386776b286d440c3e54aa4752d91fd9491e6e","head":{"label":"Microsoft:users/jpricket/deploywar","ref":"users/jpricket/deploywar","sha":"42e386776b286d440c3e54aa4752d91fd9491e6e","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars1.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":27631673,"name":"vsts-tasks","full_name":"Microsoft/vsts-tasks","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars1.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vsts-tasks","description":"Build and Release Tasks for Visual Studio Team Services and Team Foundation Server","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-tasks","forks_url":"https://api.github.com/repos/Microsoft/vsts-tasks/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-tasks/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-tasks/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-tasks/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-tasks/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-tasks/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-tasks/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-tasks/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-tasks/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-tasks/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-tasks/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-tasks/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/deployments","created_at":"2014-12-06T11:11:46Z","updated_at":"2017-04-07T08:17:38Z","pushed_at":"2017-04-10T19:13:27Z","git_url":"git://github.com/Microsoft/vsts-tasks.git","ssh_url":"git@github.com:Microsoft/vsts-tasks.git","clone_url":"https://github.com/Microsoft/vsts-tasks.git","svn_url":"https://github.com/Microsoft/vsts-tasks","homepage":"https://aka.ms/tfbuild","size":27210,"stargazers_count":558,"watchers_count":558,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":490,"mirror_url":null,"open_issues_count":140,"forks":490,"open_issues":140,"watchers":558,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"7e515e081982ed1bbefe4573a72c2cc89c1d2eeb","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars1.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":27631673,"name":"vsts-tasks","full_name":"Microsoft/vsts-tasks","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars1.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vsts-tasks","description":"Build and Release Tasks for Visual Studio Team Services and Team Foundation Server","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-tasks","forks_url":"https://api.github.com/repos/Microsoft/vsts-tasks/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-tasks/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-tasks/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-tasks/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-tasks/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-tasks/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-tasks/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-tasks/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-tasks/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-tasks/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-tasks/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-tasks/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/deployments","created_at":"2014-12-06T11:11:46Z","updated_at":"2017-04-07T08:17:38Z","pushed_at":"2017-04-10T19:13:27Z","git_url":"git://github.com/Microsoft/vsts-tasks.git","ssh_url":"git@github.com:Microsoft/vsts-tasks.git","clone_url":"https://github.com/Microsoft/vsts-tasks.git","svn_url":"https://github.com/Microsoft/vsts-tasks","homepage":"https://aka.ms/tfbuild","size":27210,"stargazers_count":558,"watchers_count":558,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":490,"mirror_url":null,"open_issues_count":140,"forks":490,"open_issues":140,"watchers":558,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/3982"},"html":{"href":"https://github.com/Microsoft/vsts-tasks/pull/3982"},"issue":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/3982"},"comments":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/3982/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/3982/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/3982/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/42e386776b286d440c3e54aa4752d91fd9491e6e"}}}}
{"actor":{"display_login":"ericsciple"}}