jira-importer commented on issue #502:
URL: 
https://github.com/apache/maven-deploy-plugin/issues/502#issuecomment-2771547005

   **[Martin 
Todorov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=carlspring)**
 commented
   
   In Maven 3.1-SNAPSHOT, the location of the affected code is in 
[DefaultWagonManager](https://svn.apache.org/repos/asf/maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java),
 more specifically in the block below:
   
   ```
   for ( ArtifactMetadata metadata : artifact.getMetadataList() )
   {
       if ( metadata instanceof ProjectArtifactMetadata )
       {
           org.sonatype.aether.artifact.Artifact pomArtifact = new SubArtifact( 
mainArtifact, "", "pom" );
           pomArtifact = pomArtifact.setFile( ( (ProjectArtifactMetadata) 
metadata ).getFile() );
           request.addArtifact( pomArtifact );
       }
       else if ( metadata instanceof SnapshotArtifactRepositoryMetadata
           || metadata instanceof ArtifactRepositoryMetadata )
       {
           // eaten, handled by repo system
       }
       else
       {
           request.addMetadata( new MetadataBridge( metadata ) );
       }
   }
   ```
   
   I believe the first if condition should check if the .pom file already 
exists on the remote server and not add it to deploy request. If I were to fix 
this, could somebody please advise on how to check this and whether using the 
Wagon's resourceExists(...) method is the correct way. (If so, an example of 
how to use it would be highly appreciated).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to