Package org.openrewrite.maven.internal
Class MavenPomDownloader
java.lang.Object
org.openrewrite.maven.internal.MavenPomDownloader
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionMavenPomDownloader(Map<Path, Pom> projectPoms, org.openrewrite.ExecutionContext ctx) MavenPomDownloader(Map<Path, Pom> projectPoms, org.openrewrite.ExecutionContext ctx, @Nullable MavenSettings mavenSettings, @Nullable List<String> activeProfiles) MavenPomDownloader(Map<Path, Pom> projectPoms, org.openrewrite.ipc.http.HttpSender httpSender, org.openrewrite.ExecutionContext ctx) Deprecated.MavenPomDownloader(org.openrewrite.ExecutionContext ctx) A MavenPomDownloader for non-maven contexts where there are no project poms or assumption that maven central is implicitly added as a repository. -
Method Summary
Modifier and TypeMethodDescriptiondownload(GroupArtifactVersion gav, @Nullable String relativePath, @Nullable ResolvedPom containingPom, List<MavenRepository> repositories) downloadMetadata(GroupArtifact groupArtifact, @Nullable ResolvedPom containingPom, List<MavenRepository> repositories) downloadMetadata(GroupArtifactVersion gav, @Nullable ResolvedPom containingPom, List<MavenRepository> repositories) protected MavenMetadatamergeMetadata(MavenMetadata m1, MavenMetadata m2) @Nullable MavenRepositorynormalizeRepository(MavenRepository originalRepository, MavenExecutionContextView ctx, @Nullable ResolvedPom containingPom) booleanrepositoryAcceptsVersion(MavenRepository repo, String version, @Nullable ResolvedPom containingPom)
-
Constructor Details
-
MavenPomDownloader
public MavenPomDownloader(Map<Path, Pom> projectPoms, org.openrewrite.ExecutionContext ctx, @Nullable @Nullable MavenSettings mavenSettings, @Nullable @Nullable List<String> activeProfiles) - Parameters:
projectPoms- Other POMs in this project.ctx- The execution context, which potentially contain Maven settings customization andHttpSendercustomization.mavenSettings- The Maven settings to use, if any. This argument overrides any Maven settings set on the execution context.activeProfiles- The active profiles to use, if any. This argument overrides any active profiles set on the execution context.
-
MavenPomDownloader
public MavenPomDownloader(org.openrewrite.ExecutionContext ctx) A MavenPomDownloader for non-maven contexts where there are no project poms or assumption that maven central is implicitly added as a repository. In a Maven contexts, a non-empty projectPoms should be specified toMavenPomDownloader(Map, ExecutionContext)for accurate results.- Parameters:
ctx- The execution context, which potentially contain Maven settings customization andHttpSendercustomization.
-
MavenPomDownloader
- Parameters:
projectPoms- Other POMs in this project.ctx- The execution context, which potentially contain Maven settings customization andHttpSendercustomization.
-
MavenPomDownloader
@Deprecated public MavenPomDownloader(Map<Path, Pom> projectPoms, org.openrewrite.ipc.http.HttpSender httpSender, org.openrewrite.ExecutionContext ctx) Deprecated.UseMavenPomDownloader(Map, ExecutionContext)instead.- Parameters:
projectPoms- Project poms on disk.httpSender- The HTTP sender.ctx- The execution context.
-
-
Method Details
-
downloadMetadata
public MavenMetadata downloadMetadata(GroupArtifact groupArtifact, @Nullable @Nullable ResolvedPom containingPom, List<MavenRepository> repositories) throws MavenDownloadingException - Throws:
MavenDownloadingException
-
downloadMetadata
public MavenMetadata downloadMetadata(GroupArtifactVersion gav, @Nullable @Nullable ResolvedPom containingPom, List<MavenRepository> repositories) throws MavenDownloadingException - Throws:
MavenDownloadingException
-
mergeMetadata
-
download
public Pom download(GroupArtifactVersion gav, @Nullable @Nullable String relativePath, @Nullable @Nullable ResolvedPom containingPom, List<MavenRepository> repositories) throws MavenDownloadingException - Throws:
MavenDownloadingException
-
normalizeRepository
@Nullable public @Nullable MavenRepository normalizeRepository(MavenRepository originalRepository, MavenExecutionContextView ctx, @Nullable @Nullable ResolvedPom containingPom) -
repositoryAcceptsVersion
public boolean repositoryAcceptsVersion(MavenRepository repo, String version, @Nullable @Nullable ResolvedPom containingPom)
-
MavenPomDownloader(Map, ExecutionContext)instead.