Class ColdLocalRepo

java.lang.Object
network.ike.plugin.release.coherence.ColdLocalRepo
All Implemented Interfaces:
AutoCloseable

public final class ColdLocalRepo extends Object implements 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

    Fields
    Modifier and Type
    Field
    Description
    final org.apache.maven.api.Session
    The session whose local repository is the fresh empty directory.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ColdLocalRepo(org.apache.maven.api.Session base)
    Creates a fresh empty local repository and a session bound to it.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Removes the throwaway local repository (best-effort).

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • session

      public final org.apache.maven.api.Session session
      The session whose local repository is the fresh empty directory.
  • Constructor Details

    • ColdLocalRepo

      public ColdLocalRepo(org.apache.maven.api.Session base) throws IOException
      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:
      close in interface AutoCloseable