Skip to content

:mvn/local-repo isn't propagated in some cases #574

@zelark

Description

@zelark

Describe the bug
When :mvn/local-repo is set in user deps or provided via -Sdeps, it isn’t propagated correctly.
Only root dependencies are downloaded into the :mvn/local-repo path.

I saw #532 and hoped it would fix the issue, but unfortunately it didn’t.

To Reproduce
Steps to reproduce the behavior:

  1. Navigate to examples/local-maven-repo
  2. Check out the 0.22.2 tag
  3. Comment out or delete :mvn/local-repo in ./deps.edn
  4. Add a dependency in components/stuff/deps.edn, for example: nano-id/nano-id {:mvn/version "1.1.0"}
  5. Run clojure -Sdeps '{:mvn/local-repo "./maven-repo"}' -M:poly test :dev

Actual behavior
nano-id is downloaded into ~/.m2/repository/

Expected behavior
nano-id should be downloaded into ./maven-repo. In general, all project dependencies (bases, components, etc.) should be downloaded into the same ./maven-repo directory.

> clojure -Sdeps '{:mvn/local-repo "./maven-repo"}' -M:poly test :dev
Downloading: org/clojure/clojure/1.10.0/clojure-1.10.0.pom from central
Downloading: org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.pom from central
Downloading: org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.pom from central
...
Downloading: http-kit/http-kit/2.7.0/http-kit-2.7.0.jar from clojars
Projects to run tests from: development

Running tests for the development project using test runner: Polylith built-in clojure.test runner...
Running tests from the development project, including 1 brick: stuff

Testing local.maven.stuff.interface-test

Ran 1 tests containing 1 assertions.
0 failures, 0 errors.

Test results: 1 passes, 0 failures, 0 errors.

Execution time: 1 seconds

> ls maven-repo
aopalliance clj-commons commons-codec djblue    http-kit  metosin   net   pogonos   selmer
borkdude  com   commons-io  fipp    javax   mvxcvi    org   rewrite-clj version-clj

> ls ~/.m2/repository/nano-id/nano-id
1.1.0

Operating System:

  • OS: MacOS
  • Version: 15.6.1

Versions:

  • Java: 21
  • Poly: 0.2.22 (as a dependency)

Additional context
Setting :mvn/local-repo in ~/.clojure/deps.edn also doesn’t work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions