sbt로 개발할 때 가장 주의할 점은 '개행 문자'(\r\n 또는 \n)이다.
sbt는 민감해서 개행 문자가 없거나 필요없는 곳에 있으면 에러를 발생한다.
예 1)
개행 문자로 구분을 지어야 하는데, 아래처럼 구분이 안될 때 에러 발생
scalaVersion := "2.11.2"
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
ws
)
예 2) 개행 문자가 없어야 하는데, 중간에 있는 경우 - 에러 발생 (그러나 주석을 달면 에러 발생은 되지 않음)
libraryDependencies ++= Seq(
"com.typesafe" % "config" % "1.2.1"
)
sbt 샘플 예제 (build.sbt)
name := """google-dequeue"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.2"
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
ws
)
libraryDependencies ++= Seq(
"com.typesafe" % "config" % "1.2.1",
"ch.qos.logback" % "logback-classic" % "1.1.2"
"com.rabbitmq" % "amqp-client" % "2.8.1",
"commons-io" % "commons-io" % "2.4",
"org.apache.httpcomponents" % "httpclient" % "4.3.5",
"com.google.guava" % "guava" % "18.0",
"com.rabbitmq" % "amqp-client" % "2.8.1",
"org.msgpack" %% "msgpack-scala" % "0.6.11"
)
'scala' 카테고리의 다른 글
play2 (scala) jmx 사용하기 (0) | 2014.12.22 |
---|---|
[scala] 생성자 만들기 - not enough arguments for constructor DefaultConsumer (0) | 2014.12.09 |
scala (activator) 사용 팁 (0) | 2014.12.09 |
bad symbolic reference to scala.ScalaObject encountered in class file 'Logging.class' (0) | 2014.12.02 |
scala 설치하기 (0) | 2014.11.28 |