maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konrad Windszus <>
Subject Exchange data in memory between different mojo executions in different modules of the same plugin
Date Fri, 19 Aug 2016 15:11:44 GMT
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

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,
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message