[WIP] Extract Maven repo interaction logic for JVM ecosystems reuse#14721
Draft
AbhishekBhaskar wants to merge 1 commit intomainfrom
Draft
[WIP] Extract Maven repo interaction logic for JVM ecosystems reuse#14721AbhishekBhaskar wants to merge 1 commit intomainfrom
AbhishekBhaskar wants to merge 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
Extracts Maven repository interaction logic from
Maven::Package::PackageDetailsFetcherinto a new abstract base classMaven::Shared::SharedMavenRepositoryClient, enabling SBT (and other JVM ecosystems) to reuse Maven repository resolution without duplicating code.SBT resolves dependencies from Maven repositories using the same
maven-metadata.xmlformat, URL conventions, and auth patterns as Maven. Rather than duplicating ~300 lines of repository client logic in the SBT ecosystem, we extract it into a shared abstract class that both Maven and SBT can inherit from.Changes:
New file:
shared_maven_repository_client.rbDependabot::Maven::Shareddependency_parts,dependency_base_url,dependency_metadata_url,dependency_files_url), metadata fetching (XML + HTML), version extraction, response checking, forbidden URL tracking,released?checks, credential/auth header handling, and per-repository metadata cachingdependency,credentials,repositoriesdependency_parts(for non-standard naming),central_repo_url(for credential-based overrides)Modified file:
package_details_fetcher.rbSharedMavenRepositoryClient(was standalone class)-
fetch/releases— package details orchestration-
released?— delegates to parent via super-
repositories(override) — assembles credential repos + POM-declared repos-
central_repo_url(override) — delegates toRepositoriesFinder-
versions/versions_details_from_xml/versions_details_hash_from_html— version list assembly-
repository_finder/pom_repository_details/pom— Maven POM helpersAnything you want to highlight for special attention from reviewers?
dependencyattr_reader— same as Maven, no custom logic neededcredentialsattr_reader— same as Maven, no custom logic neededrepositoriesresolversinbuild.sbt+ credential repos via inheritedcredentials_repository_detailsHow will you know you've accomplished your goal?
If all the existing unit tests pass without failures.
Checklist