Closed glenviewjeff closed 13 years ago
It looks like you are using sbt 0.11.0, which the plugin has not yet been published for.
In sbt 0.11.0, the new way to add a plugin dependency is, in project/plugins/build.sbt
:
addSbtPlugin("org" % "name" % "version")
Follow the Hacking on the plugin guide on the README, and try again. This should resolve your issue.
sorry it's all a bit messy at the moment with different versions of sbt floating around, different versions of the plugin, unpublished snapshots and so on. i hope it will all stabilise soon.
i added a sbt_011 branch to the giter8 template:
$ g8 jberkel/android-app -b sbt-0_11
Thanks!
hope everything works now, i updated the README
Still fails for me. Do I need to update g8 or do some other update? See below:
$ g8.bat jberkel/android-app -b sbt-0_11
Template for Android apps in Scala
package [my.android.project]: com.zoomabug.neverforget name [My Android Project]: Never Forget main_activity [MainActivity]: MainMenuActivity api_level [10]: 9
Applied jberkel/android-app.g8 in never-forget
$ sbt [info] Loading project definition from D:\Workspaces\NeverForget\never-forget\project\plugins [info] Updating {file:/D:/Workspaces/NeverForget/never-forget/project/plugins/}default-c389a1... [warn] module not found: org.scala-tools.sbt#sbt-android-plugin;0.6.0-SNAPSHOT [warn] ==== typesafe-ivy-releases: tried [warn] http://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-android-plugin/scala_2.9.1/sbt_0.11.0/0.6.0-SNAPSHOT/ivys/ivy.xml [warn] -- artifact org.scala-tools.sbt#sbt-android-plugin;0.6.0-SNAPSHOT!sbt-android-plugin.jar: [warn] http://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-android-plugin/scala_2.9.1/sbt_0.11.0/0.6.0-SNAPSHOT/jars/sbt-android-plugin.jar [warn] ==== local: tried [warn] C:\Users\Jeff.ivy2/local/org.scala-tools.sbt/sbt-android-plugin/scala_2.9.1/sbt_0.11.0/0.6.0-SNAPSHOT/ivys/ivy.xml [warn] -- artifact org.scala-tools.sbt#sbt-android-plugin;0.6.0-SNAPSHOT!sbt-android-plugin.jar: [warn] C:\Users\Jeff.ivy2/local/org.scala-tools.sbt/sbt-android-plugin/scala_2.9.1/sbt_0.11.0/0.6.0-SNAPSHOT/jars/sbt-android-plugin.jar [warn] ==== public: tried [warn] http://repo1.maven.org/maven2/org/scala-tools/sbt/sbt-android-plugin_2.9.1_0.11.0/0.6.0-SNAPSHOT/sbt-android-plugin-0.6.0-SNAPSHOT.pom [warn] -- artifact org.scala-tools.sbt#sbt-android-plugin;0.6.0-SNAPSHOT!sbt-android-plugin.jar: [warn] http://repo1.maven.org/maven2/org/scala-tools/sbt/sbt-android-plugin_2.9.1_0.11.0/0.6.0-SNAPSHOT/sbt-android-plugin-0.6.0-SNAPSHOT.jar [warn] ==== Scala-Tools Maven2 Repository: tried [warn] http://scala-tools.org/repo-releases/org/scala-tools/sbt/sbt-android-plugin_2.9.1_0.11.0/0.6.0-SNAPSHOT/sbt-android-plugin-0.6.0-SNAPSHOT.pom [warn] -- artifact org.scala-tools.sbt#sbt-android-plugin;0.6.0-SNAPSHOT!sbt-android-plugin.jar: [warn] http://scala-tools.org/repo-releases/org/scala-tools/sbt/sbt-android-plugin_2.9.1_0.11.0/0.6.0-SNAPSHOT/sbt-android-plugin-0.6.0-SNAPSHOT.jar [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: org.scala-tools.sbt#sbt-android-plugin;0.6.0-SNAPSHOT: not found [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] [warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes. [warn] org.scala-tools.sbt:sbt-android-plugin:0.6.0-SNAPSHOT (sbtVersion=0.11.0, scalaVersion=2.9.1) [warn] [error] {file:/D:/Workspaces/NeverForget/never-forget/project/plugins/}default-c389a1/*:update: sbt.ResolveException: unresolved dependency: org.scala-tools.sbt#sbt-android-plugin;0.6.0-SNAPSHOT: not found Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
did you do a publish-local
with sbt_011 ?
Thanks, this fixed it. It wasn't clear that this was still necessary after the sbt_011 branch was added. I also added an explicit step on the README to clarify.
See this Stack Overflow post.
[info] Loading project definition from /Users/macarse/Documents/scalatest/project/plugins [info] Updating {file:/Users/macarse/Documents/scalatest/project/plugins/}default-dd299a... [warn] module not found: org.scala-tools.sbt#sbt-android-plugin_2.9.1;0.6.0-SNAPSHOT [warn] ==== typesafe-ivy-releases: tried [warn] http://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/ivys/ivy.xml [warn] -- artifact org.scala-tools.sbt#sbt-android-plugin_2.9.1;0.6.0-SNAPSHOT!sbt-android-plugin_2.9.1.jar: [warn] http://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/jars/sbt-android-plugin_2.9.1.jar [warn] ==== local: tried [warn] /Users/macarse/.ivy2/local/org.scala-tools.sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/ivys/ivy.xml [warn] -- artifact org.scala-tools.sbt#sbt-android-plugin_2.9.1;0.6.0-SNAPSHOT!sbt-android-plugin_2.9.1.jar: [warn] /Users/macarse/.ivy2/local/org.scala-tools.sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/jars/sbt-android-plugin_2.9.1.jar [warn] ==== public: tried [warn] http://repo1.maven.org/maven2/org/scala-tools/sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/sbt-android-plugin_2.9.1-0.6.0-SNAPSHOT.pom [warn] -- artifact org.scala-tools.sbt#sbt-android-plugin_2.9.1;0.6.0-SNAPSHOT!sbt-android-plugin_2.9.1.jar: [warn] http://repo1.maven.org/maven2/org/scala-tools/sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/sbt-android-plugin_2.9.1-0.6.0-SNAPSHOT.jar [warn] ==== Scala-Tools Maven2 Repository: tried [warn] http://scala-tools.org/repo-releases/org/scala-tools/sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/sbt-android-plugin_2.9.1-0.6.0-SNAPSHOT.pom [warn] -- artifact org.scala-tools.sbt#sbt-android-plugin_2.9.1;0.6.0-SNAPSHOT!sbt-android-plugin_2.9.1.jar: [warn] http://scala-tools.org/repo-releases/org/scala-tools/sbt/sbt-android-plugin_2.9.1/0.6.0-SNAPSHOT/sbt-android-plugin_2.9.1-0.6.0-SNAPSHOT.jar [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: org.scala-tools.sbt#sbt-android-plugin_2.9.1;0.6.0-SNAPSHOT: not found [warn] :::::::::::::::::::::::::::::::::::::::::::::: [error] {file:/Users/macarse/Documents/scalatest/project/plugins/}default-dd299a/*:update: sbt.ResolveException: unresolved dependency: org.scala-tools.sbt#sbt-android-plugin_2.9.1;0.6.0-SNAPSHOT: not found Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?