You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Benson Margulies <bi...@gmail.com> on 2010/11/20 22:32:54 UTC

Classloaders in plugins

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?

I have some other leads to purely CXF reasons for this problem.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Classloaders in plugins

Posted by Benjamin Bentmann <be...@udo.edu>.
Benson Margulies wrote:

> Are we supposed to always use something plexus-y instead of
> just creating a URLClassLoader?

No.


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org