@Test public void testNewResolutionRepositories() { Proxy proxy = new Proxy( "http", "localhost", 8080 ); DefaultProxySelector proxySelector = new DefaultProxySelector(); proxySelector.add( proxy, "" ); session.setProxySelector( proxySelector ); Authentication auth = new AuthenticationBuilder().addUsername( "user" ).build(); DefaultAuthenticationSelector authSelector = new DefaultAuthenticationSelector(); authSelector.add( "mirror", auth ); authSelector.add( "test-2", auth ); session.setAuthenticationSelector( authSelector ); DefaultMirrorSelector mirrorSelector = new DefaultMirrorSelector(); mirrorSelector.add( "mirror", "http:void", "default", false, "test-1", null ); session.setMirrorSelector( mirrorSelector ); RemoteRepository rawRepo1 = new RemoteRepository.Builder( "test-1", "default", "http: RemoteRepository rawRepo2 = new RemoteRepository.Builder( "test-2", "default", "http: List<RemoteRepository> resolveRepos = system.newResolutionRepositories( session, Arrays.asList( rawRepo1, rawRepo2 ) ); assertNotNull( resolveRepos ); assertEquals( 2, resolveRepos.size() ); RemoteRepository resolveRepo = resolveRepos.get( 0 ); assertNotNull( resolveRepo ); assertEquals( "mirror", resolveRepo.getId() ); assertSame( proxy, resolveRepo.getProxy() ); assertSame( auth, resolveRepo.getAuthentication() ); resolveRepo = resolveRepos.get( 1 ); assertNotNull( resolveRepo ); assertEquals( "test-2", resolveRepo.getId() ); assertSame( proxy, resolveRepo.getProxy() ); assertSame( auth, resolveRepo.getAuthentication() ); }
public List<RemoteRepository> newResolutionRepositories( RepositorySystemSession session, List<RemoteRepository> repositories ) { validateSession( session ); repositories = remoteRepositoryManager.aggregateRepositories( session, new ArrayList<RemoteRepository>(), repositories, true ); return repositories; }
DefaultRepositorySystem implements RepositorySystem, Service { public List<RemoteRepository> newResolutionRepositories( RepositorySystemSession session, List<RemoteRepository> repositories ) { validateSession( session ); repositories = remoteRepositoryManager.aggregateRepositories( session, new ArrayList<RemoteRepository>(), repositories, true ); return repositories; } }
DefaultRepositorySystem implements RepositorySystem, Service { public List<RemoteRepository> newResolutionRepositories( RepositorySystemSession session, List<RemoteRepository> repositories ) { validateSession( session ); repositories = remoteRepositoryManager.aggregateRepositories( session, new ArrayList<RemoteRepository>(), repositories, true ); return repositories; } DefaultRepositorySystem(); @Inject  DefaultRepositorySystem( VersionResolver versionResolver, VersionRangeResolver versionRangeResolver,
                             ArtifactResolver artifactResolver, MetadataResolver metadataResolver,
                             ArtifactDescriptorReader artifactDescriptorReader,
                             DependencyCollector dependencyCollector, Installer installer, Deployer deployer,
                             LocalRepositoryProvider localRepositoryProvider, SyncContextFactory syncContextFactory,
                             RemoteRepositoryManager remoteRepositoryManager, LoggerFactory loggerFactory ); }
DefaultRepositorySystem implements RepositorySystem, Service { public List<RemoteRepository> newResolutionRepositories( RepositorySystemSession session, List<RemoteRepository> repositories ) { validateSession( session ); repositories = remoteRepositoryManager.aggregateRepositories( session, new ArrayList<RemoteRepository>(), repositories, true ); return repositories; } DefaultRepositorySystem(); @Inject  DefaultRepositorySystem( VersionResolver versionResolver, VersionRangeResolver versionRangeResolver,
                             ArtifactResolver artifactResolver, MetadataResolver metadataResolver,
                             ArtifactDescriptorReader artifactDescriptorReader,
                             DependencyCollector dependencyCollector, Installer installer, Deployer deployer,
                             LocalRepositoryProvider localRepositoryProvider, SyncContextFactory syncContextFactory,
                             RemoteRepositoryManager remoteRepositoryManager, LoggerFactory loggerFactory ); void initService( ServiceLocator locator ); DefaultRepositorySystem setLoggerFactory( LoggerFactory loggerFactory ); DefaultRepositorySystem setVersionResolver( VersionResolver versionResolver ); DefaultRepositorySystem setVersionRangeResolver( VersionRangeResolver versionRangeResolver ); DefaultRepositorySystem setArtifactResolver( ArtifactResolver artifactResolver ); DefaultRepositorySystem setMetadataResolver( MetadataResolver metadataResolver ); DefaultRepositorySystem setArtifactDescriptorReader( ArtifactDescriptorReader artifactDescriptorReader ); DefaultRepositorySystem setDependencyCollector( DependencyCollector dependencyCollector ); DefaultRepositorySystem setInstaller( Installer installer ); DefaultRepositorySystem setDeployer( Deployer deployer ); DefaultRepositorySystem setLocalRepositoryProvider( LocalRepositoryProvider localRepositoryProvider ); DefaultRepositorySystem setSyncContextFactory( SyncContextFactory syncContextFactory ); DefaultRepositorySystem setRemoteRepositoryManager( RemoteRepositoryManager remoteRepositoryManager ); VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request ); VersionRangeResult resolveVersionRange( RepositorySystemSession session, VersionRangeRequest request ); ArtifactDescriptorResult readArtifactDescriptor( RepositorySystemSession session,
                                                            ArtifactDescriptorRequest request ); ArtifactResult resolveArtifact( RepositorySystemSession session, ArtifactRequest request ); List<ArtifactResult> resolveArtifacts( RepositorySystemSession session,
                                                  Collection<? extends ArtifactRequest> requests ); List<MetadataResult> resolveMetadata( RepositorySystemSession session,
                                                 Collection<? extends MetadataRequest> requests ); CollectResult collectDependencies( RepositorySystemSession session, CollectRequest request ); DependencyResult resolveDependencies( RepositorySystemSession session, DependencyRequest request ); InstallResult install( RepositorySystemSession session, InstallRequest request ); DeployResult deploy( RepositorySystemSession session, DeployRequest request ); LocalRepositoryManager newLocalRepositoryManager( RepositorySystemSession session,
                                                             LocalRepository localRepository ); SyncContext newSyncContext( RepositorySystemSession session, boolean shared ); List<RemoteRepository> newResolutionRepositories( RepositorySystemSession session,
                                                             List<RemoteRepository> repositories ); RemoteRepository newDeploymentRepository( RepositorySystemSession session, RemoteRepository repository ); }
