Search in sources :

Example 1 with DefaultRepositoryRequest

use of org.apache.maven.artifact.repository.DefaultRepositoryRequest in project asterixdb by apache.

the class SourcePointerResolver method collectSourcePointers.

private void collectSourcePointers() throws ProjectBuildingException, IOException {
    try (StubArtifactRepository stubRepo = new StubArtifactRepository()) {
        DefaultRepositoryRequest rr = new DefaultRepositoryRequest();
        rr.setLocalRepository(stubRepo);
        ArtifactRepository central = getCentralRepository();
        rr.setRemoteRepositories(Collections.singletonList(central));
        ArtifactResolutionRequest request = new ArtifactResolutionRequest(rr);
        for (LicensedProjects lp : mojo.getLicenseMap().values()) {
            if (lp.getLicense().getDisplayName() != null && lp.getLicense().getDisplayName().toLowerCase().contains("cddl")) {
                ensureCDDLSourcesPointer(lp.getProjects(), central, request);
            }
        }
    }
}
Also used : LicensedProjects(org.apache.hyracks.maven.license.project.LicensedProjects) ArtifactResolutionRequest(org.apache.maven.artifact.resolver.ArtifactResolutionRequest) ArtifactRepository(org.apache.maven.artifact.repository.ArtifactRepository) DefaultRepositoryRequest(org.apache.maven.artifact.repository.DefaultRepositoryRequest)

Aggregations

LicensedProjects (org.apache.hyracks.maven.license.project.LicensedProjects)1 ArtifactRepository (org.apache.maven.artifact.repository.ArtifactRepository)1 DefaultRepositoryRequest (org.apache.maven.artifact.repository.DefaultRepositoryRequest)1 ArtifactResolutionRequest (org.apache.maven.artifact.resolver.ArtifactResolutionRequest)1