I\'m building an Apache Spark application in Scala and I\'m using SBT to build it. Here is the thing:
[Obsolete] See new answer "Use the new 'Include dependencies with "Provided" scope' in an IntelliJ configuration." answer.
The easiest way to add provided
dependencies to debug a task with IntelliJ
is to:
src/main/scala
Mark Directory as...
> Test Sources Root
This tells IntelliJ
to treat src/main/scala
as a test folder for which it adds all the dependencies tagged as provided
to any run config (debug/run).
Every time you do a SBT refresh, redo these step as IntelliJ will reset the folder to a regular source folder.