Phase 01: Maven Central metadata client
Status: Planned
Deliverables
package3/kotlin/maven/client.go— HTTP client for Maven Central metadata.FetchPOM(coord Coordinate) (*POM, error)— fetch and parse the POM XML.FetchModuleMetadata(coord Coordinate) (*GradleModule, error)— fetch and parse the.modulefile (Gradle Module Metadata).ResolveVersionRange(groupID, artifactID, versionRange string) (string, error)— resolve a version range to a concrete version using the Maven metadata XML (maven-metadata.xml).FetchMavenMetadata(groupID, artifactID string) (*MavenMetadata, error)— fetchmaven-metadata.xmllisting all available versions.
package3/kotlin/maven/pom.go— POM XML struct and parser (usingencoding/xml).package3/kotlin/maven/graph.go—ResolveTransitive(rootCoords []Coordinate) ([]Coordinate, error)— BFS transitive dependency resolution, handling<exclusions>,<scope>, and dependency management sections.package3/kotlin/maven/gmm.go— Gradle Module Metadata parser and JVM variant selector.package3/kotlin/maven/registry.go— registry configuration: Maven Central base URL, JitPack, Google Maven, and custom URL support.
Maven Central metadata protocol
Maven Central serves metadata at:
https://repo1.maven.org/maven2/{group/path}/{artifact}/{version}/{artifact}-{version}.pomhttps://repo1.maven.org/maven2/{group/path}/{artifact}/maven-metadata.xmlhttps://repo1.maven.org/maven2/{group/path}/{artifact}/{version}/{artifact}-{version}.module
Version range resolution reads maven-metadata.xml which lists all available versions and the <release> and <latest> tags.
Gate
Resolve [email protected] and its 11 transitive dependencies from Maven Central. Validate:
- Correct transitive graph (11 specific artifacts).
- All POMs parsed without error.
- No excluded dependencies included.
scope = "test"andscope = "provided"dependencies excluded from the compile graph.- JVM variant correctly selected from the
kotlinx-coroutines-core-1.7.3.moduleGMM file.