diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java index a911d92746..0c1d93d264 100644 --- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java +++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java @@ -76,6 +76,7 @@ public class DefaultArtifactDeployer ArtifactMetadata metadata = (ArtifactMetadata) i.next(); repositoryMetadataManager.deploy( metadata, localRepository, deploymentRepository ); } + artifact.getMetadataList().clear(); } catch ( TransferFailedException e ) { diff --git a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java index 69a69a48ae..af0ed63e6c 100644 --- a/maven-artifact-manager/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java +++ b/maven-artifact-manager/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java @@ -75,6 +75,7 @@ public class DefaultArtifactInstaller ArtifactMetadata metadata = (ArtifactMetadata) i.next(); repositoryMetadataManager.install( metadata, localRepository ); } + artifact.getMetadataList().clear(); } catch ( IOException e ) {