I have a Play! 2.6 project with scala 2.12 and sbt 1.1.6
I need to perform SOAP api call in my service so I saw Play! have something called Reactive SOAP for Play, and when I went in the documentation (https://github.com/playframework/play-soap#installation) the first stage was to add the plugin:
resolvers += Resolver.url("play-sbt-plugins", url("https://dl.bintray.com/playframework/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
addSbtPlugin("com.typesafe.sbt" % "sbt-play-soap" % "1.1.3")
but I get an error:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.sbt#sbt-play-soap;1.1.3: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.typesafe.sbt:sbt-play-soap:1.1.3 (scalaVersion=2.12, sbtVersion=1.0)
[warn]
did someone tried this ever? thanks
The version 1.1.3 is only available for sbt 0.13.
Since you are using sbt 1.x.x, you have to use version 1.1.4
resolvers += Resolver.url("play-sbt-plugins", url("https://dl.bintray.com/playframework/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
addSbtPlugin("com.typesafe.sbt" % "sbt-play-soap" % "1.1.4")
Related
I'm trying to use sbt-scapegoat by adding this to plugins.sbt:
addSbtPlugin("com.sksamuel.scapegoat" %% "sbt-scapegoat" % "1.0.4")
My scala version is:
2.11.12
My sbt version is:
1.1.0
And I am getting this error:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.sksamuel.scapegoat#sbt-scapegoat;1.0.4: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.sksamuel.scapegoat:sbt-scapegoat:1.0.4 (scalaVersion=2.12, sbtVersion=1.0)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.sksamuel.scapegoat:sbt-scapegoat:1.0.4 (scalaVersion=2.12, sbtVersion=1.0) (/home/nitin/workspace/nimble/oculus-analytics/project/plugins.sbt#L43-44)
[warn] +- default:oculus-analytics-build:0.1.0-SNAPSHOT (scalaVersion=2.12, sbtVersion=1.0)
[error] sbt.librarymanagement.ResolveException: unresolved dependency: com.sksamuel.scapegoat#sbt-scapegoat;1.0.4: not found
I have also tried specifying scapegoatVersion into build.sbt:
scapegoatVersion := "1.3.4"
I am using IntelliJ Idea. Thnx for help in advance.
addSbtPlugin("com.sksamuel.scapegoat" % "sbt-scapegoat" % "1.0.9")
This plugin worked with scala version 2.11.12 and sbt version 1.1.0
Looks like you have either wrong plugin name (and need scalac-scapegoat-plugin) or use %% instead of % for sbt-scapegoat which does not have _<scala version> suffix in maven repo.
Update
Ah, just noted addSbtPlugin, so should be wrong name
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)
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!