The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Dagny T (3) [Avatar] Offline
#1
This script should run without having to convert it to a class or object.
However, unsure if SBT should "automatically" download and link to apache dependencies without some equivalent of a Maven pom.xml build dependency file?

1)
* copied code into restClient.scala
* ran sbt from that directory location
* >compile
expected class or object definition
[error] def parseArgs(args: Array[String]): Map[String, List[String]] = {

2)
* also tried just running through Scala REPL
>scala restClient.scala
error: object apache is not a member of package org
import org.apache.http._

3)
* also tried to Google up simple instructions for this; but not finding anything other than this:
http://www.scala-sbt.org/release/docs/Detailed-Topics/Scripts.html

Message was edited by:
Dagny T
nraychaudhuri (19) [Avatar] Offline
#2
Re: Need SBT instructions to run RestClient in Section 2.8
I have updated the github repo with sbt build file.

https://github.com/nraychaudhuri/scalainaction/tree/master/chap02/restclient

If you don't have sbt installed try the sbt shell script under the restClient folder

Thanks
Nilanjan