title: Infrastructure with maven, Jenkins, Nexus
body: <p>We are using maven. I want to set up infrastructure, so that automatically built artifacts would go to Nexus repository. And then they could be used by developers.</p>
  
  <p>I have already set up Jenkins with 1 job for our project.
  And I set up Nexus to on the same server.</p>
  
  <p>On developers' PCs I copied default maven setting to C:\Users{user}.m2\settings.xml
  adding this section.
  References:</p>
  
  <p><a href="http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html" rel="noreferrer">Configuring Maven to Use a Single Nexus</a></p>
  
  <p><a href="http://maven.apache.org/settings.html" rel="noreferrer">Maven Settings Reference</a> </p>
  
  <pre><code>&lt;mirror&gt;
    &lt;!--This sends everything else to /public --&gt;
    &lt;id&gt;nexus&lt;/id&gt;
    &lt;mirrorOf&gt;*&lt;/mirrorOf&gt;
    &lt;url&gt;http://myserver:8081/nexus/content/groups/public&lt;/url&gt;
  &lt;/mirror&gt;
  </code></pre>
  
  <p>(I just follow <a href="http://www.sonatype.com/books/nexus-book/reference/" rel="noreferrer">Repository Management with Nexus</a> book)</p>
  
  <p>What are my next steps should be?
  Should Jenkins job have <code>mvn install</code>? 
  How to create Nexus repository for company artifacts?</p>