summaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java b/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java
index 735e35e26..7d3a6ff9b 100644
--- a/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java
+++ b/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java
@@ -228,8 +228,16 @@ public class Maven2RepositoryMerger
FileOutputStream out = new FileOutputStream( targetFile );
FileInputStream input = new FileInputStream( sourceFile );
- // IOUtils internally buffers the streams
- IOUtils.copy( input, out );
+ // IOUtils internally buffers the streams
+ try
+ {
+ IOUtils.copy( input, out );
+ }
+ finally
+ {
+ out.close();
+ input.close();
+ }
}
private void updateProjectMetadata( File projectMetaDataFileIntargetRepo, ArtifactMetadata artifactMetadata,