title: Build Maven -SNAPSHOT project in Jenkins
body: <p>I believe that the answer will be really easy, but I haven't figure out how to do it.</p>
  
  <p><strong>The problem is:</strong></p>
  
  <p>I have a third-party project, which is being cloned from github, so I'm not going to change anything there, but I need this project for my work with MUnit. </p>
  
  <p>The project is mule-interceptor-module and it has a version 3.4-M4-SNAPSHOT.</p>
  
  <p>I created a build in Jenkins and I want to get <strong><em>mule-interceptor-module-3.4-M4-SNAPSHOT.jar</em></strong> after it, but <strong>Jenkins REMOVES -SNAPSHOT from the jar name and updates pom.xml with new version: 3.4-M4 instead of 3.4-M4-SNAPSHOT</strong>. The project, which uses this one (munit) in its dependencies has 3.4-M4-SNAPSHOT. So I need the SNAPSHOT in version.</p>
  
  <p><strong>What I tried to do:</strong></p>
  
  <p>I tried to build the same project on the server, which my Jenkins is installed on, using just mvn clean install and I got mule-interceptor-module-3.4-M4-SNAPSHOT.jar.</p>
  
  <p><strong>The question is:</strong></p>
  
  <p><em>How to tune Jenkins so that I could finally have SNAPSHOT build?</em></p>
  
  <p><strong>My job setup:</strong></p>
  
  <ul>
  <li>JDK: jdk 1.6.0_45</li>
  <li><p>Source Code Management: </p>
  
  <ul>
  <li>Git</li>
  <li>Repository URL: <a href="https://github.com/mulesoft/mule-interceptor-module.git" rel="nofollow">https://github.com/mulesoft/mule-interceptor-module.git</a></li>
  <li>Branch Specifier (blank for default):3.4.x</li>
  <li>Repository browser: githubweb</li>
  <li>URL: <a href="https://github.com/mulesoft/mule-interceptor-module/" rel="nofollow">https://github.com/mulesoft/mule-interceptor-module/</a></li>
  </ul></li>
  <li><p>Pre Steps:</p>
  
  <ul>
  <li>Execute shell: git checkout 3.4.x</li>
  </ul></li>
  <li>Build: 
  <ul>
  <li>Root POM: pom.xml</li>
  <li>Goals and options: clean install</li>
  </ul></li>
  <li>Post steps: 
  <ul>
  <li>Run regardless of build result</li>
  </ul></li>
  <li>Build Settings: 
      - Publish Checkstyle analysis results
      - Publish FindBugs analysis results</li>
  </ul>
  
  <p><a href="https://www.dropbox.com/s/a6nrjmqkckttaj5/Jenkins%20Console%20Output.txt" rel="nofollow">Jenkins Console output</a>
  <a href="https://www.dropbox.com/s/7k6oikmtmfjexh0/Jenkins%20Console%20Output%20-X.txt" rel="nofollow">Jenkins Console output wirh -X</a></p>
  
  <p><strong>The solution:</strong></p>
  
  <ol>
  <li>in Jenkins /Configuration/Build/Advanced check in Use private Maven repository</li>
  <li>Choose Strategy: Local to the workspace</li>
  <li>remove everything from /workspace folder by <code>rm -R *</code></li>
  </ol>
  
  <p>@Grove: thanks you a lot for the support!</p>