{"action":"created","issue":{"url":"https://api.github.com/repos/mojohaus/wagon-maven-plugin/issues/4","repository_url":"https://api.github.com/repos/mojohaus/wagon-maven-plugin","labels_url":"https://api.github.com/repos/mojohaus/wagon-maven-plugin/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/mojohaus/wagon-maven-plugin/issues/4/comments","events_url":"https://api.github.com/repos/mojohaus/wagon-maven-plugin/issues/4/events","html_url":"https://github.com/mojohaus/wagon-maven-plugin/issues/4","id":179211381,"number":4,"title":"SshExec fails despite exit code 0 if stderr contains output","user":{"login":"kriegaex","id":1537384,"avatar_url":"https://avatars.githubusercontent.com/u/1537384?v=3","gravatar_id":"","url":"https://api.github.com/users/kriegaex","html_url":"https://github.com/kriegaex","followers_url":"https://api.github.com/users/kriegaex/followers","following_url":"https://api.github.com/users/kriegaex/following{/other_user}","gists_url":"https://api.github.com/users/kriegaex/gists{/gist_id}","starred_url":"https://api.github.com/users/kriegaex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kriegaex/subscriptions","organizations_url":"https://api.github.com/users/kriegaex/orgs","repos_url":"https://api.github.com/users/kriegaex/repos","events_url":"https://api.github.com/users/kriegaex/events{/privacy}","received_events_url":"https://api.github.com/users/kriegaex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-26T12:11:10Z","updated_at":"2016-10-29T01:24:45Z","closed_at":null,"body":"This fails just because echo writes something to stderr:\r\n\r\n```xml\r\n              <execution>\r\n                <id>exec-ssh-script</id>\r\n                <phase>install</phase>\r\n                <goals>\r\n                  <goal>sshexec</goal>\r\n                </goals>\r\n                <configuration>\r\n                  <url>${scp.url}</url>\r\n                  <commands>\r\n                    <command>echo \"Test 1\"</command>\r\n                    <command>echo \"Test 2\" &#62;&#38;2</command>\r\n                  </commands>\r\n                  <displayCommandOutputs>true</displayCommandOutputs>\r\n                </configuration>\r\n              </execution>\r\n```\r\n\r\nExpected behaviour: On exit code 0 no exception should be raised, no matter whether there is log output on stderr or not.\r\n\r\nI do not know the code base and have no idea how to implement Maven plugins or mojos, but is this somehow related to [this code snippet](https://github.com/apache/maven-wagon/blob/f3462c3f276b2449689eda1f52c3fa1f8e2177ae/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/jsch/AbstractJschWagon.java#L333) from Maven Wagon?\r\n\r\n```java\r\nif ( streams.getErr().length() > 0 && !ignoreFailures )\r\n{\r\n    int exitCode = channel.getExitStatus();\r\n    throw new CommandExecutionException( \"Exit code: \" + exitCode + \" - \" + streams.getErr() );\r\n}\r\n```\r\n\r\nI did not find anything like this in the mojo itself, but it has got to come from somewhere."},"comment":{"url":"https://api.github.com/repos/mojohaus/wagon-maven-plugin/issues/comments/257062459","html_url":"https://github.com/mojohaus/wagon-maven-plugin/issues/4#issuecomment-257062459","issue_url":"https://api.github.com/repos/mojohaus/wagon-maven-plugin/issues/4","id":257062459,"user":{"login":"dantran","id":705836,"avatar_url":"https://avatars.githubusercontent.com/u/705836?v=3","gravatar_id":"","url":"https://api.github.com/users/dantran","html_url":"https://github.com/dantran","followers_url":"https://api.github.com/users/dantran/followers","following_url":"https://api.github.com/users/dantran/following{/other_user}","gists_url":"https://api.github.com/users/dantran/gists{/gist_id}","starred_url":"https://api.github.com/users/dantran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantran/subscriptions","organizations_url":"https://api.github.com/users/dantran/orgs","repos_url":"https://api.github.com/users/dantran/repos","events_url":"https://api.github.com/users/dantran/events{/privacy}","received_events_url":"https://api.github.com/users/dantran/received_events","type":"User","site_admin":false},"created_at":"2016-10-29T01:24:45Z","updated_at":"2016-10-29T01:24:45Z","body":"filed https://issues.apache.org/jira/browse/WAGON-465"}}
{"actor":{"display_login":"dantran"}}