use of org.eclipse.aether.RepositoryEvent in project spf4j by zolyfarkas.
the class MavenRepositoryUtils method getRepositorySystemSession.
public static RepositorySystemSession getRepositorySystemSession(final RepositorySystem system, final File localRepoPath) {
DefaultRepositorySystemSession repositorySystemSession = MavenRepositorySystemUtils.newSession();
LocalRepository localRepository = new LocalRepository(localRepoPath);
repositorySystemSession.setLocalRepositoryManager(system.newLocalRepositoryManager(repositorySystemSession, localRepository));
repositorySystemSession.setRepositoryListener(new AbstractRepositoryListener() {
@Override
public void artifactDownloaded(final RepositoryEvent event) {
LOG.info("Downloaded artifact {}", event);
}
});
return repositorySystemSession;
}
Aggregations