title: maven Return code is: 409, ReasonPhrase: Conflict
body: <p>I have problem to deploy my multi-module python project with following structure</p>
  
  <pre><code>parent pom.xml # common pom for others project
  project/ 
     pom.xml # project pom
     common_features/
          sub-project-1/pom.xml # sub project 1 pom
          sub-project-2/pom.xml # sub project 2 pom
  </code></pre>
  
  <p>For deployment I use maven</p>
  
  <p><strong>Settings.xml</strong></p>
  
  <p>General maven setting use for build</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"&gt;
    &lt;!-- others options --&gt;
    &lt;servers&gt;
      &lt;server&gt;
        &lt;id&gt;artifacts-SNAPSHOTS&lt;/id&gt;
        &lt;username&gt;user&lt;/username&gt;
        &lt;password&gt;password&lt;/password&gt;
      &lt;/server&gt;
     &lt;/servers&gt;
    &lt;!-- others options --&gt;
  &lt;/settings&gt;
  </code></pre>
  
  <p><strong>parent pom.xml</strong> </p>
  
  <p>In this case we have the same URL for SNAPSHOT and RELEASE repository</p>
  
  <pre><code>&lt;!-- others options --&gt;
  &lt;groupId&gt;com.project.common.group.id&lt;/groupId&gt;
  &lt;artifactId&gt;project-pom&lt;/artifactId&gt;
  &lt;version&gt;0.0.1&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  
  &lt;!-- others options --&gt;
  &lt;distributionManagement&gt;
      &lt;repository&gt;
          &lt;id&gt;artifacts-RELEASES&lt;/id&gt;
          &lt;url&gt;${dist.repository.releases}&lt;/url&gt;
      &lt;/repository&gt;
      &lt;snapshotRepository&gt;
          &lt;id&gt;artifacts-SNAPSHOTS&lt;/id&gt;
          &lt;url&gt;${dist.repository.snapshots}&lt;/url&gt;
      &lt;/snapshotRepository&gt;
  &lt;/distributionManagement&gt;
  
  &lt;!-- others sections--&gt;
  &lt;properties&gt;
      &lt;dist.repository.releases&gt;${artifacts.repository.url}&lt;/dist.repository.releases&gt;
      &lt;dist.repository.snapshots&gt;${artifacts.repository.url}&lt;/dist.repository.snapshots&gt;
      &lt;artifacts.repository.url&gt;https://domain/artifactory/mvn-repo-dev&lt;/artifacts.repository.url&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p><strong>project pom.xml</strong></p>
  
  <p>There you can see that project consists two modules</p>
  
  <ul>
  <li>sub-project-1</li>
  <li>sub-project-2</li>
  </ul>
  
  <p>Parent is general parent. 
  Also I sue maven assembly plugin in order to deploy project into artifactory</p>
  
  <pre><code>&lt;!-- anothers options --&gt;
  &lt;parent&gt;
      &lt;groupId&gt;com.project.common.group.id&lt;/groupId&gt;
      &lt;artifactId&gt;project-pom&lt;/artifactId&gt;
      &lt;version&gt;0.0.1&lt;/version&gt;
  &lt;/parent&gt;
  
  &lt;groupId&gt;com.project.group.id&lt;/groupId&gt;
  &lt;artifactId&gt;project-pom&lt;/artifactId&gt;
  &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
  
  &lt;packaging&gt;pom&lt;/packaging&gt;
  
  &lt;modules&gt;
      &lt;module&gt;common_features/sub-project-1&lt;/module&gt;
      &lt;module&gt;common_features/sub-project-2&lt;/module&gt;
  &lt;/modules&gt;
  
  build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;appendAssemblyId&gt;false&lt;/appendAssemblyId&gt;
                  &lt;descriptors&gt;
                      &lt;descriptor&gt;deploy/artifact-description.xml&lt;/descriptor&gt;
                  &lt;/descriptors&gt;
                  &lt;tarLongFileMode&gt;posix&lt;/tarLongFileMode&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;single&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.jfrog.buildinfo&lt;/groupId&gt;
              &lt;artifactId&gt;artifactory-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.6.1&lt;/version&gt;
              &lt;inherited&gt;false&lt;/inherited&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;build-info&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;publish&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;publisher&gt;
                              &lt;contextUrl&gt;https://domain/artifactory&lt;/contextUrl&gt;
                              &lt;repoKey&gt;mvn-repo-dev&lt;/repoKey&gt;
                              &lt;snapshotRepoKey&gt;mvn-repo-dev&lt;/snapshotRepoKey&gt;
                              &lt;publishArtifacts&gt;true&lt;/publishArtifacts&gt;
                              &lt;publishBuildInfo&gt;true&lt;/publishBuildInfo&gt;
                              &lt;username&gt;deployUser&lt;/username&gt;
                              &lt;password&gt;deployPwd&lt;/password&gt;
                          &lt;/publisher&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
     
  
  <p><strong>artifact-description.xml</strong></p>
  
  <p>I want to deploy only some section therefore I define the following deployment file. With this I ensure that into package will be deploy only common features and project specific scripts/codes</p>
  
  <pre><code>&lt;assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-    plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"&gt;
      &lt;id&gt;${distributionId}&lt;/id&gt;
      &lt;formats&gt;
          &lt;format&gt;tar.gz&lt;/format&gt;
      &lt;/formats&gt;
      &lt;includeBaseDirectory&gt;false&lt;/includeBaseDirectory&gt;
      &lt;fileSets&gt;
          &lt;fileSet&gt;
              &lt;outputDirectory&gt;project/${subProjectName}/&lt;/outputDirectory&gt;
              &lt;directory&gt;${basedir}/..&lt;/directory&gt;
              &lt;fileMode&gt;0755&lt;/fileMode&gt;
              &lt;lineEnding&gt;unix&lt;/lineEnding&gt;
              &lt;includes&gt;
                  &lt;include&gt;/*.*&lt;/include&gt;
                  &lt;include&gt;/sub-${subProjectName}/*&lt;/include&gt;
              &lt;/includes&gt;
              &lt;excludes&gt;
                  &lt;exclude&gt;**/*.pyc&lt;/exclude&gt;
                  &lt;exclude&gt;**/*.xls&lt;/exclude&gt;
                  &lt;exclude&gt;**/*.xlsx&lt;/exclude&gt;
                  &lt;exclude&gt;**/pom.xml&lt;/exclude&gt;
                  &lt;exclude&gt;**/target&lt;/exclude&gt;
                  &lt;exclude&gt;**/deploy&lt;/exclude&gt;
                  &lt;exclude&gt;**/.venv&lt;/exclude&gt;
              &lt;/excludes&gt;
          &lt;/fileSet&gt;
      &lt;/fileSets&gt;
  &lt;/assembly&gt;
  </code></pre>
  
  <p><strong>sub-project-1 pom.xml</strong></p>
  
  <p>This is only simple pom without others plugins and build options</p>
  
  <pre><code>&lt;parent&gt;
      &lt;groupId&gt;com.project.group.id&lt;/groupId&gt;
      &lt;artifactId&gt;project-pom&lt;/artifactId&gt;
      &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
      &lt;relativePath&gt;../../pom.xml&lt;/relativePath&gt;
  &lt;/parent&gt;
  
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;groupId&gt;com.project.group.id&lt;/groupId&gt;
  &lt;artifactId&gt;sub-project-1&lt;/artifactId&gt;
  &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
  
  &lt;properties&gt;
      &lt;subProjectName&gt;project-1&lt;/subProjectName&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p><strong>sub-project-2 pom.xml</strong></p>
  
  <p>The same pom.xml as for sub-project-1</p>
  
  <pre><code>&lt;parent&gt;
      &lt;groupId&gt;com.project.group.id&lt;/groupId&gt;
      &lt;artifactId&gt;project-pom&lt;/artifactId&gt;
      &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
      &lt;relativePath&gt;../../pom.xml&lt;/relativePath&gt;
  &lt;/parent&gt;
  
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;groupId&gt;com.project.group.id&lt;/groupId&gt;
  &lt;artifactId&gt;sub-project-2&lt;/artifactId&gt;
  &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
  
  &lt;properties&gt;
      &lt;subProjectName&gt;project-2&lt;/subProjectName&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p>Now I want to build and upload only sub-project-1 it into artifactory and therefore I will use the following maven command:</p>
  
  <pre><code>mvn -e -B -U -X clean deploy --projects :sub-project-1 -DskipIntegrationTests=false -DskipCoverageReport=false
  </code></pre>
  
  <p>But then following error occur:</p>
  
  <pre><code>Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: https://domain/artifactory/mvn-repo-dev/com/project/group/id/project/project-1/1.0.0-SNAPSHOT/sub-project-1-1.0.0-20190723.081454-1.pom. Return code is: 409, ReasonPhrase: Conflict.
      at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:627)
      at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:541)
      at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:523)
      at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:517)
      at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:497)
      at org.eclipse.aether.transport.wagon.WagonTransporter$PutTaskRunner.run(WagonTransporter.java:644)
      at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427)
      at org.eclipse.aether.transport.wagon.WagonTransporter.put(WagonTransporter.java:410)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnector$PutTaskRunner.runTask(BasicRepositoryConnector.java:510)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
      ... 32 more
  </code></pre>
  
  <p>Now I am not sure what is wrong and I spend a lot of hours of investigation this issue but nothing found. Please do you have some suggestions what is wrong here? Thanks a lot</p>