@Test public void testProxy() { MavenRepositoryMock.setCustomSettingsFileName("settings_custom.xml"); final MavenRepository repo = new MavenRepositoryMock(Aether.getAether()); final Collection<RemoteRepository> remoteRepos = repo.getRemoteRepositoriesForRequest(); final Set<RemoteRepository> testServerRepos = remoteRepos .stream() .filter(r -> r.getId().equals("test-server")) .collect(Collectors.toSet()); assertEquals(2, testServerRepos.size()); for (RemoteRepository remoteRepository : testServerRepos) { assertNotNull(remoteRepository.getProxy()); } }
Collection<RemoteRepository> getRemoteRepositoriesForRequest() { return remoteRepositoriesForRequest; }
MavenRepository { Collection<RemoteRepository> getRemoteRepositoriesForRequest() { return remoteRepositoriesForRequest; } }
MavenRepository { Collection<RemoteRepository> getRemoteRepositoriesForRequest() { return remoteRepositoriesForRequest; } protected  MavenRepository( Aether aether ); }
MavenRepository { Collection<RemoteRepository> getRemoteRepositoriesForRequest() { return remoteRepositoriesForRequest; } protected  MavenRepository( Aether aether ); static synchronized MavenRepository getMavenRepository(); static MavenRepository getMavenRepository( MavenProject mavenProject ); List<DependencyDescriptor> getArtifactDependecies( String artifactName ); Artifact resolveArtifact( AFReleaseId releaseId ); Artifact resolveArtifact( String artifactName ); Artifact resolveArtifact( String artifactName,
                                     boolean logUnresolvedArtifact ); Version resolveVersion( String artifactName ); void deployArtifact( RemoteRepository repository,
                                AFReleaseId releaseId,
                                File jar,
                                File pomfile ); void installArtifact( AFReleaseId releaseId,
                                 byte[] jarContent,
                                 byte[] pomContent ); void installArtifact( AFReleaseId releaseId,
                                 File jar,
                                 File pomfile ); void deployPomArtifact( String groupId,
                                   String artifactId,
                                   String version,
                                   File pomfile ); static String toFileName( AFReleaseId releaseId,
                                     String classifier ); void removeLocalArtifact(AFReleaseId releaseId); }
MavenRepository { Collection<RemoteRepository> getRemoteRepositoriesForRequest() { return remoteRepositoriesForRequest; } protected  MavenRepository( Aether aether ); static synchronized MavenRepository getMavenRepository(); static MavenRepository getMavenRepository( MavenProject mavenProject ); List<DependencyDescriptor> getArtifactDependecies( String artifactName ); Artifact resolveArtifact( AFReleaseId releaseId ); Artifact resolveArtifact( String artifactName ); Artifact resolveArtifact( String artifactName,
                                     boolean logUnresolvedArtifact ); Version resolveVersion( String artifactName ); void deployArtifact( RemoteRepository repository,
                                AFReleaseId releaseId,
                                File jar,
                                File pomfile ); void installArtifact( AFReleaseId releaseId,
                                 byte[] jarContent,
                                 byte[] pomContent ); void installArtifact( AFReleaseId releaseId,
                                 File jar,
                                 File pomfile ); void deployPomArtifact( String groupId,
                                   String artifactId,
                                   String version,
                                   File pomfile ); static String toFileName( AFReleaseId releaseId,
                                     String classifier ); void removeLocalArtifact(AFReleaseId releaseId); static MavenRepository defaultMavenRepository; }