Index: tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java
===================================================================
--- tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java	(revision 1291955)
+++ tooling/features-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AddFeaturesToRepoMojo.java	(working copy)
@@ -182,8 +182,17 @@
             List<Artifact> explicitRepoBundles = new ArrayList<Artifact>();
 
             getLog().info("Base repo: " + localRepo.getUrl());
+            int currentBundle = 0;
             for (String bundle : bundles) {
                 Artifact artifact = resourceToArtifact(bundle, skipNonMavenProtocols);
+
+                // Maven ArtifactResolver leaves file handles around so need to clean up
+                // or we will run out of file descriptors
+                if (currentBundle++ % 100 == 0) {
+                    System.gc();    
+                    System.runFinalization();                
+                }
+
                 if (artifact == null) {
                     continue;
                 }
