question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in sbt with plugin in resolving dependencies that aren't part of the project

See original GitHub issue

By sbt build works fine without the plugin, but when enabling it globally, the project doesn’t load, failing on trying to resolve some dependencies that, as far as I know, aren’t part of the project. The strangest one is the one in /Users/sfitch/Coding/libs/activator-1.3.2/repository, which is just a random directory I have lying around outside of the project. It is as if courser navigated outside of the sbt project and found it.

[info] Loading project definition from /Users/sfitch/Coding/ERI/foobar-service/project
[info] Updating default:foobar-service-build:0.1-SNAPSHOT
[info] Resolved default:foobar-service-build:0.1-SNAPSHOT dependencies
[info] Fetching artifacts of default:foobar-service-build:0.1-SNAPSHOT
[info] Fetched artifacts of default:foobar-service-build:0.1-SNAPSHOT
[error] 2 not found
[error]   /Users/sfitch/.m2/repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0.jar
[error]   /Users/sfitch/Coding/libs/activator-1.3.2/repository/org.vafer/jdeb/1.3/maven-plugins/jdeb.jar
java.lang.Exception: Encountered 2 errors (see above messages)
    at coursier.Tasks$$anonfun$updateTask$1.coursier$Tasks$$anonfun$$report$1(Tasks.scala:710)
    at coursier.Tasks$$anonfun$updateTask$1$$anonfun$apply$49.apply(Tasks.scala:748)
    at coursier.Tasks$$anonfun$updateTask$1$$anonfun$apply$49.apply(Tasks.scala:748)
    at scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:189)
    at scala.collection.mutable.AbstractMap.getOrElseUpdate(Map.scala:91)
    at coursier.Tasks$$anonfun$updateTask$1.apply(Tasks.scala:741)
    at coursier.Tasks$$anonfun$updateTask$1.apply(Tasks.scala:517)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
[error] (*:update) java.lang.Exception: Encountered 2 errors (see above messages)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mkotsbakcommented, Aug 13, 2016

Seems like activator has added these to ~/.sbt/repositories:

activator-launcher-local: file://${activator.local.repository-${activator.home-${user.home}/.activator}/repository}, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/artifact.[ext] activator-local: file://${activator.local.repository-/[my_homedir]/progs/activator-dist-1.3.7/repository}, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/artifact.[ext]

With them in there it fails, but removing them solves the issue.

0reactions
zafarellacommented, Aug 24, 2017

using "1.0.0-RC10" neither ~/.sbt/repositories nor the ~/.sbt/0.13/repositories exists. the project was using activator before though. cannot resolve

  • com.mandubian:play-json-zipper_2.11:1.2
  • com.readytalk:metrics3-statsd:4.1.2

resolver are present though:

.....
  Resolver.url("Ahlers Releases", new URL("http://artifacts.ahlers.consulting"))(Resolver.ivyStylePatterns),
  Resolver.url("mandubian Releases", new URL("http://dl.bintray.com/mandubian/maven/"))(Resolver.mavenStylePatterns),
  Resolver.url("readytalk Releases", new URL("https://dl.bintray.com/readytalk/maven"))(Resolver.mavenStylePatterns)
)

It looks coursier does not looks into the repos I added (tried with activator also):

