title: sbt.librarymanagement.ResolveException: Error downloading in sbt project with sbt plugin module
body: <p>I'm having the following problem. I have a multimodule project described in the following way.</p>
  <pre><code>import Build._
  import sbt.Keys.scalacOptions
  
  lazy val moduleA =
    module(id = &quot;module-a&quot;, &quot;module-a&quot;)
  
  lazy val moduleB =
    module(id = &quot;module-b&quot;, &quot;module-b&quot;)
  
  lazy val root =
    module(id = &quot;sample-project&quot;, directory = &quot;.&quot;)
      .aggregate(moduleA, moduleB)
  
  lazy val plugin = Project(id = &quot;plugin&quot;, base = file(&quot;plugin&quot;))
    .settings(
      sbtPlugin := true,
      name := &quot;MyPlugin&quot;
    )
    .dependsOn(moduleA)
  </code></pre>
  <p>Where <code>Build</code> declares the following helpers</p>
  <pre><code>object Build {
    val scala212 = &quot;2.12.11&quot;
    val scala213 = &quot;2.13.3&quot;
    val projectScalaVersion = scala213
    val supportedScalaVersions = List(scala213, scala212)
  
    val projectVersion = &quot;0.3.5-SNAPSHOT&quot;
    val projectOrganization = &quot;com.example&quot;
  
    val commonSettings = Seq(
      version := projectVersion,
      crossScalaVersions := supportedScalaVersions,
      organization := projectOrganization,
      scalaVersion := projectScalaVersion,
      scalacOptions += &quot;-deprecation&quot;,
      scalafmtOnCompile := true
    )
  
    def module(id: String, directory: String): Project = {
      Project(id = id, base = file(directory))
        .settings(commonSettings: _*)
    }
  
    implicit class ProjectOps(project: Project) {
      def libraries(modules: ModuleID*): Project = {
        project.settings(libraryDependencies ++= modules)
      }
  
      def disablePublish: Project = {
        project.settings(publishLocal := {}, publishM2 := {}, publish := {})
      }
    }
  }
  </code></pre>
  <p>I'm trying to add an sbt plugin to expose some of the parts of the project using tasks.
  Unfortunately when compiling the plugin I get the following error:</p>
  <pre><code>sbt:sample-project&gt; plugin/compile
  [info] Updating 
  [info] Resolved  dependencies
  [warn] 
  [warn]  Note: Unresolved dependencies path:
  [error] stack trace is suppressed; run last plugin / update for the full output
  [error] (plugin / update) sbt.librarymanagement.ResolveException: Error downloading com.example:module-a_2.12:0.3.5-SNAPSHOT
  [error]   Not found
  [error]   Not found
  [error]   not found: https://repo1.maven.org/maven2/com/example/module-a_2.12/0.3.5-SNAPSHOT/module-a_2.12-0.3.5-SNAPSHOT.pom
  [error]   not found: /Users/ltrojanowski/.ivy2/local/com.example/module-a_2.12/0.3.5-SNAPSHOT/ivys/ivy.xml
  [error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.example/module-a_2.12/0.3.5-SNAPSHOT/ivys/ivy.xml
  [error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.example/module-a_2.12/0.3.5-SNAPSHOT/ivys/ivy.xml
  [error] Total time: 3 s, completed Aug 26, 2020 1:35:20 PM
  </code></pre>
  <p>I don't know why this is happening. Any help or tip in how to fix this would be much appreciated.</p>