maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Fedorenko <>
Subject Re: core maven plugins and file handle leaks...
Date Thu, 30 Jan 2014 11:24:31 GMT
I think maven core uses variation of 2), where classloaders that
implement Closeable get closed [1]. I recommend doing the same in the
core plugins too. Anything more elaborate seems like a waste of effort
given the core will still leak file handles on java 6 and earlier and
the number of users on these earlier jvm is bound to go down.



On 1/30/2014, 3:38, James Nord (jnord) wrote:
> Hi All,
> 1.    I have discovered a few file handle leaks in core plugins  - which leads to random
build failures with large multi-module projects.
> Before I go and make & submit some changes I wanted to ask what's likely to be accepted
(in the case where this is classloader related[1]).
> 1)    Use JDK7 only and call URLClassLoader.close()
> 2)    Use reflection to do the same (would only fix the issue when run on JDK7+)
> 3)    Use reflection to access Oracle private methods in JDK<7 and generic in JDK7+
(would not work when run on non oracle JVMs <7)
> 4)    Write a custom Classloader (may not get all the securityManager aspects correct)
> 5)    Use someone elses ClassLoader (e.g eclipse - what licences are available to use
for deps in core plugins?)
> /James
> [1]

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message