Class ColdLocalRepo
java.lang.Object
network.ike.plugin.release.coherence.ColdLocalRepo
- All Implemented Interfaces:
AutoCloseable
A throwaway, empty Maven local repository and a
Session bound
to it — the mechanism for cold, cache-less resolution
(IKE-Network/ike-issues#705).
Resolving against the normal local repository confirms nothing
about what consumers can fetch: the module's own install
trivially populated it, and it caches upstream metadata under a daily
update policy that can read stale (the failure that shipped the
incoherent ike-platform v110 on 2026-06-18). Pointing the session at
a fresh empty directory forces every resolution to hit the configured
remotes — with the session's credentials, proxies, and mirrors
preserved — so a successful resolve means the artifact (or fresh
metadata) is genuinely there.
Use in try-with-resources; close() removes the temp
directory (best-effort).
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal org.apache.maven.api.SessionThe session whose local repository is the fresh empty directory. -
Constructor Summary
ConstructorsConstructorDescriptionColdLocalRepo(org.apache.maven.api.Session base) Creates a fresh empty local repository and a session bound to it. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Removes the throwaway local repository (best-effort).
-
Field Details
-
session
public final org.apache.maven.api.Session sessionThe session whose local repository is the fresh empty directory.
-
-
Constructor Details
-
ColdLocalRepo
Creates a fresh empty local repository and a session bound to it.- Parameters:
base- the active session to derive remotes/credentials from- Throws:
IOException- if the temp directory cannot be created
-
-
Method Details
-
close
public void close()Removes the throwaway local repository (best-effort).- Specified by:
closein interfaceAutoCloseable
-