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..
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")
Maybe the problem is with the version of the plugin you want to use?
Try this:
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0")
Related
I am using sbt v0.13.9 and scala v2.11.7. I have tried adding the sbt assembly plugin to assembly.sbt as well as plugin.sbt but neither worked:
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.2")
I have tried adding the sbt native packager to the plugin.sbt but I am getting the same error (copied below):
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.0-RC1"
I have the following resolvers in my build.sbt - I am guessing I need to add a resolver for sbt assembly (even though the docs on that site do not mention anything about it):
Resolver.sonatypeRepo("public"),
Resolver.sbtPluginRepo("releases"),
Resolver.url("bintray-sbt-plugins", url("http://dl.bintray.com/sbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns),
The error I am getting is the following:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.eed3si9n#sbt-assembly;0.14.2: not found
[warn] :: com.typesafe.sbt#sbt-native-packager;1.1.0-RC1: 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.14.2 (scalaVersion=2.11, sbtVersion=0.13)
[warn] com.typesafe.sbt:sbt-native-packager:1.1.0-RC1 (scalaVersion=2.11, sbtVersion=0.13)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.eed3si9n:sbt-assembly:0.14.2 (scalaVersion=2.11, sbtVersion=0.13) (/home/test/test-server/plugins.sbt#L4-5)
[warn] +- com.test:test-server_2.11:1.0.0
[warn] com.typesafe.sbt:sbt-native-packager:1.1.0-RC1 (scalaVersion=2.11, sbtVersion=0.13) (/home/tets/test-server/plugins.sbt#L6-7)
Should I be changing the scala or sbt version to get this to work?
From the error messages above, it looks like your plugins.sbt is in your project root directory -- it should be in the ./project/ subdirectory (i.e. /home/tets/test-server/project/ ). Put the reference to sbt-assembly in ./project/assembly.sbt, and the reference to sbt-native-packager in ./project/plugins.sbt
my plugins.sbt has this:
logLevel := Level.Warn
addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "1.0.0")
resolvers += Resolver.url("sbt-plugin-releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases")) (Resolver.ivyStylePatterns)
addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
when i run sbt publish i get:
[warn] ==== sbt-plugin-releases: tried [warn]
http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/com.jsuereth/xsbt-gpg-plugin/scala_2.10/sbt_0.13/0.6/ivys/ivy.xml
[warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] ::
UNRESOLVED DEPENDENCIES :: [warn]
:::::::::::::::::::::::::::::::::::::::::::::: [warn] ::
com.jsuereth#xsbt-gpg-plugin;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.jsuereth:xsbt-gpg-plugin:0.6 (sbtVersion=0.13,
scalaVersion=2.10) [warn] sbt.ResolveException: unresolved
dependency: com.jsuereth#xsbt-gpg-plugin;0.6: not found at
sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:217) at
sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:126)
So I tried updating the addSbtPlugin to be:
addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6",
sbtVersion = "0.12", // SBT version
scalaVersion = "2.9.2" )
Now I get
[warn] The global sbt directory is now versioned and is located at /home//.sbt/0.13.
[warn] You are seeing this warning because there is global configuration in /home//.sbt but not in /home//.sbt/0.13.
[warn] The global sbt directory may be changed via the sbt.global.base system property.
[info] Loading project definition from /home//dev/projects/myproj/project
[warn] Multiple resolvers having different access mechanism configured with same name 'sbt-plugin-releases'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).
**java.lang.NoClassDefFoundError: sbt/Scoped$ListSetting**
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
anyway to fix it please?
thanks
Not sure, but I think you use a rather old version of that plugin?
I use the following with latest sbt 0.13.6. I have this globally installed in ~/.sbt/0.13/plugins/build.sbt:
addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.1") // sign Sonatype artifacts
I also left my credentials in ~/.sbt/0.13/sonatype.sbt:
credentials += Credentials("Sonatype Nexus Repository Manager",
"oss.sonatype.org",
"user-name", "pass-word")
This way I can do sbt publish-signed.
Here is the plugin documentation. (As you can see, there is already an even newer version available)
Here is the build.sbt I use in a project:
name := "FaceReg"
version := "1.0"
libraryDependencies += "org.openimaj" % "image-processing" % "1.2.1"
While updateing the project, sbt reports UNRESOLVED DEPENDENCIES:
[info] Resolving org.openimaj#image-processing;1.2.1 ...
[warn] module not found: org.openimaj#image-processing;1.2.1
[warn] ==== local: tried
[warn] /Users/jacek/.ivy2/local/org.openimaj/image-processing/1.2.1/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/org/openimaj/image-processing/1.2.1/image-processing-1.2.1.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.openimaj#image-processing;1.2.1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: org.openimaj#image-processing;1.2.1: not found
What could be issue? How to solve it?
OpenImaj has its own repository and does not publish artifacts to the maven central (that's one of the few repositories consulted by sbt by default).
Add the following resolvers to build.sbt to have the dependency resolved properly and you will be fine:
resolvers += "OpenIMAJ maven releases repository" at "http://maven.openimaj.org"
resolvers += "OpenIMAJ maven snapshots repository" at "http://snapshots.openimaj.org"
Also, make sure you use only % in artifact, not %% because right now it looks like you're targeting specific Scala version in dependency and it's not what you would want for OpenImaj.
scala is version 2.10.2 and sbt is 0.13.0
I am trying to setup scct for scala unit test code coverage so in build.sbt
I added
seq(ScctPlugin.instrumentSettings : _*)
and in project/plugins.sbt I added
resolvers += Classpaths.typesafeResolver
resolvers += "scct-github-repository" at "http://mtkopone.github.com/scct/maven-repo"
addSbtPlugin("reaktor" %% "sbt-scct" % "0.2-SNAPSHOT")
I get errors like ....
module not found: reaktor#sbt-scct;0.2-SNAPSHOT
Last message is
[warn] ==== scct-github-repository: tried
[warn] http://mtkopone.github.com/scct/maven-repo/reaktor/sbt-scct_2.10_0.13/0.2-SNAPSHOT/sbt-scct-0.2-SNAPSHOT.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: reaktor#sbt-scct;0.2-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] reaktor:sbt-scct:0.2-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.10)
I look in http://mtkopone.github.io/scct/maven-repo/reaktor/
and I see the one I seem to need is missing e.g. I see
sbt-scct_2.9.2_0.13/
scct_2.10/
and a bunch of others but no ... sbt-scct_2.10_0.13
Can you help ? (I am a sbt newbie)
SCCT has a new source code repository: https://github.com/SCCT/scct
As a result you can fetch a release version from maven central with addSbtPlugin("com.github.scct" %% "sbt-scct" % "0.2") in your plugins.sbt file.
My project to reproduce is on GitHub.
Update:
The repository has been relocated at https://github.com/sqality/scct
and you need addSbtPlugin("com.sqality.scct" % "sbt-scct" % "version") in your plugins.sbt file.
The original SCCT is inactive now.
Here are the two most active forks.
http://github.com/sqality
http://github.com/scoverage
I recently started a new project with the Play! Framework and Scala.
I'm used to using Squeryl for my ORM, but for some reason it cannot resolve my dependency this time (Although it will resolve others, just not squeryl).
The only thing I'm doing differently is that I'm on a different computer than I was before (Windows now, Arch before) and I'm using Play 2.1.1 instead of 2.1.
EDIT: I am also behind a proxy, I thought this may have been resolved since I can resolve some dependencies, but I can't see any other reason than the proxy is screwing with sbt. I can see the maven repo for squeryl in my browser, but sbt fails to find it.
build.properties:
sbt.version=0.12.2
Build.scala:
val appDependencies = Seq(
// Add your project dependencies here,
jdbc,
"org.squeryl" %% "squeryl" % "0.9.5-6"
)
plugins.sbt:
// Comment to get more information during initialization
logLevel := Level.Warn
// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
// Use the Play sbt plugin for Play projects
addSbtPlugin("play" % "sbt-plugin" % "2.1.1")
Console:
C:\Path\To\Play\APP>play run
[info] Loading project definition from C:\Path\To\Play\APP
....
[warn] module not found: org.squeryl#squeryl_2.10;0.9.5-6
[warn] ==== local: tried
[warn] C:\Path\To\Play\play-2.1.1\repository\local\org.squeryl\squeryl_2.10
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/org/squeryl/squeryl_2.10/0.9.5-6/squeryl_2.10-0.9.5-6.po
[warn] ==== Typesafe Snapshots Repository: tried
[warn] http://repo.typesafe.com/typesafe/snapshots/org/squeryl/squeryl_2.10/0.9.5-6/squeryl_2.10-0.9.5-6.p
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/org/squeryl/squeryl_2.10/0.9.5-6/squeryl_2.10-0.9.5-6.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.squeryl#squeryl_2.10;0.9.5-6: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: org.squeryl#squeryl_2.10;0.9.5-6: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:214)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
...
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[error] (*:update) sbt.ResolveException: unresolved dependency: org.squeryl#squeryl_2.10;0.9.5-6: not found
[warn] some of the dependencies were not recompiled properly, so classloader is not avaialable
[info] Updating {file:/C:/Path/To/Play/APP}
[warn] module not found: org.squeryl#squeryl_2.10;0.9.5-6
[warn] ==== local: tried
[warn] C:\Path\To\Play\play-2.1.1\repository\local\org.squeryl\squeryl_2.10
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/org/squeryl/squeryl_2.10/0.9.5-6/squeryl_2.10-0.9.5-6.po
[warn] ==== Typesafe Snapshots Repository: tried
[warn] http://repo.typesafe.com/typesafe/snapshots/org/squeryl/squeryl_2.10/0.9.5-6/squeryl_2.10-0.9.5-6.p
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/org/squeryl/squeryl_2.10/0.9.5-6/squeryl_2.10-0.9.5-6.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.squeryl#squeryl_2.10;0.9.5-6: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: org.squeryl#squeryl_2.10;0.9.5-6: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:214)
.....
at java.lang.Thread.run(Unknown Source)
[error] (*:update) sbt.ResolveException: unresolved dependency: org.squeryl#squeryl_2.10;0.9.5-6: not found
When you see http://repo1.maven.org/maven2/org/squeryl/
you will get solution.
PROJECT/project/Build.scala
val appDependencies = Seq(
// Add your project dependencies here,
jdbc,
anorm,
"org.squeryl" % "squeryl_2.10" % "0.9.5-6"
)
This is from my build.sbt (well, a relevant section) - what scala version?
scalaVersion := "2.10.1"
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases"
libraryDependencies ++= Seq(
"org.squeryl" %% "squeryl" % "0.9.5-6",
To be sure that it's not a potential SBT project's configuration issue, don't use for now the %% notation. Indeed, this one automatically chooses the Jar version corresponding to your current scala version, which may be different than the one you expect (oversight in your conf, conflict of variables in some configuration files etc...).
Prefer this in order to isolate your "error" context:
libraryDependencies += "org.squeryl" % "squeryl" % "0.9.5-6"
It ended up being an issue with my proxy at work, it was setup wrong and had to correct it. All is well now!