3

i've read all of the similar questions but neither of the suggestions fixes my problem. Perhaps i am unable to see it.

The problem is i have project/plugins.sbt and when i try to add for example

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.11.2")

it gives me

[error] (*:update) sbt.ResolveException: 
unresolved dependency: com.eed3si9n#sbt-assembly;0.11.2: not found

then i add

resolvers += "sonatype-releases" at "https://oss.sonatype.org/content/repositories/releases/"

but the error is same

my sbt version is

sbt launcher version 0.13.8

and scala version is

Scala code runner version 2.11.6 -- Copyright 2002-2013, LAMP/EPFL

Perhaps someone can point me the right direction. Thanks in advance.

EDIT: when i put

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0")

to project/assembly.sbt i got the same error

actually i do not think the error is for sbt-assembly it gives the same sort of error when i try to add other plugins

[info] Resolving com.eed3si9n#sbt-assembly;0.13.0 ...
[warn]  module not found: com.eed3si9n#sbt-assembly;0.13.0
[warn] ==== local: tried
[warn]   .ivy2/local/com.eed3si9n/sbt-assembly/scala_2.11/sbt_0.13/0.13.0/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly_2.11_0.13/0.13.0/sbt-assembly-0.13.0.pom
[warn] ==== Typesafe Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/eed3si9n/sbt-assembly_2.11_0.13/0.13.0/sbt-assembly-0.13.0.pom
[info] Resolving jline#jline;2.12.1 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.eed3si9n#sbt-assembly;0.13.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.eed3si9n:sbt-assembly:0.13.0 (sbtVersion=0.13, scalaVersion=2.11)
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      com.eed3si9n:sbt-assembly:0.13.0 (sbtVersion=0.13, scalaVersion=2.11) (assembly.sbt#L2-3)
1.0

EDIT

Ok for the others that are careless like me in all the docs it says like project/plugins.sbt, or project/assembly.sbt, etc... actualy i thought "project" should be the project folder of the application but it is the [your_project_name]/project :( so all the mentioned conf should go in that directory.

thanks a lot for the replies..

whb
  • 661
  • 2
  • 10
  • 22

2 Answers2

0

sbt-assembly:

For sbt 0.13.6+ add sbt-assembly as a dependency in project/assembly.sbt:

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0")
swiesend
  • 1,051
  • 1
  • 13
  • 23
  • 1) try to remove all occurrences of `addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.11.2")` 2) remove the `resolvers += "sonatype-releases" ...` 3) or maybe try to clean your .ivy folder – swiesend Jun 09 '15 at 20:20
  • it works when i remove them. btw i am using idea sbt plugin. when i refresh it just gives me the warning `[warn] Multiple dependencies with the same organization/name but different versions. To avoid conflict, pick one version: [warn] * org.scala-lang:scala-reflect:(2.11.1, 2.11.6)` but the code compiles with success – whb Jun 09 '15 at 20:24
  • add `scalaVersion := "2.11.6"` to your `build.sbt` to avoid conflicts – swiesend Jun 09 '15 at 20:29
  • IntelliJ sometimes caches multiple versions of the same libraries which may cause confusion during runtime. To clean those up go to "File -> Project Structure" in IntelliJ and manually delete any duplicated libraries you may have. – marios Jun 09 '15 at 20:34
  • then try to clean your `.ivy2` folder from the different versions... that should eliminate the ambiguity, but you have to download all dependencies again: `rm -rf ~/.ivy2/cache/*`. Or search manually for the ambiguous version in the `.ivy2/cache` and just delete that one – swiesend Jun 09 '15 at 20:40
0

Maybe the problem is with the version of the plugin you want to use?

Try this:

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0")
marios
  • 8,874
  • 3
  • 38
  • 62
  • I see. Can you try to remove all our resolved from the build.sbt? Give it another try. – marios Jun 09 '15 at 20:19
  • it works when i remove them. btw i am using idea sbt plugin. when i refresh it just gives me the warning [`warn] Multiple dependencies with the same organization/name but different versions. To avoid conflict, pick one version: [warn] * org.scala-lang:scala-reflect:(2.11.1, 2.11.6)` but the code compiles with success – whb Jun 09 '15 at 20:34