$ activator
.................
.................
[error] (core/*:coursierResolutions) coursier.ResolutionException: Encountered 2 error(s) in dependency resolution:
[error]     com.mandubian:play-json-zipper_2.11:1.2:
[error]         not found:
[error]             /Users/user1/.ivy2/local/com.mandubian/play-json-zipper_2.11/1.2/ivys/ivy.xml
[error]             /usr/local/Cellar/typesafe-activator/1.3.7/libexec/repository/com.mandubian/play-json-zipper_2.11/1.2/ivys/ivy.xml
[error]             https://repo1.maven.org/maven2/com/mandubian/play-json-zipper_2.11/1.2/play-json-zipper_2.11-1.2.pom
[error]             http://nexus.mycomp.net/nexus/content/repositories/releases/com/mandubian/play-json-zipper_2.11/1.2/play-json-zipper_2.11-1.2.pom
[error]             http://nexus.mycomp.net/nexus/content/repositories/snapshots/com/mandubian/play-json-zipper_2.11/1.2/play-json-zipper_2.11-1.2.pom
[error]             http://nexus.mycomp.net/nexus/content/repositories/thirdparty/com/mandubian/play-json-zipper_2.11/1.2/play-json-zipper_2.11-1.2.pom
[error]             /Users/user1/.ivy2/local/com.mandubian/play-json-zipper_2.11/1.2/ivys/ivy.xml
[error]             http://maven-repository.rhinofly.net:8081/artifactory/libs-release-local/com/mandubian/play-json-zipper_2.11/1.2/play-json-zipper_2.11-1.2.pom
[error]             http://nexus.mycomp.net/nexus/content/repositories/public/com/mandubian/play-json-zipper_2.11/1.2/play-json-zipper_2.11-1.2.pom
[error]             https://repo.typesafe.com/typesafe/releases/com/mandubian/play-json-zipper_2.11/1.2/play-json-zipper_2.11-1.2.pom
[error]             https://repo.typesafe.com/typesafe/ivy-releases/com.mandubian/play-json-zipper_2.11/1.2/ivys/ivy.xml
[error]             https://repo.typesafe.com/typesafe/releases/com/mandubian/play-json-zipper_2.11/1.2/play-json-zipper_2.11-1.2.pom
[error]             http://repo.typesafe.com/typesafe/releases/com/mandubian/play-json-zipper_2.11/1.2/play-json-zipper_2.11-1.2.pom
[error]     com.readytalk:metrics3-statsd:4.1.2:
[error]         not found:
[error]             /Users/user1/.ivy2/local/com.readytalk/metrics3-statsd/4.1.2/ivys/ivy.xml
[error]             /usr/local/Cellar/typesafe-activator/1.3.7/libexec/repository/com.readytalk/metrics3-statsd/4.1.2/ivys/ivy.xml
[error]             https://repo1.maven.org/maven2/com/readytalk/metrics3-statsd/4.1.2/metrics3-statsd-4.1.2.pom
[error]             http://nexus.mycomp.net/nexus/content/repositories/releases/com/readytalk/metrics3-statsd/4.1.2/metrics3-statsd-4.1.2.pom
[error]             http://nexus.mycomp.net/nexus/content/repositories/snapshots/com/readytalk/metrics3-statsd/4.1.2/metrics3-statsd-4.1.2.pom
[error]             http://nexus.mycomp.net/nexus/content/repositories/thirdparty/com/readytalk/metrics3-statsd/4.1.2/metrics3-statsd-4.1.2.pom
[error]             /Users/user1/.ivy2/local/com.readytalk/metrics3-statsd/4.1.2/ivys/ivy.xml
[error]             http://maven-repository.rhinofly.net:8081/artifactory/libs-release-local/com/readytalk/metrics3-statsd/4.1.2/metrics3-statsd-4.1.2.pom
[error]             http://nexus.mycomp.net/nexus/content/repositories/public/com/readytalk/metrics3-statsd/4.1.2/metrics3-statsd-4.1.2.pom
[error]             https://repo.typesafe.com/typesafe/releases/com/readytalk/metrics3-statsd/4.1.2/metrics3-statsd-4.1.2.pom
[error]             https://repo.typesafe.com/typesafe/ivy-releases/com.readytalk/metrics3-statsd/4.1.2/ivys/ivy.xml
[error]             https://repo.typesafe.com/typesafe/releases/com/readytalk/metrics3-statsd/4.1.2/metrics3-statsd-4.1.2.pom
[error]             http://repo.typesafe.com/typesafe/releases/com/readytalk/metrics3-statsd/4.1.2/metrics3-statsd-4.1.2.pom
Read more comments on GitHub >

github_iconTop Results From Across the Web

sbt fails to resolve a plugin as dependency - Stack Overflow
I get this error from sbt: I can find the project on this url on the Maven Central Repo. module not found: com.frugalmechanic#fm- ......
Read more >
Dependencies analysis | IntelliJ IDEA Documentation - JetBrains
In IntelliJ IDEA, you can visualize dependencies between the parts of a project (modules, classes, and so on) and highlight the information ...
Read more >
Improved dependency management with sbt 0.13.7 - Lightbend
This addresses the scalability and performance issues associated with resolving multi-project builds. Post-resolution eviction warning feature ...
Read more >
coursier/coursier - Gitter
ResolutionException: Encountered 1 error(s) in dependency resolution: ... @lgirault Can you open an issue about it? project.parent.version is handled, ...
Read more >
Troubleshooting - sbt - Triplequote Hydra
If you are using Coursier, start by checking if dependency resolution succeeds if you remove the Coursier sbt plugin. This will help you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found