Search in sources :

Example 1 with LocalArtifactRepository

use of org.eclipse.tycho.repository.local.LocalArtifactRepository 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 LocalArtifactRepository

use of org.eclipse.tycho.repository.local.LocalArtifactRepository in project tycho by eclipse.

the class P2ResolverFactoryImpl method getTargetPlatformFactory.

@Override
public TargetPlatformFactoryImpl getTargetPlatformFactory() {
    try {
        // TODO don't synchronize twice
        LocalMetadataRepository localMetadataRepo = getLocalMetadataRepository(mavenContext, localRepoIndices);
        LocalArtifactRepository localArtifactRepo = getLocalArtifactRepository(mavenContext, localRepoIndices);
        return new TargetPlatformFactoryImpl(mavenContext, remoteAgentManager.getProvisioningAgent(), localArtifactRepo, localMetadataRepo, targetDefinitionResolverService);
    } catch (ProvisionException e) {
        throw new RuntimeException(e);
    }
}
Also used : LocalArtifactRepository(org.eclipse.tycho.repository.local.LocalArtifactRepository) ProvisionException(org.eclipse.equinox.p2.core.ProvisionException) LocalMetadataRepository(org.eclipse.tycho.repository.local.LocalMetadataRepository) TargetPlatformFactoryImpl(org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl)

Aggregations

LocalArtifactRepository (org.eclipse.tycho.repository.local.LocalArtifactRepository)2 ProvisionException (org.eclipse.equinox.p2.core.ProvisionException)1 LocalRepositoryReader (org.eclipse.tycho.p2.repository.LocalRepositoryReader)1 RepositoryReader (org.eclipse.tycho.p2.repository.RepositoryReader)1 TargetPlatformFactoryImpl (org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl)1 LocalMetadataRepository (org.eclipse.tycho.repository.local.LocalMetadataRepository)1