in src/main/java/org/apache/maven/buildcache/MojoParametersListener.java [63:87]
public void beforeMojoExecution(MojoExecutionEvent event) {
final String executionKey = CacheUtils.mojoExecutionKey(event.getExecution());
LOGGER.debug(
"Starting mojo execution: {}, class: {}",
executionKey,
event.getMojo().getClass());
final MavenProject project = event.getProject();
CacheState cacheState = DISABLED;
boolean cacheIsDisabled = MavenProjectInput.isCacheDisabled(project);
if (!cacheIsDisabled) {
cacheState = cacheConfig.initialize();
}
LOGGER.debug("cacheState: {}", cacheState);
if (cacheState == INITIALIZED) {
Map<String, MojoExecutionEvent> projectEvents = projectExecutions.get(project);
if (projectEvents == null) {
Map<String, MojoExecutionEvent> candidate = new ConcurrentHashMap<>();
projectEvents = projectExecutions.putIfAbsent(project, candidate);
if (projectEvents == null) {
projectEvents = candidate;
}
}
projectEvents.put(executionKey, event);
}
}