Description
For larger feature sets like for the ServiceMix Full distro, the number of file handles accumulated can exceed the OS defaults on some systems. The culprit seems to be that for every bundle a Maven ArtifactResolver is used to download that bundle and the file used during that process is not reclaimed until the goal finishes executing. I see the following in ServiceMix:
[INFO] Apache ServiceMix :: Features :: Assemblies :: Apache ServiceMix (Full) FAILURE [1:02.352s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27:03.531s
[INFO] Finished at: Tue Feb 21 18:07:56 UTC 2012
[INFO] Final Memory: 121M/554M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.karaf.tooling:features-maven-plugin:2.2.4:add-features-to-repo (add-features-to-repo) on project apache-servicemix-full: Error populating repository: /x1/asf/servicemix/smx4/features/trunk/assemblies/apache-servicemix-full/target/features-repo/org/eclipse/jetty/jetty-continuation/7.4.5.v20110725/jetty-continuation-7.4.5.v20110725.jar (Too many open files) -> [Help 1]
Attaching a simple fix shortly...