Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

play framework - error parsing expression in build.sbt

I am getting this strange parsing exception while trying to build my play project. It complains about the semi-colon that is no where in the file. Below is the error message and an extract from the build.sbt (line 12 & 13) file.

.../zentasks/build.sbt:12: error: eof expected but ';' found.
libraryDependencies += javaEbean
^
[error] Error parsing expression.  Ensure that settings are separated by blank lines.

Build.sbt file:

...
libraryDependencies += javaJdbc
libraryDependencies += javaEbean
...

Note:

I have got the solution but thought of putting up this question/solution for a while so that other newbies like me don't waste any time figuring this problem.

SOLUTION: I dont understand why play throws this confusing error message. I don't see where that semi-colon is. However the solution is to separate the dependencies by blank line as follows:

libraryDependencies += javaJdbc

libraryDependencies += javaEbean

Also refer: http://www.scala-sbt.org/release/docs/Getting-Started/Basic-Def.html#how-build-sbt-defines-settings

Note: feel free to add to the solution or correct it.

like image 294
linoox Avatar asked Apr 06 '14 06:04

linoox


1 Answers

I agree, the semicolon stuff is a bit misleading. On the other hand it also told you: Ensure that settings are separated by blank lines. :)

If you prefer a more compact way you could also write:

libraryDependencies ++= Seq(
     javaJdbc,
     javaEbean 
)
like image 127
reikje Avatar answered Oct 19 '22 15:10

reikje