plotply scala sbt unresolved dependency not found - scala

I am trying to get started with plotly using scala. I am following their guide to the letter but sbt returns an error:
Error:Error while importing SBT project:
[info] Resolving org.scala-sbt#run;0.13.8 ...
[info] Resolving org.scala-sbt#task-system;0.13.8 ...
[info] Resolving org.scala-sbt#tasks;0.13.8 ...
[info] Resolving org.scala-sbt#tracking;0.13.8 ...
[info] Resolving org.scala-sbt#cache;0.13.8 ...
[info] Resolving org.scala-sbt#testing;0.13.8 ...
[info] Resolving org.scala-sbt#test-agent;0.13.8 ...
[info] Resolving org.scala-sbt#test-interface;1.0 ...
[info] Resolving org.scala-sbt#main-settings;0.13.8 ...
[info] Resolving org.scala-sbt#apply-macro;0.13.8 ...
[info] Resolving org.scala-sbt#command;0.13.8 ...
[info] Resolving org.scala-sbt#logic;0.13.8 ...
[info] Resolving org.scala-sbt#precompiled-2_8_2;0.13.8 ...
[info] Resolving org.scala-sbt#precompiled-2_9_2;0.13.8 ...
[info] Resolving org.scala-sbt#precompiled-2_9_3;0.13.8 ...
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: co.theasi#plotly_2.11;0.2.0: not found
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: co.theasi#plotly_2.11;0.2.0: not found
[error] Total time: 10 s, completed Jul 16, 2016 3:29:59 PM</pre><br/>See complete log in /home/michael/.IdeaIC2016.1/system/log/sbt.last.log
Can someone please help me resolve this issue?
My build.sbt is as follows:
name := "plotly"
version := "1.0"
scalaVersion := "2.11.8"
libraryDependencies += "co.theasi" %% "plotly" % "0.2.0"

There is only 0.1 version on maven central - link. And 0.2 is not yet released. To use 0.2 version change your build.sbt file:
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
libraryDependencies += "co.theasi" %% "plotly" % "0.2-SNAPSHOT"

Related

SBT failing to resolve dependency [ResolveException]

