plugins - Adding library dependency in play 2.3.8 -
i'm trying add apache commons email library play project , i'm having trouble.
firstly have both build.sbt , plugins.sbt in project , i'm not sure 1 should putting import into, know?
also, i'm not sure why there separate project module in project, intellij created part of project. explain purpose of 2 separate modules , why there?
thanks!
so, in sbt, have project. specified in build.sbt (or more correctly, *.sbt file in projects base directory). libraries applications code needs, example, if application needs send emails using commons email library, go in librardependencies seeing in here.
but build.sbt scala code needs compiled, it's not part of applications runtime. in sbt, projects build project itself, 1 has compiled. has own classpath, consists of sbt plugins you're using, example, if need less compiler compile less files, that's not gets done @ runtime, don't want application code depending on that, goes project builds librarydependencies, gets specified in project/plugins.sbt (or in fact *.sbt in project directory). so, once add there, can use scala code provides build.sbt. intellij imports project can have syntax highlighting , other ide features in build.sbt.
but doesn't stop there. how project/plugins.sbt compiled, classpath? well, projects builds projects builds project sbt project too... keeps going down. intellij stops @ point though, doesn't keep importing these meta sbt projects because it's rare need additional sbt plugins projects builds projects builds project, uses same classpath projects build project syntax highlighting in project/plugins.sbt.
Comments
Post a Comment