title: How to configure distinct distributionManagement repositories to plugins and libs?
body: <p>I'm trying to configure the distributionManagement section of a parent POM to enable the upload of libs and plugins to distinct Artifactory repositories, but maven 3 only supports one section of distributionManagement configuration.</p>
  
  <p>As I use differente repositories to download plugins and libs and it's not usable to create one parent POM to each type of artifact, is it possible to configure distinct repositories to let Artifactory, or simply maven, identify the type of artifact and deploy to the correct repository?</p>
  
  <p>Here is this current pom:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.ornanization&lt;/groupId&gt;
      &lt;artifactId&gt;corporative-parent&lt;/artifactId&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;distributionManagement&gt;
          &lt;repository&gt;
              &lt;id&gt;artifactoryRelease&lt;/id&gt;
              &lt;name&gt;artifactory-libs-releases&lt;name&gt;
              &lt;url&gt;${artifactory.url}/libs-release-local&lt;/url&gt;
          &lt;/repository&gt;
          &lt;snapshotRepository&gt;
              &lt;id&gt;artifactorySnapshot&lt;/id&gt;
              &lt;name&gt;artifactory-libs-snapshots&lt;/name&gt;
              &lt;url&gt;${artifactory.url}/libs-snapshot-local&lt;/url&gt;
          &lt;/snapshotRepository&gt;
      &lt;/distributionManagement&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>And this is the entry I'd like to add:</p>
  
  <pre><code>&lt;distributionManagement&gt;
      &lt;repository&gt;
          &lt;id&gt;artifactoryRelease&lt;/id&gt;
          &lt;name&gt;artifactory-plugins-releases&lt;/name&gt;
          &lt;url&gt;${artifactory.url}/plugins-release-local&lt;/url&gt;
      &lt;/repository&gt;
      &lt;snapshotRepository&gt;
          &lt;id&gt;artifactorySnapshot&lt;/id&gt;
          &lt;name&gt;artifactory-plugins-snapshots&lt;/name&gt;
          &lt;url&gt;${artifactory.url}/plugins-snapshot-local&lt;/url&gt;
      &lt;/snapshotRepository&gt;
  &lt;/distributionManagement&gt;
  </code></pre>
  
  <p>p.s.: as stated on <a href="http://www.jfrog.com/confluence/display/RTF/Working+with+Maven#WorkingwithMaven-SettingUpDistributionManagement" rel="nofollow">this page</a> of the Artifactory's User Guide, it's not possible to "deploy build artifacts to remote or virtual repositories" only to local repositories, so it's not possible to let Artifactory's layout management identify the artifact's type.</p>