The Apache CXF build will run out of PermGen space in Maven unless one allocates quite a bit of the stuff. I am trying to track this down.
CXF has a plugin for code generation. This plugin in some cases creates a class loader. The parent of that class loader is the current thread context class loader when maven executes it. While the plugin does not appear to hold any references in statics or fields, I have some initial evidence from yourkit that it is responsible for preventing some maven classloader(s) from being garbage collected. At least, in the snapshot at the point of oom, some things of its are conspicuous. Which leads me to wonder: is there a protocol for creating class loaders in maven plugins that this plugin is perhaps failing to respect? Are we supposed to always use something plexus-y instead of just creating a URLClassLoader?
