2013/4/7 Robert Scholte <codeh...@sourcegrounds.com> > With MavenSession.getPluginContext(**)[1] you can get any context, and as > you can see: the context is per project and per plugin. > If you need to share a pluginContext in a multimodule project, you _could_ > use the first project of a reactor-project, so every module uses a shared > context. > I haven't tried this with multiple threads, but it is interesting to > investigate. >
Thanks Robert, I'll try it and get back here. > > Robert > > [1] http://maven.apache.org/ref/3.**0.5/maven-core/apidocs/org/** > apache/maven/execution/**MavenSession.html#**getPluginContext(org.apache.* > *maven.plugin.descriptor.**PluginDescriptor<http://maven.apache.org/ref/3.0.5/maven-core/apidocs/org/apache/maven/execution/MavenSession.html#getPluginContext(org.apache.maven.plugin.descriptor.PluginDescriptor>, > org.apache.maven.project.**MavenProject) > > > > > On Sun, 07 Apr 2013 12:39:25 +0200, Kristian Rosenvold < > krosenv...@apache.org> wrote: > > The plugincontext always has me a bit confused; since if I remember >> correctly it is only shared between different invocations >> of the same plugin with a single module; it is not shared between >> modules in a multi-module build. >> >> Hence it is not really seen by different threads in concurrent maven >> and does not *really* need to be threadsafe. (I know this is a bit of >> a weak assumption in general but that's how things are) >> >> As for raising p-u, it might have some consequences in terms of how >> old maven versions can be supported; but are we supporting anything >> older than 2.2.1 these days ? >> >> >> Kristian >> >> >> 2013/4/6 Baptiste MATHUS <bmat...@batmat.net>: >> >>> Hi all, >>> >>> While I was thinking about marking templating-m-p, I realize I may have >>> added some non-threadsafe code inside the ReserveListenerPortMojo. >>> Reading >>> about that subject, I realized that build-helper-m-p might actually use >>> some >>> non threadsafe dependencies. >>> >>> I'll try some questions: >>> 1/ I had a look at the getPluginContext() documentation. I didn't see any >>> mention about thread safety. Does anyone know if this is a threadsafe >>> Map? >>> (getPluginContext().get() or getPluginContext().put() [btw, I think my >>> code'd need a synchronized lock anyway since I first get then maybe put, >>> which has nothing do with a potentially synchronized underlying Map]) >>> >>> 2/ Reading https://cwiki.apache.org/**MAVEN/parallel-builds-in-** >>> maven-3.html<https://cwiki.apache.org/MAVEN/parallel-builds-in-maven-3.html>I >>> see that for example plexus-utils is known to be *not threadsafe* until >>> 2.0.5. >>> But build-helper-m-p uses 1.5.8. Is is intended? >>> Shouldn't we upgrade to 2.0.5+ ? >>> >>> WDYT? >>> >>> Thanks >>> -- >>> Baptiste >>> >> >> ------------------------------**------------------------------**--------- >> To unsubscribe from this list, please visit: >> >> >> http://xircles.codehaus.org/**manage_email<http://xircles.codehaus.org/manage_email> >> >> >> > > -- > Using Opera's revolutionary email client: http://www.opera.com/mail/ > > > ------------------------------**------------------------------**--------- > To unsubscribe from this list, please visit: > > > http://xircles.codehaus.org/**manage_email<http://xircles.codehaus.org/manage_email> > > > -- Baptiste <Batmat> MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor !