Looking good:

http://maven.apache.org/ref/3.0.5/maven-core/xref/org/apache/maven/execution/MavenSession.html#73

private final Map<String, Map<String, Map<String, Object>>> pluginContextsByProjectAndPluginKey = new ConcurrentHashMap<String, Map<String, Map<String, Object>>>();


On Sun, 07 Apr 2013 18:21:55 +0200, Baptiste MATHUS <bmat...@batmat.net> wrote:

2013/4/7 Kristian Rosenvold <krosenv...@apache.org>

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.


Urgh, interesting and bad news.
This means the current ReserveListenerPortMojo is certainly not working for
what I improved it for, when used in different modules.
I guess I'll try do make some tests and get back here and maybe somewhere
in the docs to explain what I find.


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)


OK. But I really wanted to share this information between any execution in
the reactor of that Mojo, so I think I'll have to look for another
solution. That one should actually need synchronization I guess.



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 ?


Well, what I know is that we're currently working in my shops to get rid of
any m2 left in the hundreds of jenkins jobs still configured to use that
version, to upgrade to m3.
So my opinion would be to desupport anything older than 2.2.1 (or simply
anything that's not working in some m2 version but working fine in m3 or a more recent m2 version) but I'm still a rookie here so I won't consider my
opinion as considerable ;-).

Thanks for the insights!



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 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







--
Using Opera's revolutionary email client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to