title: jenkins not execute the last command after mvn command
body: <p>I configure my job as freestyle. And I need to run cases to a specified machine. MY project is maven project. I want to copy reports to master node after cases finish to run. </p>
  
  <p>Jenkins ver. 1.483</p>
  
  <p>I use pscp to copy files which works fine by hand in windows command prompt. 
  My command looks like:</p>
  
  <pre><code>mvn clean install -U
  pscp -P 22 -i pgrsa.ppk -r %SLAVE_JENKINS_HOME%\workspace\%JOB_NAME%\target\surefire-reports ci@master:%JENKINS_HOME%/workspace/%JOB_NAME%
  </code></pre>
  
  <p>The pscp seems not work. When I use command like this:</p>
  
  <pre><code>echo EchoCommand is working.===
  mvn clean install -U
  echo EchoCommand is working again.===
  </code></pre>
  
  <p><code>EchoCommand is working again.===</code>Not show at the output of the console while <code>EchoCommand is working.===</code> has been shown. Why? Anyone knows that?</p>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>C:\Tools\Jenkins\workspace\myproject-testng-sample-windows&gt;echo EchoCommand is working.=== 
  EchoCommand is working.===
  
  C:\Tools\Jenkins\workspace\myproject-testng-sample-windows&gt;mvn clean install -U 
  [INFO] Scanning for projects...
  [WARNING] 
  [WARNING] Some problems were encountered while building the effective model for com.pak.automation:myproject-testng-sample:jar:1.0.0-SNPASHOT
  [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin is missing. @ com.pak:pak-parent:2.0.0, C:\Users\pak\.m2\repository\com\pak\pak-parent\2.0.0\pak-parent-2.0.0.pom, line 484, column 12
  [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ com.pak:pak-parent:2.0.0, C:\Users\pak\.m2\repository\com\pak\pak-parent\2.0.0\pak-parent-2.0.0.pom, line 472, column 12
  [WARNING] 
  [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
  [WARNING] 
  [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
  [WARNING] 
  [INFO] 
  [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building myproject-testng-sample 1.0.0-SNPASHOT
  [INFO] ------------------------------------------------------------------------
  Downloading: http://mvn.pak.com/pakrepo/org/apache/maven/plugins/maven-source-plugin/maven-metadata.xml
  Downloading: http://mvn.pak.com/pak-releases/org/apache/maven/plugins/maven-source-plugin/maven-metadata.xml
  Downloading: http://mvn.pak.com/pak-snapshots/org/apache/maven/plugins/maven-source-plugin/maven-metadata.xml
  Downloading: http://mvn.pak.com/third-party/org/apache/maven/plugins/maven-source-plugin/maven-metadata.xml
  
  
  377/377 B   
  377/377 B   377/377 B   
  
  Downloaded: http://mvn.pak.com/third-party/org/apache/maven/plugins/maven-source-plugin/maven-metadata.xml (377 B at 1.5 KB/sec)
  
  Downloaded: http://mvn.pak.com/pakrepo/org/apache/maven/plugins/maven-source-plugin/maven-metadata.xml (377 B at 1.4 KB/sec)
  [INFO] 
  [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ myproject-testng-sample ---
  [INFO] Deleting C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\target
  [INFO] 
  [INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ myproject-testng-sample ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] skip non existing resourceDirectory C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\src\main\resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ myproject-testng-sample ---
  [INFO] No sources to compile
  [INFO] 
  [INFO] --- maven-resources-plugin:2.3:testResources (default-testResources) @ myproject-testng-sample ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] skip non existing resourceDirectory C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\src\test\resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ myproject-testng-sample ---
  [INFO] Compiling 4 source files to C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\target\test-classes
  [INFO] 
  [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ myproject-testng-sample ---
  [INFO] Surefire report directory: C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\target\surefire-reports
  
  -------------------------------------------------------
   T E S T S
  -------------------------------------------------------
  Running TestSuite
  Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@4d20a47e
  testMethod1
  testMethod2
  testMethodmyproject2
  testmyprojectSample
  testMethod1
  testMethod2
  testMethodmyproject2
  testmyprojectSample
  we wont run test with class name: com.pak.myproject.sample.NoInjectionTest
  we wont run test with class name: com.pak.myproject.sample.NoInjectionTest
  I am test method 2
  parameter in test method is: firstname
  Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.895 sec
  
  Results :
  
  Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
  
  [INFO] 
  [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ myproject-testng-sample ---
  [WARNING] JAR will be empty - no content was marked for inclusion!
  [INFO] Building jar: C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\target\myproject-testng-sample-1.0.0-SNPASHOT.jar
  [INFO] 
  [INFO] &gt;&gt;&gt; maven-source-plugin:2.1.1:jar (attach-sources) @ myproject-testng-sample &gt;&gt;&gt;
  [INFO] 
  [INFO] &lt;&lt;&lt; maven-source-plugin:2.1.1:jar (attach-sources) @ myproject-testng-sample &lt;&lt;&lt;
  [INFO] 
  [INFO] --- maven-source-plugin:2.1.1:jar (attach-sources) @ myproject-testng-sample ---
  [INFO] No sources in project. Archive not created.
  [INFO] 
  [INFO] --- maven-install-plugin:2.4:install (default-install) @ myproject-testng-sample ---
  [INFO] Installing C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\target\myproject-testng-sample-1.0.0-SNPASHOT.jar to C:\Users\pak\.m2\repository\com\pak\automation\myproject-testng-sample\1.0.0-SNPASHOT\myproject-testng-sample-1.0.0-SNPASHOT.jar
  [INFO] Installing C:\Tools\Jenkins\workspace\myproject-testng-sample-windows\pom.xml to C:\Users\pak\.m2\repository\com\pak\automation\myproject-testng-sample\1.0.0-SNPASHOT\myproject-testng-sample-1.0.0-SNPASHOT.pom
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 7.649 s
  [INFO] Finished at: 2014-04-08T13:19:58+08:00
  [INFO] Final Memory: 10M/24M
  [INFO] ------------------------------------------------------------------------
  Recording test results
  TestNG Reports Processing: START
  </code></pre>