{"action":"created","issue":{"url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/212","labels_url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/212/comments","events_url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/212/events","html_url":"https://github.com/eirslett/frontend-maven-plugin/pull/212","id":74055480,"number":212,"title":"Run karma in the process-test-classes phase by default.","user":{"login":"pauxus","id":1023744,"avatar_url":"https://avatars.githubusercontent.com/u/1023744?v=3","gravatar_id":"","url":"https://api.github.com/users/pauxus","html_url":"https://github.com/pauxus","followers_url":"https://api.github.com/users/pauxus/followers","following_url":"https://api.github.com/users/pauxus/following{/other_user}","gists_url":"https://api.github.com/users/pauxus/gists{/gist_id}","starred_url":"https://api.github.com/users/pauxus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pauxus/subscriptions","organizations_url":"https://api.github.com/users/pauxus/orgs","repos_url":"https://api.github.com/users/pauxus/repos","events_url":"https://api.github.com/users/pauxus/events{/privacy}","received_events_url":"https://api.github.com/users/pauxus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-07T16:57:03Z","updated_at":"2015-05-11T12:33:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/pulls/212","html_url":"https://github.com/eirslett/frontend-maven-plugin/pull/212","diff_url":"https://github.com/eirslett/frontend-maven-plugin/pull/212.diff","patch_url":"https://github.com/eirslett/frontend-maven-plugin/pull/212.patch"},"body":"This is the last phase before test and allows karma to be run BEFORE maven-surefire-plugin in a war project.\r\n\r\nThat way, test results of karma (using a junit-reporter) can automatically be picked up by CI servers listening explicitly for the result of surefire (Jenkins and Hudson).\r\n\r\nOtherwise, karma would run after surefire, and when Jenkins reads test result, it would not get karma result."},"comment":{"url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/comments/100891750","html_url":"https://github.com/eirslett/frontend-maven-plugin/pull/212#issuecomment-100891750","issue_url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/212","id":100891750,"user":{"login":"pauxus","id":1023744,"avatar_url":"https://avatars.githubusercontent.com/u/1023744?v=3","gravatar_id":"","url":"https://api.github.com/users/pauxus","html_url":"https://github.com/pauxus","followers_url":"https://api.github.com/users/pauxus/followers","following_url":"https://api.github.com/users/pauxus/following{/other_user}","gists_url":"https://api.github.com/users/pauxus/gists{/gist_id}","starred_url":"https://api.github.com/users/pauxus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pauxus/subscriptions","organizations_url":"https://api.github.com/users/pauxus/orgs","repos_url":"https://api.github.com/users/pauxus/repos","events_url":"https://api.github.com/users/pauxus/events{/privacy}","received_events_url":"https://api.github.com/users/pauxus/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T12:33:39Z","updated_at":"2015-05-11T12:33:39Z","body":"A just double checked again (test environment, war project with frontend-plugin enabled), and no: it does not work, which matches the workings of the maven-plugin for Jenkins (SurefireArchiver.postExecute()):\r\n\r\n- SA runs after every executed mojo\r\n- first checks whether the current mojo is a test mojo (via the TestMojo enum)\r\n- if not, SA simply exits, which is what happens here\r\n  - If it IS a test mojo, SA checks if their are any new / unprocessed files in output folder and handles them\r\n\r\nI can't imagine why it CAN work in your setup.\r\n\r\nBy applying the PR, surefire is guaranteed to run after frontend, which also SA running for surefire to just pick up the result on the way.\r\n\r\nAn alternative would be to include frontend:karma in maven-plugin's TestMojo class, which would be the more complex approach, because frontend-plugin would have to propose a reportsDirectory (which does not make sense when not using the junit-reporter).\r\n"}}