I have the following in my build.sbt file:
lazy val root = (project in file(".")).
settings(
inThisBuild(List(
scalaVersion := "2.13.4",
)),
name := "ScalaTest",
resolvers += "spigot-repo" at "https://hub.spigotmc.org/nexus/content/repositories/snapshots/",
libraryDependencies += "org.spigotmc" % "spigot-api" % "1.16.5-R0.1-SNAPSHOT" % "provided" intransitive(),
version := "1.0"
)
Which, when using IntelliJ and trying to refresh / reimport the project, a few issues occur:
Dependencies won't resolve despite working with maven / Gradle.
Produces the following error
/Users/harrydrummond/Library/Java/JavaVirtualMachines/openjdk-15.0.1/Contents/Home/bin/java -Djline.terminal=jline.UnsupportedTerminal -Dsbt.log.noformat=true -Dfile.encoding=UTF-8 -Didea.managed=true -Dfile.encoding=UTF-8 -jar /Users/harrydrummond/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/203.7148.57/IntelliJ IDEA.app.plugins/Scala/launcher/sbt-launch.jar
[info] welcome to sbt 1.4.7 (Oracle Corporation Java 15.0.1)
[info] loading global plugins from /Users/harrydrummond/.sbt/1.0/plugins
[info] loading settings for project t-build from plugins.sbt ...
[info] loading project definition from /Users/harrydrummond/Documents/workspace/scala/t/project
[info] loading settings for project root from build.sbt ...
[info] set current project to ScalaTest (in build file:/Users/harrydrummond/Documents/workspace/scala/t/)
[info] sbt server started at local:///Users/harrydrummond/.sbt/1.0/server/26df0aea2f87fd17e7ab/sock
[info] started sbt server
sbt:ScalaTest>
;set _root_.scala.collection.Seq(historyPath := None,shellPrompt := { _ => "" }
,SettingKey[_root_.scala.Option[_root_.sbt.File]]
("sbtStructureOutputFile")
in _root_.sbt.Global := _root_.scala.Some(_root_.sbt.file("/private/var/folders/kf/q70qvrg10ls9qd7vvb8zlvgr0000gn/T/sbt-structure.xml"))
,SettingKey[_root_.java.lang.String]("sbtStructureOptions")
in _root_.sbt.Global := "download, resolveClassifiers")
[info] Defining Global / sbtStructureOptions, Global / sbtStructureOutputFile and 1 others.
[info] The new values will be used by cleanKeepGlobs
[info] Run `last` for details.
[info] Reapplying settings...
[info] set current project to ScalaTest (in build file:/Users/harrydrummond/Documents/workspace/scala/t/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from /Users/harrydrummond/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/203.7148.57/IntelliJ IDEA.app.plugins/Scala/repo/org.jetbrains/sbt-structure-extractor/scala_2.12/sbt_1.0/2020.3/jars/sbt-structure-extractor.jar
[info] Reapplying settings...
[info] set current project to ScalaTest (in build file:/Users/harrydrummond/Documents/workspace/scala/t/)
[warn]
[warn] Note: Unresolved dependencies path:
[error] stack trace is suppressed; run 'last update' for the full output
[error] stack trace is suppressed; run 'last ssExtractDependencies' for the full output
[error] (update) sbt.librarymanagement.ResolveException: Error downloading org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT
[error] Not found
[error] Not found
[error] not found: /Users/harrydrummond/.ivy2/localorg.spigotmc/spigot-api/1.16.5-R0.1-SNAPSHOT/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/org/spigotmc/spigot-api/1.16.5-R0.1-SNAPSHOT/spigot-api-1.16.5-R0.1-SNAPSHOT.pom
[error] download error: Caught java.io.IOException: Server returned HTTP response code: 403 for URL: https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.16.5-R0.1-SNAPSHOT/spigot-api-1.16.5-R0.1-SNAPSHOT.pom (Server returned HTTP response code: 403 for URL: https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.16.5-R0.1-SNAPSHOT/spigot-api-1.16.5-R0.1-SNAPSHOT.pom) while downloading https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.16.5-R0.1-SNAPSHOT/spigot-api-1.16.5-R0.1-SNAPSHOT.pom
[error] (ssExtractDependencies) sbt.librarymanagement.ResolveException: Error downloading org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT
[error] Not found
[error] Not found
[error] not found: /Users/harrydrummond/.ivy2/localorg.spigotmc/spigot-api/1.16.5-R0.1-SNAPSHOT/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/org/spigotmc/spigot-api/1.16.5-R0.1-SNAPSHOT/spigot-api-1.16.5-R0.1-SNAPSHOT.pom
[error] download error: Caught java.io.IOException: Server returned HTTP response code: 403 for URL: https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.16.5-R0.1-SNAPSHOT/spigot-api-1.16.5-R0.1-SNAPSHOT.pom (Server returned HTTP response code: 403 for URL: https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.16.5-R0.1-SNAPSHOT/spigot-api-1.16.5-R0.1-SNAPSHOT.pom) while downloading https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.16.5-R0.1-SNAPSHOT/spigot-api-1.16.5-R0.1-SNAPSHOT.pom
[error] Total time: 1 s, completed 21 Feb 2021, 16:54:13
[info] shutting down sbt server

Facing issue with sbt dependency

I try to use the phoenix-spark jar to laod phoenix table to Spark 2.2.3 DataFrame
adding this dependency:
libraryDependencies += "org.apache.phoenix" % "phoenix-spark2" % "4.7.0.2.6.5.1102-5"
I tested this two resolvers one by one:
resolvers += "Hortonworks Repository" at "http://repo.hortonworks.com/content/repositories/releases/"
resolvers += "Hortonworks Releases" at "http://repo.hortonworks.com/content/groups/public/"
I had the folowing error:
[info] welcome to sbt 1.3.13 (Oracle Corporation Java 1.8.0_261)
[info] loading project definition from /home/ambac61n/IdeaProjects/phoenix_test/project
[info] loading settings for project phoenix_test from build.sbt ...
[info] set current project to phoenix_test (in build file:/home/my_user/IdeaProjects/phoenix_test/)
[info] sbt server started at local:///home/ambac61n/.sbt/1.0/server/0c2856c06fe3f2cf2706/sock
sbt:phoenix_test>
[info] Defining Global / sbtStructureOptions, Global / sbtStructureOutputFile and 1 others.
[info] The new values will be used by cleanKeepGlobs
[info] Run `last` for details.
[info] Reapplying settings...
[info] set current project to phoenix_test (in build file:/home/ambac61n/IdeaProjects/phoenix_test/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from /home/my_user/.local/share/JetBrains/IdeaIC2020.2/Scala/repo/org.jetbrains/sbt-structure-extractor/scala_2.12/sbt_1.0/2018.2.1+4-88400d3f/jars/sbt-structure-extractor.jar
[info] Reapplying settings...
[info] set current project to phoenix_test (in build file:/home/my_user/IdeaProjects/phoenix_test/)
[warn]
[warn] Note: Unresolved dependencies path:
[error] stack trace is suppressed; run 'last update' for the full output
[error] stack trace is suppressed; run 'last ssExtractDependencies' for the full output
[error] (update) sbt.librarymanagement.ResolveException: Error downloading org.apache.phoenix:phoenix-spark2:4.7.0.2.6.5.1102-5
[error] Not found
[error] Not found
[error] not found: /home/ambac61n/.ivy2/local/org.apache.phoenix/phoenix-spark2/4.7.0.2.6.5.1102-5/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/org/apache/phoenix/phoenix-spark2/4.7.0.2.6.5.1102-5/phoenix-spark2-4.7.0.2.6.5.1102-5.pom
[error] not found: http://repo.hortonworks.com/content/repositories/releases/org/apache/phoenix/phoenix-spark2/4.7.0.2.6.5.1102-5/phoenix-spark2-4.7.0.2.6.5.1102-5.pom
[error] (ssExtractDependencies) sbt.librarymanagement.ResolveException: Error downloading org.apache.phoenix:phoenix-spark2:4.7.0.2.6.5.1102-5
[error] Not found
[error] Not found
[error] not found: /home/ambac61n/.ivy2/local/org.apache.phoenix/phoenix-spark2/4.7.0.2.6.5.1102-5/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/org/apache/phoenix/phoenix-spark2/4.7.0.2.6.5.1102-5/phoenix-spark2-4.7.0.2.6.5.1102-5.pom
[error] not found: http://repo.hortonworks.com/content/repositories/releases/org/apache/phoenix/phoenix-spark2/4.7.0.2.6.5.1102-5/phoenix-spark2-4.7.0.2.6.5.1102-5.pom
[error] Total time: 3 s, completed 22 août 2020 05:56:14
[info] shutting down sbt server
Do you have any Idea?
After vising those repositories, I noticed that there is no package, indeed.
For the first repository,
https://repo1.maven.org/maven2/org/apache/phoenix/
No package for the phoenix-spark2
and the second repository,
https://repo.hortonworks.com/content/repositories/releases/org/apache/phoenix/phoenix-spark2/
No package for the 4.7.0.2.6.5.1102-5 version
Try with the other versions.

Why is my build.sbt looking for version 2.11 of hadoop-streaming?

Im doing a pluralsight course on Apache Spark and at one point they ask us to setup a dependency on Hadoop-streaming. I've added it to my build.sbt file, but the results I'm getting are unexpected:
Build.sbt
name := "SparkPlayground"
version := "1.0"
scalaVersion := "2.11.8"
libraryDependencies += "org.apache.spark" %% "spark-core" % "2.0.0" % "provided"
libraryDependencies += "com.github.scala-incubator.io" %% "scala-io-core" % "0.4.3"
libraryDependencies += "com.github.scala-incubator.io" %% "scala-io-file" % "0.4.3"
libraryDependencies += "org.apache.hadoop" %% "hadoop-streaming" % "2.7.0"
Error message
SBT 'SparkPlayground' project refresh failed
Error:Error:Error while importing SBT project:<br/>...<br/><pre>[info] Resolving org.scala-sbt#task-system;0.13.8 ...
[info] Resolving org.scala-sbt#tasks;0.13.8 ...
[info] Resolving org.scala-sbt#tracking;0.13.8 ...
[info] Resolving org.scala-sbt#cache;0.13.8 ...
[info] Resolving org.scala-sbt#testing;0.13.8 ...
[info] Resolving org.scala-sbt#test-agent;0.13.8 ...
[info] Resolving org.scala-sbt#test-interface;1.0 ...
[info] Resolving org.scala-sbt#main-settings;0.13.8 ...
[info] Resolving org.scala-sbt#apply-macro;0.13.8 ...
[info] Resolving org.scala-sbt#command;0.13.8 ...
[info] Resolving org.scala-sbt#logic;0.13.8 ...
[info] Resolving org.scala-sbt#precompiled-2_8_2;0.13.8 ...
[info] Resolving org.scala-sbt#precompiled-2_9_2;0.13.8 ...
[info] Resolving org.scala-sbt#precompiled-2_9_3;0.13.8 ...
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: org.apache.hadoop#hadoop-streaming_2.11;2.6.0: not found
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.apache.hadoop#hadoop-streaming_2.11;2.6.0: not found
[error] Total time: 13 s, completed Sep 5, 2016 2:05:47 AM
From the error message it looks like sbt is looking for hadoop-streaming_2.11 for some reason, but I have no idea where this 2.11 comes from. I'm pretty new to Scala and sbt so I'm guessing I made some dumb typo somewhere
"If you use groupID %% artifactID % revision rather than groupID % artifactID % revision (the difference is the double %% after the groupID), sbt will add your project’s Scala version to the artifact name."
From SBT manual.
So you should just use % here.

scala play sbt configuration for simple tutorial

I'm trying to build my first play app. I'm following the (the video at play tutorial https://www.playframework.com/) but I am having problems with the sbt file.
sorm generates an SBT version conflict.
name := """gig"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
jdbc,
cache,
ws,
"org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % Test
)
//libraryDependencies += "org.sorm-framework" % "sorm" % "0.3.19"
resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"
I also get an unresolved repository error if I add:
libraryDependencies += "com.h2database" % "h2" % "1.3.148"
How can I solve these 2 problems?
EDIT:
This is the error:
Error:Error while importing SBT project:<br/>...<br/><pre>[info] Resolving com.typesafe.play#play-doc_2.11;1.2.2 ...
[info] Resolving org.pegdown#pegdown;1.4.0 ...
[info] Resolving org.parboiled#parboiled-java;1.1.5 ...
[info] Resolving org.parboiled#parboiled-core;1.1.5 ...
[info] Resolving org.ow2.asm#asm;4.1 ...
[info] Resolving org.ow2.asm#asm-tree;4.1 ...
[info] Resolving org.ow2.asm#asm-analysis;4.1 ...
[info] Resolving org.ow2.asm#asm-util;4.1 ...
[info] Resolving org.scala-lang#scala-compiler;2.11.7 ...
[info] Resolving org.scala-lang.modules#scala-xml_2.11;1.0.4 ...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[error] Modules were resolved with conflicting cross-version suffixes in {file:/Users/donbeo/Documents/scala_code/gig/}root:
[error] org.scala-lang.modules:scala-xml _2.11, _2.12.0-M4
[error] org.scala-lang.modules:scala-parser-combinators _2.11, _2.12.0-M4
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output.
[error] (*:update) Conflicting cross-version suffixes in: org.scala-lang.modules:scala-xml, org.scala-lang.modules:scala-parser-combinators
[error] (*:ssExtractDependencies) Conflicting cross-version suffixes in: org.scala-lang.modules:scala-xml, org.scala-lang.modules:scala-parser-combinators
[error] Total time: 26 s, completed Jun 17, 2016 10:34:45 PM</pre><br/>See complete log in /Users/donbeo/Library/Logs/IntelliJIdea2016.1/sbt.last.log
This is the play version addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.4")
It seems like a sorm dependency named embrace is messing up things a little bit.
Since it was misconfigured, it always asks for the last version of scala, and since scala 2.12 "betas" were released, he is asking for those.
The same issue is described here:
Why do I get conflicting cross-version in sbt on one environment but not another?
To solve your issue you need to force the scala version with:
dependencyOverrides += "org.scala-lang" % "scala-compiler" % scalaVersion.value
(You can put it at the end of build.sbt file)
Then we need to clear the ivy2 cache for sorm:
rm -r ~/.ivy2/cache/org.sorm-framework/sorm/
Now run
sbt update
My suggestion would be for you to open an issue about this in sorm or embrace.

sbt-idea 1.2.0 unresolved for SBT 0.12.0 and Scala 2.10.0?

I am creating a new SBT project and here are the contents of my SBT files:
build.properties
sbt.version=0.12.0
plugins.sbt
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.2.0")
build.sbt
name := "peroo"
version := "0.1-SNAPSHOT"
scalaVersion := "2.10.0"
resolvers ++= Seq(
Classpaths.typesafeResolver,
"Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/",
"Sonatype releases" at "https://oss.sonatype.org/content/repositories/releases/"
)
libraryDependencies ++= Seq(
compilerPlugin("org.scala-lang.plugins" % "continuations" % "2.10.0"),
"com.google.guava" % "guava" % "13.0"
)
scalacOptions ++= Seq("-P:continuations:enable", "-deprecation", "-unchecked", "-feature")
autoCompilerPlugins := true
Here's the error I get when I attempt to start sbt in the project directory root:
➜ peroo sbt
[info] Loading project definition from /Users/rahulphulore/projects/rahul/peroo/project
[info] Updating {file:/Users/rahulphulore/projects/rahul/peroo/project/}default-941135...
[info] Resolving com.google.guava#guava;13.0 ...
[info] Resolving com.github.mpeltonen#sbt-idea;1.2.0 ...
[warn] module not found: com.github.mpeltonen#sbt-idea;1.2.0
[warn] ==== typesafe-ivy-releases: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/com.github.mpeltonen/sbt-idea/scala_2.10/sbt_0.12/1.2.0/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/com.github.mpeltonen/sbt-idea/scala_2.10/sbt_0.12/1.2.0/ivys/ivy.xml
[warn] ==== local: tried
[warn] /Users/rahulphulore/.ivy2/local/com.github.mpeltonen/sbt-idea/scala_2.10/sbt_0.12/1.2.0/ivys/ivy.xml
[warn] ==== typesafe-ivy-releases: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/com.github.mpeltonen/sbt-idea/scala_2.10/sbt_0.12/1.2.0/ivys/ivy.xml
[warn] ==== Sonatype snapshots: tried
[warn] http://oss.sonatype.org/content/repositories/snapshots/com/github/mpeltonen/sbt-idea_2.10_0.12/1.2.0/sbt-idea-1.2.0.pom
[warn] ==== Sonatype releases: tried
[warn] https://oss.sonatype.org/content/repositories/releases/com/github/mpeltonen/sbt-idea_2.10_0.12/1.2.0/sbt-idea-1.2.0.pom
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/github/mpeltonen/sbt-idea_2.10_0.12/1.2.0/sbt-idea-1.2.0.pom
[info] Resolving org.scala-sbt#sbt;0.12.0 ...
[info] Resolving org.scala-sbt#main;0.12.0 ...
[info] Resolving org.scala-sbt#actions;0.12.0 ...
[info] Resolving org.scala-sbt#classpath;0.12.0 ...
[info] Resolving org.scala-sbt#launcher-interface;0.12.0 ...
[info] Resolving org.scala-lang#scala-library;2.10.0 ...
[info] Resolving org.scala-sbt#interface;0.12.0 ...
[info] Resolving org.scala-sbt#io;0.12.0 ...
[info] Resolving org.scala-sbt#control;0.12.0 ...
[info] Resolving org.scala-lang#scala-compiler;2.10.0 ...
[info] Resolving org.scala-lang#scala-reflect;2.10.0 ...
[info] Resolving org.scala-sbt#completion;0.12.0 ...
[info] Resolving org.scala-sbt#collections;0.12.0 ...
[info] Resolving jline#jline;1.0 ...
[info] Resolving org.scala-sbt#api;0.12.0 ...
[info] Resolving org.scala-sbt#compiler-integration;0.12.0 ...
[info] Resolving org.scala-sbt#incremental-compiler;0.12.0 ...
[info] Resolving org.scala-sbt#logging;0.12.0 ...
[info] Resolving org.scala-sbt#process;0.12.0 ...
[info] Resolving org.scala-sbt#compile;0.12.0 ...
[info] Resolving org.scala-sbt#persist;0.12.0 ...
[info] Resolving org.scala-tools.sbinary#sbinary_2.9.0;0.4.0 ...
[info] Resolving org.scala-sbt#classfile;0.12.0 ...
[info] Resolving org.scala-sbt#compiler-ivy-integration;0.12.0 ...
[info] Resolving org.scala-sbt#ivy;0.12.0 ...
[info] Resolving org.apache.ivy#ivy;2.3.0-rc1 ...
[info] Resolving com.jcraft#jsch;0.1.46 ...
[info] Resolving commons-httpclient#commons-httpclient;3.1 ...
[info] Resolving commons-logging#commons-logging;1.0.4 ...
[info] Resolving commons-codec#commons-codec;1.2 ...
[info] Resolving org.scala-sbt#run;0.12.0 ...
[info] Resolving org.scala-sbt#task-system;0.12.0 ...
[info] Resolving org.scala-sbt#tasks;0.12.0 ...
[info] Resolving org.scala-sbt#tracking;0.12.0 ...
[info] Resolving org.scala-sbt#cache;0.12.0 ...
[info] Resolving org.scala-sbt#testing;0.12.0 ...
[info] Resolving org.scala-sbt#test-agent;0.12.0 ...
[info] Resolving org.scala-tools.testing#test-interface;0.5 ...
[info] Resolving org.scala-sbt#command;0.12.0 ...
[info] Resolving org.scala-sbt#compiler-interface;0.12.0 ...
[info] Resolving org.scala-sbt#precompiled-2_8_2;0.12.0 ...
[info] Resolving org.scala-sbt#precompiled-2_10_0-m4;0.12.0 ...
[info] Resolving org.scala-lang.plugins#continuations;2.10.0 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.github.mpeltonen#sbt-idea;1.2.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.github.mpeltonen:sbt-idea:1.2.0 (sbtVersion=0.12, scalaVersion=2.10)
[warn]
sbt.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea;1.2.0: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:211)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:114)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:114)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:102)
at sbt.IvySbt.liftedTree1$1(Ivy.scala:49)
at sbt.IvySbt.action$1(Ivy.scala:49)
at sbt.IvySbt$$anon$3.call(Ivy.scala:58)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:75)
at xsbt.boot.Locks$GlobalLock.withChannelRetries$1(Locks.scala:58)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:79)
at xsbt.boot.Using$.withResource(Using.scala:11)
at xsbt.boot.Using$.apply(Using.scala:10)
at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:51)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:51)
at xsbt.boot.Locks$.apply0(Locks.scala:30)
at xsbt.boot.Locks$.apply(Locks.scala:27)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:58)
at sbt.IvySbt.withIvy(Ivy.scala:99)
at sbt.IvySbt.withIvy(Ivy.scala:95)
at sbt.IvySbt$Module.withModule(Ivy.scala:114)
at sbt.IvyActions$.update(IvyActions.scala:121)
at sbt.Classpaths$$anonfun$work$1$1.apply(Defaults.scala:949)
at sbt.Classpaths$$anonfun$work$1$1.apply(Defaults.scala:947)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$54.apply(Defaults.scala:970)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$54.apply(Defaults.scala:968)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:972)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:967)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:975)
at sbt.Classpaths$$anonfun$45.apply(Defaults.scala:855)
at sbt.Classpaths$$anonfun$45.apply(Defaults.scala:852)
at sbt.Scoped$$anonfun$hf10$1.apply(Structure.scala:586)
at sbt.Scoped$$anonfun$hf10$1.apply(Structure.scala:586)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$5.work(System.scala:71)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:238)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.github.mpeltonen#sbt-idea;1.2.0: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q
➜ peroo
What could be the issue?
Edit:
Here's what my project directory structure looks like:
I added it on Mac Mountain Lion in ~/.sbt/plugins/plugins.sbt. It works and dependencies no longer fail. I think you will need to use it outside of scala version and add the scala-reflect.jar to your path manually inside the IDE to get this working.
Your plugins.sbt file must either be global, as #alex23 illustrates, or in the project's project/ subdirectory. This way it applies to SBT and not to your own code, which presumably has no need for it.
According to the project releases page the most recent version of sbt-idea is 1.5.1 that was released for sbt 0.11, 0.12 and 0.13.
There is however a more recent version of the plugin available in http://repo1.maven.org/maven2/com/github/mpeltonen/ - 1.5.2.
You should be able to use the plugin with the following line in project/sbt-idea.sbt:
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.2")
There's a much easier yet slower approach to specify a proper version number - use latest.integration for the version part.
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "latest.integration")
An excerpt about latest.integration's performance from the documentation of Ivy:
Note that in order to find the latest revision with the appropriate status Ivy has to parse all the ivy files in your repository from the last one until it finds such a revision. Hence don't be surprised if the resolution slow down.
Please note that both IntelliJ IDEA and sbt improved since you asked the question, and there's less need for the plugin currently as in IDEA "The new version of Scala plugin comes with built-in support for SBT, with code completion and dependencies import."
I experienced apparently the same problem but with a newer version (1.5.X) that I "fixed" simply downgrading to the version 1.4.0 of the gen-idea plugin.
cat ~/.sbt/plugins/build.sbt
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.4.0")