Maven Compatibility
Status: 🟢 Reading from Maven repositories is fully implemented. 🟡 Gradle Module Metadata is parsed but not yet used for variant selection. ⚪ Publishing is planned.
Kargo is a Maven client. It does not define a new package format, run a registry, or ask libraries to republish. Anything you can consume from Gradle or Maven, you can consume from Kargo.
Repository layout
Standard Maven layout, with the group id's dots becoming path separators:
https://repo.maven.apache.org/maven2/
org/jetbrains/kotlinx/kotlinx-coroutines-core/1.8.0/
kotlinx-coroutines-core-1.8.0.pom
kotlinx-coroutines-core-1.8.0.jar
kotlinx-coroutines-core-1.8.0.module # Gradle Module Metadata
kotlinx-coroutines-core-1.8.0-sources.jar
*.sha1, *.sha256, *.md5
So any static file server with this layout is a usable repository — including an S3 bucket or a directory served over HTTP.
Metadata
| File | Read for |
|---|---|
<artifact>-<version>.pom | Dependencies, properties, parent, packaging |
maven-metadata.xml (artifact level) | Available versions, latest, release |
maven-metadata.xml (version level) | Timestamped SNAPSHOT builds |
<artifact>-<version>.module | Gradle Module Metadata, for multiplatform variants |
Gradle Module Metadata
A .module file is a JSON document describing an artifact's variants — JVM
runtime, JVM API, iOS arm64, and so on — with the attributes needed to pick one.
This is how a single coordinate like io.ktor:ktor-client-core:2.3.0 serves every
Kotlin platform.
Kargo parses these files where they exist.
Status: 🟡 Parsed, but variant selection does not yet use the attributes. Multiplatform artifacts resolve, with less precision than they eventually will.
Artifacts without a .module file resolve from the POM alone, which is all a
JVM-only library needs.
Checksums
Every download is verified against the published sha256 when available, falling
back to sha1. Cached artifacts are re-verified on read, not only on download,
and Kargo.lock records the checksum independently — so a repository that serves
different bytes for the same coordinate fails the build rather than silently
changing what you compile.
kargo fetch --verify # re-verify the whole cache against the lockfile
Authentication
[repositories]
internal = { url = "https://nexus.example.com/repository/maven-releases", username = "${env:NEXUS_USER}", password = "${env:NEXUS_PASS}" }
token-based = { url = "https://maven.pkg.github.com/acme/libs", username = "${env:GITHUB_ACTOR}", password = "${env:GITHUB_TOKEN}" }
HTTP Basic, which is what Nexus, Artifactory, GitHub Packages, and Maven Central's
staging API all accept. Credentials come from .kargo.env
or global config, never a committed
manifest.
The local cache
~/.kargo/cache/ mirrors the Maven layout:
~/.kargo/cache/
org/jetbrains/kotlinx/kotlinx-coroutines-core/1.8.0/
kotlinx-coroutines-core-1.8.0.jar
kotlinx-coroutines-core-1.8.0.pom
Mirroring the remote layout rather than inventing a flat store means the cache is
inspectable with ls, and --offline is just "resolve against this directory".
kargo fetch # populate it
kargo build --offline # use only what is here
kargo self clean # prune it
Repository order
Repositories are tried in declaration order, with Maven Central last. The first repository that has the artifact wins, and the lockfile records which one it was — so a later change in repository order cannot silently swap an artifact's source.
Publishing
Status: ⚪ Planned.
The upload side of the same protocol: JAR, POM, sources, KDoc, GPG signatures, and checksums, PUT to the repository. SNAPSHOT versions get timestamped; release versions are immutable. See Publishing.
What Kargo does not do
| Not supported | Why |
|---|---|
| POM profile activation | Makes resolution depend on the resolving machine |
| Dynamic version ranges | Same reason — versions are exact |
LATEST and RELEASE | Deprecated in Maven, non-reproducible |
| Maven plugins | A different execution model entirely |
settings.xml | Kargo has its own config |
Each omission trades expressiveness for a build that produces the same output tomorrow as it does today.
A range naming exactly one version — [2.6.1] — is resolved, since it is an
exact version. A wider range is not.