{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments/77323445","id":77323445,"diff_hunk":"@@ -208,63 +207,58 @@ async function doWork() {\n \n         var ccTool = tl.getInput('codeCoverageTool');\n         var isCodeCoverageOpted = (typeof ccTool != \"undefined\" && ccTool && ccTool.toLowerCase() != 'none');\n-\n         var buildRootPath = path.dirname(antBuildFile);\n         var instrumentedClassesDirectory = path.join(buildRootPath, \"InstrumentedClasses\");\n-        //delete any previous cobertura instrumented classes as they might interfere with ant execution.\n-        tl.rmRF(instrumentedClassesDirectory, true);\n-\n-        if (isCodeCoverageOpted) {\n-            var summaryFile: string = null;\n-            var reportDirectory: string = null;\n-            var ccReportTask: string = null;\n-            var reportBuildFile: string = null;\n-            enableCodeCoverage();\n-        }\n-        else {\n-            tl.debug(\"Option to enable code coverage was not selected and is being skipped.\");\n-        }\n-\n+        var summaryFile: string = null;\n+        var reportDirectory: string = null;\n+        var ccReportTask: string = null;\n+        var reportBuildFile: string = null;\n         var publishJUnitResults = tl.getInput('publishJUnitResults');\n         var testResultsFiles = tl.getInput('testResultsFiles', true);\n \n-        await antv.exec();\n-\n-        var buffer;\n-        antb.on('stdout', (data) => {\n-            if (data) {\n-                buffer += data.toString();\n-\n-                let idx = buffer.indexOf(os.EOL);\n-                while (idx > -1) {\n-                    let line = buffer.substring(0, idx);\n-\n-                    processAntOutputLine(line);\n+        //delete any previous cobertura instrumented classes as they might interfere with ant execution.\n+        tl.rmRF(instrumentedClassesDirectory, true);\n \n-                    buffer = buffer.substring(idx + os.EOL.length);\n-                    idx = buffer.indexOf(os.EOL);\n+        enableCodeCoverage().then(function (resp) {\n+            ccReportTask = \"CodeCoverage_9064e1d0\";\n+            tl.debug(\"Enabled code coverage successfully: \" + ccReportTask);\n+        }).catch(function (err) {\n+            tl.warning(\"Failed to enable code coverage: \" + err);\n+        }).fin(function () {\n+\n+            //antv.exec();","path":"Tasks/ANT/anttask.ts","position":106,"original_position":106,"commit_id":"2880c459c58d6567a76bf89da0e619077ebbc7e2","original_commit_id":"2880c459c58d6567a76bf89da0e619077ebbc7e2","user":{"login":"acesiddhu","id":1168823,"avatar_url":"https://avatars.githubusercontent.com/u/1168823?v=3","gravatar_id":"","url":"https://api.github.com/users/acesiddhu","html_url":"https://github.com/acesiddhu","followers_url":"https://api.github.com/users/acesiddhu/followers","following_url":"https://api.github.com/users/acesiddhu/following{/other_user}","gists_url":"https://api.github.com/users/acesiddhu/gists{/gist_id}","starred_url":"https://api.github.com/users/acesiddhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acesiddhu/subscriptions","organizations_url":"https://api.github.com/users/acesiddhu/orgs","repos_url":"https://api.github.com/users/acesiddhu/repos","events_url":"https://api.github.com/users/acesiddhu/events{/privacy}","received_events_url":"https://api.github.com/users/acesiddhu/received_events","type":"User","site_admin":false},"body":"remove ","created_at":"2016-09-02T10:07:58Z","updated_at":"2016-09-02T10:07:58Z","html_url":"https://github.com/Microsoft/vsts-tasks/pull/2402#discussion_r77323445","pull_request_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2402","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments/77323445"},"html":{"href":"https://github.com/Microsoft/vsts-tasks/pull/2402#discussion_r77323445"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2402"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2402","id":83749186,"html_url":"https://github.com/Microsoft/vsts-tasks/pull/2402","diff_url":"https://github.com/Microsoft/vsts-tasks/pull/2402.diff","patch_url":"https://github.com/Microsoft/vsts-tasks/pull/2402.patch","issue_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2402","number":2402,"state":"open","locked":false,"title":"Initial commit - Tools for enabling code coverage for Java tasks","user":{"login":"nigurr","id":15208679,"avatar_url":"https://avatars.githubusercontent.com/u/15208679?v=3","gravatar_id":"","url":"https://api.github.com/users/nigurr","html_url":"https://github.com/nigurr","followers_url":"https://api.github.com/users/nigurr/followers","following_url":"https://api.github.com/users/nigurr/following{/other_user}","gists_url":"https://api.github.com/users/nigurr/gists{/gist_id}","starred_url":"https://api.github.com/users/nigurr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nigurr/subscriptions","organizations_url":"https://api.github.com/users/nigurr/orgs","repos_url":"https://api.github.com/users/nigurr/repos","events_url":"https://api.github.com/users/nigurr/events{/privacy}","received_events_url":"https://api.github.com/users/nigurr/received_events","type":"User","site_admin":false},"body":"* Tests to be written\r\n* Little refactoring left\r\n* Logging should be added\r\n\r\nFunctionality wise - closed","created_at":"2016-09-02T05:57:44Z","updated_at":"2016-09-02T10:07:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e87ad57ab782cdcf1e4d3aba9fd32b707e437785","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2402/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2402/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/2402/comments","statuses_url":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/2880c459c58d6567a76bf89da0e619077ebbc7e2","head":{"label":"Microsoft:users/nigurr/EnableJavaCodeCoverageSync","ref":"users/nigurr/EnableJavaCodeCoverageSync","sha":"2880c459c58d6567a76bf89da0e619077ebbc7e2","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.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://avatars.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":"2016-09-02T09:28:35Z","pushed_at":"2016-09-02T09:53:02Z","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":19074,"stargazers_count":394,"watchers_count":394,"language":"PowerShell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":352,"mirror_url":null,"open_issues_count":112,"forks":352,"open_issues":112,"watchers":394,"default_branch":"master"}},"base":{"label":"Microsoft:releases/m105","ref":"releases/m105","sha":"714c138e0a3aab5919b258f2a9242177b50d7540","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.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://avatars.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":"2016-09-02T09:28:35Z","pushed_at":"2016-09-02T09:53:02Z","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":19074,"stargazers_count":394,"watchers_count":394,"language":"PowerShell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":352,"mirror_url":null,"open_issues_count":112,"forks":352,"open_issues":112,"watchers":394,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2402"},"html":{"href":"https://github.com/Microsoft/vsts-tasks/pull/2402"},"issue":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2402"},"comments":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2402/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/2402/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/2402/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/2880c459c58d6567a76bf89da0e619077ebbc7e2"}}}}
{"actor":{"display_login":"acesiddhu"}}