You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Konrad Windszus <ko...@gmx.de> on 2016/08/19 15:11:44 UTC
Exchange data in memory between different mojo executions in different modules of the same plugin
To exchange data between several executions of my mojo I wanted to leverage AbstractMojo.getPluginContext(). Unfortunately although the map is being shared among multiple executions targeting the same project it is not shared among different projects in a multi-module build.
Which API can I leverage to share data between multiple mojo executions even across project borders?
The only way I could get that working was using MavenSession.getExecutionProperties(), but that was deprecated a long time ago and also that doesn't seem to be thread-safe (i.e. if the modules are built at the same time in different threads you run into issues, because multiple modules could get a different Properties object.
Any hints onto which object I could bind myself to share arbitrary Java objects among all mojo executions?
Maybe there is some existing Plexus Component (which is only instantiated once) which I could inject and which allows to write/read arbitrary objects from/to it.
Thanks for any help,
Konrad
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org