2

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
damian
  • 1,419
  • 1
  • 22
  • 41
  • Try to add "sonatype" and see how it goes? `"Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots", "Sonatype releases" at "http://oss.sonatype.org/content/repositories/releases"` – VasiliNovikov Jun 06 '13 at 15:26

4 Answers4

4

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"
)
bistros
  • 1,139
  • 1
  • 9
  • 23
  • I can navigate and see it in my browser but sbt doesn't for some reason... `[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` – damian Jun 07 '13 at 20:10
  • For Play 2.6 and maybe lower versions too the entry `"org.squeryl" %% "squeryl" % "0.9.5-7"` will work. – Michał Kreft Jul 12 '17 at 17:39
0

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"
Momog
  • 567
  • 7
  • 27
0

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",

Joe NaPuu
  • 79
  • 5
  • The resolvers is the same as mine, but play packs it's own scala into itself. I don't actually have a build.sbt file, I have a plugins.sbt file. But it does use scala 2.10, it's in my target folder. – damian Jun 06 '13 at 13:31
  • Wait, you mean you copy-pasted squeryl into plugins.sbt? This won't work, because squeryl isn't a SBT plugin.. – VasiliNovikov Jun 06 '13 at 15:28
  • No no no, the code I posted in my original is my Build.scala file. The plugins.sbt file basically looks like the one you posted with some play stuff added. – damian Jun 06 '13 at 15:42
0

It ended up being an issue with my proxy at work, it was setup wrong and had to correct it. All is well now!

damian
  • 1,419
  • 1
  • 22
  • 41