title: Maven deploy configs in pom.xml VS jenkins post-build action
body: <p>Actually I see two alternatives how can I deploy my project to NEXUS:</p>
  
  <ol>
  <li>Configure <code>distributionManagement</code> and <code>deploy-plugin</code> in  <code>pom.xml</code>. That in jenkins I should only call <code>mvn deploy</code> and my project will be deployed to the environment</li>
  <li>Create in Jenkins <code>Post-build Actions</code> -> <code>Deploy artifacts to maven repository</code>, where I can set <code>repository URL</code>, <code>repository ID</code> and so on</li>
  </ol>
  
  <p><em><strong>Question</em></strong></p>
  
  <p>What is pros and cons of each approach comparing with one another?</p>