0

Mill doesn't seem to check the local Ivy cache for (snapshot) dependencies. I've got a local build of a dependency I want to use - Mill can't find it. The output shows it searching my registered Maven repos:

  def repositoriesTask = T.task {
    super.repositoriesTask() ++ Seq(
            MavenRepository("https://oss.sonatype.org/content/repositories/snapshots"),
      ...

but not the local ivy2 cache. I would have thought that would just work by default.

I tried adding it explicitly as a repo:

      MavenRepository("file://~/.ivy2/local/"),

but that results in a Java error ("URI has an authority component").

I feel like I must be missing something basic. I don't see this covered in the Mill docs.

EDIT - MORE INFO:

build.sc dependency (part of ivyDeps):

    ivy"com.devsisters::shardcake-entities:2.0.6+1-f0528bd1+20230425-1217-SNAPSHOT",

Directory listing:

me in ~/dev/project on branch main > ls ~/.ivy2/local/com.devsisters/shardcake-entities_2.13 
2.0.6+1-f0528bd1+20230425-1217-SNAPSHOT
me in ~/dev/project on branch main > ls ~/.ivy2/local/com.devsisters/shardcake-entities_2.13/2.0.6+1-f0528bd1+20230425-1217-SNAPSHOT
docs    ivys    jars    poms    srcs
  • Please post your output. Also please show some dir listing of your local ivy2 repo that includes the artifact and how you refer to it in Mill. I think there might be somewhere some typo or some other issue. Also, your file:// URL doesn't look like a local but a remote URL. Either use file:/ or file:///, otherwise the "~" is used as host. – Tobias Roeser Apr 27 '23 at 13:14
  • @TobiasRoeser Edited question with more info. – Bender Rodriguez Apr 27 '23 at 14:41
  • Please also post the actual error message. If Mill can't resolve a dependency, it typically reports all tried repositories. And in a default setup, the message should contains something like this: `not found: /home/lefou/.ivy2/local/com.devsisters/shardcake-entities_2.13/2.0.6+1-f0528bd1+20230425-1217-SNAPSHOT/ivys/ivy.xml ` – Tobias Roeser Apr 27 '23 at 19:28
  • It doesn't contain that. It contains all the repos I've specified by not the local .ivy2/local. That's the reason for this post. :) What could make it not check the local repo? I include super.repositoriesTask() in my override of that def per above. – Bender Rodriguez Apr 27 '23 at 21:13

0 Answers0