title: How to stop Maven Execution
body: <p>I have a mock server which I need to start in Jenkins before  running my Automation tests and then stop the mock server after my tests have run.</p>
  
  <p>This mock server is a maven project and is using <code>exec-maven-plugin</code>. I am able to start this server by running the command <code>mvn exec:java</code>. However I am unable to stop this maven project through Jenkins. I have read about it and most answers tell to find the Process ID of this Maven project and then kill it. Is there a cleaner and easier way to stop this project ?</p>