title: Jenkins Maven integration failed
body: <p>I am trying to integrate Jenkins with Maven. Through terminal I am able to execute the Maven command (<code>clean install</code>). But from Jenkins it fails.</p>
  
  <p>Getting following error:</p>
  
  <pre><code>   &lt;===[JENKINS REMOTING CAPACITY]===&gt;channel started
  Executing Maven:  -B -f /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/pom.xml clean install
  [INFO] Scanning for projects...
  [INFO] 
  [INFO] ------------------------------------------------------------------------
  [INFO] Building BrowserStackDemo 0.0.1-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ BrowserStackDemo ---
  [INFO] Deleting /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/target
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 3.090 s
  [INFO] Finished at: 2018-02-04T16:17:27+01:00
  [INFO] Final Memory: 11M/190M
  [INFO] ------------------------------------------------------------------------
  **[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project BrowserStackDemo:** Failed to clean project: Failed to delete /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/target/.DS_Store -&gt; [Help 1]
  [ERROR] 
  [JENKINS] Archiving /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/pom.xml to BrowserStack/BrowserStackDemo/0.0.1-SNAPSHOT/BrowserStackDemo-0.0.1-SNAPSHOT.pom
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/pom.xml is not inside /Users/Shared/Jenkins/Home/workspace/MavenJenkinsIntegration1/Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/; will archive in a separate pass
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  channel stopped
  Finished: FAILURE
  </code></pre>
  
  <p>Note:</p>
  
  <p>I am not using any server like Tomcat. My problem is not able to delete the <code>target</code> folder from Jenkins, when ever I taken a clean build, <code>target</code> folder will create newly, so I am unable to give the access for the <code>target</code> folder.</p>