Skip to content

How SBT search for dependencies for com.typesafe.play:sbt-plugin #11629

Answered by mkurz
ppllaxxa asked this question in Q&A
Discussion options

You must be logged in to vote

Lets put aside Play for a moment an lets talk about a plain sbt project: When you want to add a dependency to a sbt project you do that by adding it to the build.sbt file. For example if you want to the slf4j-api dependency to your project you do that by:

// in build.sbt
libraryDependencies += "org.slf4j" % "slf4j-api" % "2.0.6"

Now back to Play. Here, like you are correctly said, you add a sbt plugin to your project/plugins.sbt file. What you didn't mention is that you have to enable the play plugin in the build.sbt as well doing e.g.:

lazy val root = (project in file(".")).enablePlugins(PlayScala) // or PlayJava

This enabled plugin now modifies your project settings by e.g. adding depe…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ppllaxxa
Comment options

Answer selected by ppllaxxa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants