Search in sources :

Example 1 with RepositoryReader

use of org.eclipse.tycho.p2.repository.RepositoryReader in project tycho by eclipse.

the class P2ResolverFactoryImpl method getLocalArtifactRepository.

private static synchronized LocalArtifactRepository getLocalArtifactRepository(MavenContext mavenContext, LocalRepositoryP2Indices localRepoIndices) {
    if (localArtifactRepository == null) {
        RepositoryReader contentLocator = new LocalRepositoryReader(mavenContext.getLocalRepositoryRoot());
        localArtifactRepository = new LocalArtifactRepository(localRepoIndices, contentLocator);
    }
    return localArtifactRepository;
}
Also used : LocalArtifactRepository(org.eclipse.tycho.repository.local.LocalArtifactRepository) LocalRepositoryReader(org.eclipse.tycho.p2.repository.LocalRepositoryReader) LocalRepositoryReader(org.eclipse.tycho.p2.repository.LocalRepositoryReader) RepositoryReader(org.eclipse.tycho.p2.repository.RepositoryReader)

Example 2 with RepositoryReader

use of org.eclipse.tycho.p2.repository.RepositoryReader in project tycho by eclipse.

the class P2ResolverFactoryImpl method getLocalMetadataRepository.

private static synchronized LocalMetadataRepository getLocalMetadataRepository(MavenContext context, LocalRepositoryP2Indices localRepoIndices) {
    if (localMetadataRepository == null) {
        File localMavenRepoRoot = context.getLocalRepositoryRoot();
        RepositoryReader contentLocator = new LocalRepositoryReader(localMavenRepoRoot);
        localMetadataRepository = new LocalMetadataRepository(localMavenRepoRoot.toURI(), localRepoIndices.getMetadataIndex(), contentLocator);
    }
    return localMetadataRepository;
}
Also used : LocalRepositoryReader(org.eclipse.tycho.p2.repository.LocalRepositoryReader) LocalMetadataRepository(org.eclipse.tycho.repository.local.LocalMetadataRepository) File(java.io.File) LocalRepositoryReader(org.eclipse.tycho.p2.repository.LocalRepositoryReader) RepositoryReader(org.eclipse.tycho.p2.repository.RepositoryReader)

Aggregations

LocalRepositoryReader (org.eclipse.tycho.p2.repository.LocalRepositoryReader)2 RepositoryReader (org.eclipse.tycho.p2.repository.RepositoryReader)2 File (java.io.File)1 LocalArtifactRepository (org.eclipse.tycho.repository.local.LocalArtifactRepository)1 LocalMetadataRepository (org.eclipse.tycho.repository.local.LocalMetadataRepository)1