title: The target deployment path '...' does not match the POM's expected path prefix
body: <p>I am trying to upload a <code>pom.xml</code> file to a Maven repository hosted on an Artifactory server. The <code>&lt;project&gt;</code> section of the <code>pom.xml</code> looks like this:</p>
  
  <pre><code>&lt;groupId&gt;com.x.y.z&lt;/groupId&gt;
  &lt;artifactId&gt;common&lt;/artifactId&gt;
  &lt;version&gt;2.3.0-RELEASE&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  </code></pre>
  
  <p>I am using the Artifactory plugin for Jenkins in a Pipeline script and here is the <code>uploadSpec</code></p>
  
  <pre class="lang-js prettyprint-override"><code>{
      "files": [
          {
              "pattern": "target/common-2.3.0-RELEASE.jar",
              "target": "REPOSITORY/com/x/y/z/common/2.3.0-RELEASE/common-2.3.0-RELEASE.jar"
          },
          {
              "pattern": "pom.xml",
              "target": "REPOSITORY/com/x/y/z/common/2.3.0-RELEASE/common-2.3.0-RELEASE.pom"
           }
       ]
   }
  </code></pre>
  
  <p>When I now try to upload the artifact, I'm getting the following error message:</p>
  
  <pre><code>java.io.IOException: Failed to deploy file. 
    Status code: 409 
    Response message: Artifactory returned the following errors: 
      The target deployment path 'com/x/y/z/common/2.3.0-RELEASE/common-2.3.0-RELEASE.pom' 
      does not match the POM's expected path prefix 'com/x/y/z/common/2.2.7'. 
      Please verify your POM content for correctness and make sure the source path is a valid Maven repository root path. Status code: 409
  </code></pre>
  
  <p>Before I upload the <code>RELEASE</code>, I upload a <code>SNAPSHOT</code> which (in this case) had the version 2.2.7-SNAPSHOT. After that I bump the version to <code>2.3.0</code>, re-build the project with <code>mvn clean install</code> and then start another upload to Artifactory. Somehow Artifactory still seems to expect the "old" version, when I try to upload the new version.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>When I upload the file with <code>curl</code>, everything works as expected:</p>
  
  <pre><code>curl -user:password-T pom.xml \
  "http://DOMAIN/artifactory/REPOSITORY/com/x/y/z/common/2.3.0-RELEASE/common-2.3.0-RELEASE.pom"
  </code></pre>
  
  <p>So it seems like this is related to the Jenkins Artifactory Plugin.</p>