* @throws MojoFailureException
* in case required artifacts are missing
*/
public RepositoryReferences getVisibleRepositories(MavenProject module, MavenSession session, int flags)
throws MojoExecutionException, MojoFailureException {
RepositoryReferences repositories = new RepositoryReferences();
if ((flags & REPOSITORIES_INCLUDE_CURRENT_MODULE) != 0) {
File publisherResults = new File(module.getBuild().getDirectory(), PUBLISHER_REPOSITORY_PATH);
repositories.addMetadataRepository(publisherResults);
repositories.addArtifactRepository(publisherResults);
}
addRepositoriesOfReferencedModules(repositories, module);
repositories.addArtifactRepository(RepositoryBlackboardKey.forResolutionContextArtifacts(module.getBasedir()));
// metadata and artifacts of target platform
File targetPlatform = materializeTargetPlatformRepository(module);
repositories.addMetadataRepository(targetPlatform);
repositories.addArtifactRepository(new File(session.getLocalRepository().getBasedir()));
return repositories;
}