Richard Wu
Richard Wu

Reputation: 21

org.scalacheck and org.scalatest not found after sbt->compile

[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: org.scalatest#scalatest_2.12;2.2.4: not found
[error] unresolved dependency: org.scalacheck#scalacheck_2.12;1.12.1: not found
[error] unresolved dependency: org.scalactic#scalatest;3.0.1: not found
[error] unresolved dependency: org.scalacheck#scalacheck;1.13.4: not found
[error] unresolved dependency: org.scalatest#scalatest;3.0.1: not found

in scala-2.12.1/lib/ following files exists: scalacheck_2.12-1.13.4.jar scalactic_2.11-3.0.1.jar scalatest_2.11-3.0.1.jar

in build.sbt contains:

scalaVersion := "2.12.1"
libraryDependencies += "junit" % "junit" % "4.10" % "test"
libraryDependencies ++= assignmentsMap.value.values.flatMap(_.dependencies).toSeq
libraryDependencies += "org.scalacheck" % "scalacheck" % "1.13.4" % "test"
libraryDependencies += "org.scalactic" % "scalatest" % "3.0.1"
libraryDependencies += "org.scalatest" % "scalatest" % "3.0.1" % "test"

but $ sbt and then compile error is thrown: scala> developer@cn-vm-yourname:~/example/quickcheck$ sbt [info] Loading global plugins from /home/developer/.sbt/0.13/plugins [info] Loading project definition from /home/developer/example/quickcheck/project [info] Set current project to progfun2-quickcheck (in build file:/home/developer/example/quickcheck/)

compile

[info] Updating {file:/home/developer/example/quickcheck/}root...
[info] Resolving org.scalatest#scalatest_2.12;2.2.4 ...
[warn]  module not found: org.scalatest#scalatest_2.12;2.2.4
[warn] ==== local: tried
[warn]   /home/developer/.ivy2/local/org.scalatest/scalatest_2.12/2.2.4/ivys/ivy.xml
[warn] ==== activator-launcher-local: tried
[warn]   /home/developer/.activator/repository/org.scalatest/scalatest_2.12/2.2.4/ivys/ivy.xml
[warn] ==== activator-local: tried
[warn]   /home/developer/activator-dist-1.3.12/repository/org.scalatest/scalatest_2.12/2.2.4/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scalatest/scalatest_2.12/2.2.4/scalatest_2.12-2.2.4.pom
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/scalatest/scalatest_2.12/2.2.4/scalatest_2.12-2.2.4.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.scalatest/scalatest_2.12/2.2.4/ivys/ivy.xml
[info] Resolving org.scalacheck#scalacheck_2.12;1.12.1 ...
[warn]  module not found: org.scalacheck#scalacheck_2.12;1.12.1
[warn] ==== local: tried
[warn]   /home/developer/.ivy2/local/org.scalacheck/scalacheck_2.12/1.12.1/ivys/ivy.xml
[warn] ==== activator-launcher-local: tried
[warn]   /home/developer/.activator/repository/org.scalacheck/scalacheck_2.12/1.12.1/ivys/ivy.xml
[warn] ==== activator-local: tried
[warn]   /home/developer/activator-dist-1.3.12/repository/org.scalacheck/scalacheck_2.12/1.12.1/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scalacheck/scalacheck_2.12/1.12.1/scalacheck_2.12-1.12.1.pom
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/scalacheck/scalacheck_2.12/1.12.1/scalacheck_2.12-1.12.1.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.scalacheck/scalacheck_2.12/1.12.1/ivys/ivy.xml
[info] Resolving org.scalactic#scalatest;3.0.1 ...
[warn]  module not found: org.scalactic#scalatest;3.0.1
[warn] ==== local: tried
[warn]   /home/developer/.ivy2/local/org.scalactic/scalatest/3.0.1/ivys/ivy.xml
[warn] ==== activator-launcher-local: tried
[warn]   /home/developer/.activator/repository/org.scalactic/scalatest/3.0.1/ivys/ivy.xml
[warn] ==== activator-local: tried
[warn]   /home/developer/activator-dist-1.3.12/repository/org.scalactic/scalatest/3.0.1/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scalactic/scalatest/3.0.1/scalatest-3.0.1.pom
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/scalactic/scalatest/3.0.1/scalatest-3.0.1.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.scalactic/scalatest/3.0.1/ivys/ivy.xml
[info] Resolving org.scalacheck#scalacheck;1.13.4 ...
[warn]  module not found: org.scalacheck#scalacheck;1.13.4
[warn] ==== local: tried
[warn]   /home/developer/.ivy2/local/org.scalacheck/scalacheck/1.13.4/ivys/ivy.xml
[warn] ==== activator-launcher-local: tried
[warn]   /home/developer/.activator/repository/org.scalacheck/scalacheck/1.13.4/ivys/ivy.xml
[warn] ==== activator-local: tried
[warn]   /home/developer/activator-dist-1.3.12/repository/org.scalacheck/scalacheck/1.13.4/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scalacheck/scalacheck/1.13.4/scalacheck-1.13.4.pom
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/scalacheck/scalacheck/1.13.4/scalacheck-1.13.4.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.scalacheck/scalacheck/1.13.4/ivys/ivy.xml
[info] Resolving org.scalatest#scalatest;3.0.1 ...
[warn]  module not found: org.scalatest#scalatest;3.0.1
[warn] ==== local: tried
[warn]   /home/developer/.ivy2/local/org.scalatest/scalatest/3.0.1/ivys/ivy.xml
[warn] ==== activator-launcher-local: tried
[warn]   /home/developer/.activator/repository/org.scalatest/scalatest/3.0.1/ivys/ivy.xml
[warn] ==== activator-local: tried
[warn]   /home/developer/activator-dist-1.3.12/repository/org.scalatest/scalatest/3.0.1/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scalatest/scalatest/3.0.1/scalatest-3.0.1.pom
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/scalatest/scalatest/3.0.1/scalatest-3.0.1.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.scalatest/scalatest/3.0.1/ivys/ivy.xml
[info] Resolving jline#jline;2.14.1 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.scalatest#scalatest_2.12;2.2.4: not found
[warn]  :: org.scalacheck#scalacheck_2.12;1.12.1: not found
[warn]  :: org.scalactic#scalatest;3.0.1: not found
[warn]  :: org.scalacheck#scalacheck;1.13.4: not found
[warn]  :: org.scalatest#scalatest;3.0.1: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      org.scalatest:scalatest_2.12:2.2.4 (/home/developer/example/quickcheck/project/StudentBuildLike.scala#L27)
[warn]        +- progfun2-quickcheck:progfun2-quickcheck_2.12:0.1-SNAPSHOT
[warn]      org.scalactic:scalatest:3.0.1 (/home/developer/example/quickcheck/build.sbt#L11-12)
[warn]        +- progfun2-quickcheck:progfun2-quickcheck_2.12:0.1-SNAPSHOT
[warn]      org.scalacheck:scalacheck:1.13.4 (/home/developer/example/quickcheck/build.sbt#L10-11)
[warn]        +- progfun2-quickcheck:progfun2-quickcheck_2.12:0.1-SNAPSHOT
[warn]      org.scalatest:scalatest:3.0.1 (/home/developer/example/quickcheck/build.sbt#L12-13)
[warn]        +- progfun2-quickcheck:progfun2-quickcheck_2.12:0.1-SNAPSHOT
[warn]      org.scalacheck:scalacheck_2.12:1.12.1 (/home/developer/example/quickcheck/build.sbt#L9-10)
[warn]        +- progfun2-quickcheck:progfun2-quickcheck_2.12:0.1-SNAPSHOT
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: org.scalatest#scalatest_2.12;2.2.4: not found
[error] unresolved dependency: org.scalacheck#scalacheck_2.12;1.12.1: not found
[error] unresolved dependency: org.scalactic#scalatest;3.0.1: not found
[error] unresolved dependency: org.scalacheck#scalacheck;1.13.4: not found
[error] unresolved dependency: org.scalatest#scalatest;3.0.1: not found

Upvotes: 2

Views: 1474

Answers (2)

Sathya
Sathya

Reputation: 233

In the plugins.sbt file make sure that sbt-plugin version is greater than or equal to 2.3.8

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.8")

Upvotes: 0

Apocalisp
Apocalisp

Reputation: 35054

Try removing this line from your build.sbt:

libraryDependencies += "org.scalactic" % "scalatest" % "3.0.1"

Upvotes: 1

Related Questions