sbt / sbt-onejar

Packages your project using One-JAR™
MIT License
268 stars 45 forks source link

Unresolved dependency when using sbt-0.11.2 #6

Closed leedm777 closed 12 years ago

leedm777 commented 12 years ago

I get an unresolved dependency error when I try to use sbt-onejar 0.6 from sbt-0.11.2. Here's my plugins.sbt:

resolvers += "retronym-releases" at "http://retronym.github.com/repo/releases"

addSbtPlugin("com.github.retronym" % "sbt-onejar" % "0.6")

And here's the error message:

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.github.retronym#sbt-onejar;0.6: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.github.retronym:sbt-onejar:0.6 (sbtVersion=0.11.2, scalaVersion=2.9.1)
[warn] 
[error] {file:/Users/dlee/prj/operator/node-agent/project/}root/*:update: sbt.ResolveException: unresolved dependency: com.github.retronym#sbt-onejar;0.6: not found

What's weird is that I can see a link to the artifact in the repo (http://retronym.github.com/repo/releases/com/github/retronym/), but get a 404 if I click on it (http://retronym.github.com/repo/releases/com/github/retronym/sbt-onejar_2.9.1_0.11.2/0.6/sbt-onejar-0.6.jar).

retronym commented 12 years ago
  ~/code/scratch/20111207 sbt -sbt-create
Starting sbt: invoke with -help for other options
[info] Loading global plugins from /Users/jason/.sbt/plugins
[info] Set current project to default-acac64 (in build file:/Users/jason/code/scratch/20111207/)
> reload plugins
[info] Loading global plugins from /Users/jason/.sbt/plugins
[info] Set current project to default-1c3553 (in build file:/Users/jason/code/scratch/20111207/project/)
> set resolvers += "retronym-releases" at "http://retronym.github.com/repo/releases"
[info] Reapplying settings...
[info] Set current project to default-1c3553 (in build file:/Users/jason/code/scratch/20111207/project/)
> set addSbtPlugin("com.github.retronym" % "sbt-onejar" % "0.6")

[info] Reapplying settings...
[info] Set current project to default-1c3553 (in build file:/Users/jason/code/scratch/20111207/project/)

> session save
[info] Reapplying settings...
[info] Set current project to default-1c3553 (in build file:/Users/jason/code/scratch/20111207/project/)

> reload return
[info] Loading global plugins from /Users/jason/.sbt/plugins
[info] Loading project definition from /Users/jason/code/scratch/20111207/project
[info] Updating {file:/Users/jason/code/scratch/20111207/project/}default-1c3553...
[info] Done updating.
[info] Set current project to default-acac64 (in build file:/Users/jason/code/scratch/20111207/)

[error] Type error in expression
> set seq(oneJarSettings:_*)   
[info] Reapplying settings...
[info] Set current project to default-acac64 (in build file:/Users/jason/code/scratch/20111207/)

> one-jar
[info] Updating {file:/Users/jason/code/scratch/20111207/}default-acac64...
[info] Done updating.
[info] Packaging /Users/jason/code/scratch/20111207/target/scala-2.9.1/default-acac64_2.9.1-0.1.jar ...
[info] Done packaging.
[info] Packaging /Users/jason/code/scratch/20111207/target/scala-2.9.1/default-acac64_2.9.1-0.1-one-jar.jar ...
[info] Done packaging.
[success] Total time: 1 s, completed Dec 7, 2011 11:26:45 PM
leedm777 commented 12 years ago

Do you have that version of onejar already installed in your local ivy cache? Or is your sbt script defaulting to sbt-0.11.1? Could you rm -rf ~/.ivy2/cache/com.github.retronym/ and try again adding -sbt-version 0.11.2?

[dlee@dlee-mac onejar]$ sbt -sbt-create -sbt-version 0.11.2
Detected sbt version 0.11.2
Starting sbt: invoke with -help for other options
[info] Loading global plugins from /Users/dlee/.sbt/plugins/project
[info] Loading global plugins from /Users/dlee/.sbt/plugins
[info] Set current project to default-bc9f59 (in build file:/Users/dlee/tmp/onejar/)

sbt> reload plugins
[info] Loading global plugins from /Users/dlee/.sbt/plugins/project
[info] Loading global plugins from /Users/dlee/.sbt/plugins
[info] Set current project to default-07de01 (in build file:/Users/dlee/tmp/onejar/project/)

sbt> set resolvers += "retronym-releases" at "http://retronym.github.com/repo/releases"
[info] Reapplying settings...
[info] Set current project to default-07de01 (in build file:/Users/dlee/tmp/onejar/project/)

sbt> set addSbtPlugin("com.github.retronym" % "sbt-onejar" % "0.6")
[info] Reapplying settings...
[info] Set current project to default-07de01 (in build file:/Users/dlee/tmp/onejar/project/)

sbt> session save
[info] Reapplying settings...
[info] Set current project to default-07de01 (in build file:/Users/dlee/tmp/onejar/project/)

sbt> reload return
[info] Loading global plugins from /Users/dlee/.sbt/plugins/project
[info] Loading global plugins from /Users/dlee/.sbt/plugins
[info] Loading project definition from /Users/dlee/tmp/onejar/project
[info] Updating {file:/Users/dlee/tmp/onejar/project/}default-07de01...
[info] Resolving org.scala-tools.sbt#root;0.0 ...
[info] Resolving org.sbtsh#xsbt-sh;0.1-SNAPSHOT ...
[info] Resolving com.github.retronym#sbt-onejar;0.6 ...
[warn]  module not found: com.github.retronym#sbt-onejar;0.6
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.github.retronym/sbt-onejar/scala_2.9.1/sbt_0.11.2/0.6/ivys/ivy.xml
[warn] ==== local: tried
[warn]   /Users/dlee/.ivy2/local/com.github.retronym/sbt-onejar/scala_2.9.1/sbt_0.11.2/0.6/ivys/ivy.xml
[warn] ==== retronym-releases: tried
[warn]   http://retronym.github.com/repo/releases/com/github/retronym/sbt-onejar_2.9.1_0.11.2/0.6/sbt-onejar-0.6.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/github/retronym/sbt-onejar_2.9.1_0.11.2/0.6/sbt-onejar-0.6.pom
[warn] ==== Scala-Tools Maven2 Repository: tried
[warn]   http://scala-tools.org/repo-releases/com/github/retronym/sbt-onejar_2.9.1_0.11.2/0.6/sbt-onejar-0.6.pom
[info] Resolving org.scala-tools.sbt#sbt_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#main_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#actions_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#classfile_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#io_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#control_2.9.1;0.11.2 ...
[info] Resolving org.scala-lang#scala-library;2.9.1 ...
[info] Resolving org.scala-tools.sbt#interface;0.11.2 ...
[info] Resolving org.scala-tools.sbt#logging_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#process_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#classpath_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#launcher-interface_2.9.1;0.11.2 ...
[info] Resolving org.scala-lang#scala-compiler;2.9.1 ...
[info] Resolving org.scala-tools.sbt#incremental-compiler_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#collections_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#api_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#persist_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbinary#sbinary_2.9.0;0.4.0 ...
[info] Resolving org.scala-tools.sbt#compile_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#ivy_2.9.1;0.11.2 ...
[info] Resolving org.apache.ivy#ivy;2.2.0 ...
[info] Resolving com.jcraft#jsch;0.1.31 ...
[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-tools.sbt#completion_2.9.1;0.11.2 ...
[info] Resolving jline#jline;0.9.94 ...
[info] Resolving org.scala-tools.sbt#run_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#task-system_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#tasks_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#tracking_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#cache_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#testing_2.9.1;0.11.2 ...
[info] Resolving org.scala-tools.testing#test-interface;0.5 ...
[info] Resolving org.scala-tools.sbt#compiler-interface;0.11.2 ...
[info] Resolving org.scala-tools.sbt#precompiled-2_8_1;0.11.2 ...
[info] Resolving org.scala-tools.sbt#precompiled-2_8_0;0.11.2 ...
[info] Resolving org.scala-tools.sbt#precompiled-2_9_0;0.11.2 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.github.retronym#sbt-onejar;0.6: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.github.retronym:sbt-onejar:0.6 (sbtVersion=0.11.2, scalaVersion=2.9.1)
[warn] 
[error] {file:/Users/dlee/tmp/onejar/project/}default-07de01/*:update: sbt.ResolveException: unresolved dependency: com.github.retronym#sbt-onejar;0.6: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

FWIW - if I repeat the process with -sbt-version 0.11.1, it works.

retronym commented 12 years ago

I just pushed 0.7

http://retronym.github.com/repo/releases/com/github/retronym/sbt-onejar_2.9.1_0.11.2/0.7/

leedm777 commented 12 years ago

That works :-)