DefaultRepositorySystem implements RepositorySystem, Service { public List<RemoteRepository> newResolutionRepositories( RepositorySystemSession session, List<RemoteRepository> repositories ) { validateSession( session ); repositories = remoteRepositoryManager.aggregateRepositories( session, new ArrayList<RemoteRepository>(), repositories, true ); return repositories; } DefaultRepositorySystem(); @Inject  DefaultRepositorySystem( VersionResolver versionResolver, VersionRangeResolver versionRangeResolver,
                             ArtifactResolver artifactResolver, MetadataResolver metadataResolver,
                             ArtifactDescriptorReader artifactDescriptorReader,
                             DependencyCollector dependencyCollector, Installer installer, Deployer deployer,
                             LocalRepositoryProvider localRepositoryProvider, SyncContextFactory syncContextFactory,
                             RemoteRepositoryManager remoteRepositoryManager, LoggerFactory loggerFactory ); void initService( ServiceLocator locator ); DefaultRepositorySystem setLoggerFactory( LoggerFactory loggerFactory ); DefaultRepositorySystem setVersionResolver( VersionResolver versionResolver ); DefaultRepositorySystem setVersionRangeResolver( VersionRangeResolver versionRangeResolver ); DefaultRepositorySystem setArtifactResolver( ArtifactResolver artifactResolver ); DefaultRepositorySystem setMetadataResolver( MetadataResolver metadataResolver ); DefaultRepositorySystem setArtifactDescriptorReader( ArtifactDescriptorReader artifactDescriptorReader ); DefaultRepositorySystem setDependencyCollector( DependencyCollector dependencyCollector ); DefaultRepositorySystem setInstaller( Installer installer ); DefaultRepositorySystem setDeployer( Deployer deployer ); DefaultRepositorySystem setLocalRepositoryProvider( LocalRepositoryProvider localRepositoryProvider ); DefaultRepositorySystem setSyncContextFactory( SyncContextFactory syncContextFactory ); DefaultRepositorySystem setRemoteRepositoryManager( RemoteRepositoryManager remoteRepositoryManager ); VersionResult resolveVersion( RepositorySystemSession session, VersionRequest request ); VersionRangeResult resolveVersionRange( RepositorySystemSession session, VersionRangeRequest request ); ArtifactDescriptorResult readArtifactDescriptor( RepositorySystemSession session,
                                                            ArtifactDescriptorRequest request ); ArtifactResult resolveArtifact( RepositorySystemSession session, ArtifactRequest request ); List<ArtifactResult> resolveArtifacts( RepositorySystemSession session,
                                                  Collection<? extends ArtifactRequest> requests ); List<MetadataResult> resolveMetadata( RepositorySystemSession session,
                                                 Collection<? extends MetadataRequest> requests ); CollectResult collectDependencies( RepositorySystemSession session, CollectRequest request ); DependencyResult resolveDependencies( RepositorySystemSession session, DependencyRequest request ); InstallResult install( RepositorySystemSession session, InstallRequest request ); DeployResult deploy( RepositorySystemSession session, DeployRequest request ); LocalRepositoryManager newLocalRepositoryManager( RepositorySystemSession session,
                                                             LocalRepository localRepository ); SyncContext newSyncContext( RepositorySystemSession session, boolean shared ); List<RemoteRepository> newResolutionRepositories( RepositorySystemSession session,
                                                             List<RemoteRepository> repositories ); RemoteRepository newDeploymentRepository( RepositorySystemSession session, RemoteRepository repository );  }