The very special test project with 7000 modules total and 4000 of them using
the plugin works fine - single classloader, single singleton inside SqlJet
library. The actual real-life project that has this issue has 100+ modules
with almost each module using the plugin and during the build of this
project there seems to be two classloaders, not 100+. So what do you mean by
"each plugin invocation"?
In both cases the plugin gav is configured only once in the top-level parent
pom.
It is not multiple classloaders per se that are problem, the problem is that
the second class loader does not see dependency/library classes that are
already initialized by the first class loader, and so it reloads and
initializes them for the second time.
-----Исходное сообщение-----
From: Stephen Connolly
Sent: Thursday, July 12, 2012 12:42 PM
To: Maven Users List
Subject: Re: problem: Maven creates the second plugin classloader during
parallel build and uses two classloader hierachies simultaneously
Each plugin invokation gets its own classloader as this is to allow for
different versions of the same plugin being used in a multi-module project,
also to allow for injecting different dependencies into a plugin.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org