The Artima Developer Community
Sponsored Link

Akka Concurrency Forum
Dependency issues

8 replies on 1 page. Most recent reply: Feb 19, 2013 3:02 AM by Derek Wyatt

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 8 replies on 1 page
Bobby Richards

Posts: 4
Nickname: 84972
Registered: Dec, 2012

Dependency issues Posted: Dec 7, 2012 11:21 AM
Reply to this message Reply
Advertisement
I am banging my head against the wall. I am having a hell of a time with sbt and the dependencies

Somehow I was able to go through the first example, I had the same issue and not sure how I solved it. But when I got the test chapter and tried to add the test dependencies everything crapped out.

I have tried a build.sbt, and the build file created by the akka-scala-template


here is my build file:
scalaVersion := "2.10.0-RC3"

resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"

libraryDependencies ++= Seq(
"com.typesafe.akka" % "akka-actor" % "2.10.0-RC3",
//"org.scalatest" %% "scalatest" % "2.0.M5" % "test"
"com.typesafe.akka" % "akka-testkit" % "2.1"
)


I have the typesafe resolver it will not find those dependencies (I have tried the snapshot repo as well) It appears to me what sbt is looking for is a different path than what is published in the typesafe repo.

If I remove the typesafe resolver sbt update works just fine but then I get a complete sbt compile failure, because it is not finding any of the akka imports.

I am going crazy here, please help!


Bobby Richards

Posts: 4
Nickname: 84972
Registered: Dec, 2012

Re: Dependency issues Posted: Dec 7, 2012 11:23 AM
Reply to this message Reply
and if I explicitly give the url via the 'from' option, update will work, but again I get the compile errors

Derek Wyatt

Posts: 69
Nickname: dwyatt
Registered: Oct, 2012

Re: Dependency issues Posted: Dec 7, 2012 11:31 AM
Reply to this message Reply
The current flux in the release candidates is making things a bit rough. I'll have to see about writing things using the typesafe stack instead, but I wanted to make things as short as possible :)

The following works for me:

name := "some_project"

version := "0.1"

scalaVersion := "2.10.0-RC3"

libraryDependencies ++= Seq(
"com.typesafe.akka" % "akka-actor" % "2.1.0-RC3" cross CrossVersion.full,
"com.typesafe.akka" % "akka-agent" % "2.1.0-RC3" cross CrossVersion.full,
"com.typesafe.akka" % "akka-testkit" % "2.1.0-RC3" cross CrossVersion.full,
"com.typesafe.akka" % "akka-dataflow" % "2.1.0-RC3" cross CrossVersion.full,
"com.typesafe.akka" % "akka-remote" % "2.1.0-RC3" cross CrossVersion.full,
"com.typesafe.akka" % "akka-camel" % "2.1.0-RC3" cross CrossVersion.full,
"org.scalatest" % "scalatest_2.10.0-RC3" % "2.0.M5-B1"
)

Bobby Richards

Posts: 4
Nickname: 84972
Registered: Dec, 2012

Re: Dependency issues Posted: Dec 7, 2012 11:55 AM
Reply to this message Reply
thanks for the quick response, that works and I may have messed it up by changing a bunch of the dependencies and using CrossVersion liberally, I noticed that I had a 2.9.2 target directory that was not suppose to be there.

Awesome book though, really well done, probably the worst time for me to purchase right before a major release :)

Derek Wyatt

Posts: 69
Nickname: dwyatt
Registered: Oct, 2012

Re: Dependency issues Posted: Dec 7, 2012 11:57 AM
Reply to this message Reply
Heh :) Yeah, the timing's a bit rough right now. Just before I released, a lot of stuff got moved from Akka to Scala, so I had to make a lot of changes. Then, about three days after I released, Scala changed stuff that broke a lot of the example code. Fun times :)

Thanks for sticking with it!

Bobby Richards

Posts: 4
Nickname: 84972
Registered: Dec, 2012

Re: Dependency issues Posted: Dec 7, 2012 11:58 AM
Reply to this message Reply
yes I wanted to kill the duration package for a while, I just didnt know which to aim at

Dan Luu

Posts: 27
Nickname: amitra
Registered: Feb, 2013

Re: Dependency issues Posted: Feb 18, 2013 1:01 PM
Reply to this message Reply
Is this (2.10.0-RC3) what you'd recommend using for working through the book, just because that's the version you're on? Or, if you're now using the 2.10 release, any chance you could post an updated build.sbt?

Stig Brautaset

Posts: 7
Nickname: stigbra
Registered: Dec, 2012

Re: Dependency issues Posted: Feb 18, 2013 1:35 PM
Reply to this message Reply
This works for me:

name := "AkkaConcurrency"

version := "0.1.0-SNAPSHOT"

scalaVersion := "2.10.0"

resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"

libraryDependencies ++=
"com.typesafe.akka" %% "akka-actor" % "2.1.0" ::
"com.typesafe.akka" %% "akka-testkit" % "2.1.0" % "test" ::
"org.scalatest" %% "scalatest" % "2.0.M5b" % "test" ::
Nil

Derek Wyatt

Posts: 69
Nickname: dwyatt
Registered: Oct, 2012

Re: Dependency issues Posted: Feb 19, 2013 3:02 AM
Reply to this message Reply
If I were you guys, I'd just use giter8 to pull down the typesafe akka template. It uses the .scala version of the SBT file and should take care of all those dependencies and such for you.

Flat View: This topic has 8 replies on 1 page
Topic: Ch 6.2: Page 128, refactoring Previous Topic   Next Topic Topic: graphics tool?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use