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: [email protected] For additional commands, e-mail: [email protected]
