protected Set < MavenProject > getExecutedModules ( MavenProject rootModule ) { String executionKey = createExecutionKey ( execution ) ; String executedModulesContextKey = AbstractProjectMojo . class . getName ( ) + "#executedModules" ; Map < String , Set < MavenProject > > executedProjectsPerExecutionKey = ( Map < String , Set < MavenProject > > ) rootModule . getContextValue ( executedModulesContextKey ) ; if ( executedProjectsPerExecutionKey == null ) { executedProjectsPerExecutionKey = new HashMap <> ( ) ; rootModule . setContextValue ( executedModulesContextKey , executedProjectsPerExecutionKey ) ; } Set < MavenProject > executedProjects = executedProjectsPerExecutionKey . get ( executionKey ) ; if ( executedProjects == null ) { executedProjects = new HashSet <> ( ) ; executedProjectsPerExecutionKey . put ( executionKey , executedProjects ) ; } return executedProjects ; }
Determine the already executed modules for a given root module .