You want it be an unmanaged resource (not source)
unmanagedResourceDirectories in Compile := Seq(baseDirectory.value / "src") includeFilter in unmanagedResources := "jawr.properties"
The philosophy of SBT is to work by convention (and not by configuration) as much as possible. So the most straightforward solution, in many cases, isn't to look for the correct setting to tell SBT where your files are... But rather to figure out where SBT already expects to find them. You can check this page of the "getting started with SBT" guide for the basics.
For resource files that needs to be packaged together with compiled classes, the default directory is
src/main/resources (a convention borrowed from Maven, like most of SBT's default directory structure). Similarly, files in
src/test/resources are added to the classpath but only during tests.
If, for some reason, you want to use non-standard directories, you will want to have a look at this page of the documentation. For resources, the key to modify is
// resources in `resources` instead of `src/main/resources` : resourceDirectory in Compile := baseDirectory.value / "resources" // test resources in `test-resources` instead of `src/test/resources` : resourceDirectory in Test := baseDirectory.value / "test-resources"
- How do I add additional file to class path which is not java or scala file using SBT configuration?
- How to add a factory method to an existing Java class in Scala
- How to check which parameters of case class have default value using scala reflection 2.10
- How to read a text file using Relative path in scala
- How to create new instance of Scala class with context bound via Java reflection using only zero argument constructor?
- How to add Java dependencies to Scala projects's sbt file
- How to construct the Scala Form using a Java class in Play
- Scala how to handle the exception when the key value pair is not available in properties file using scala
- How to make a parquet file from scala case class using AvroParquetWriter?
- How to check Azure blob storage path exists or not using scala spark or python spark
- How is Scala faster than Java when both are compiled into `.class` file which is run by JVM only?
- sbt-protoc error File does not reside within any path specified using --proto_path (or -I).You must specify a --proto_path which encompasses this file
- Java Class not Found Exception while doing Spark-submit Scala using sbt
- How to update a mongo record using Rogue with MongoCaseClassField when case class contains a scala Enumeration
- How to check if path or file exist in Scala
- How to add a new Class in a Scala Compiler Plugin?
- How to load JSON file using Play with Scala
- Scala Java Error: value filter is not a member of java.util.Map. Works outside of class
- Can I use a scala class which implements a java interface from Java?
- How to specify schema for CSV file without using Scala case class?
- How to add AWS Java SDK to Scala / Play project
- Scala class file vs Java class file
- NoClassDefFoundError using Scala class from Java
- How to access a Java static method from Scala given a type alias for that class it resides in
- How to access a resource file using relative path in play framework project?
- How to refer to protected inner class in Scala when inheriting from Java (with byte code only)
- How to declare scala method so that it can be called from Java using varargs style
- How to add a json object in to a json array using scala play?
- How do I add a no-arg constructor to a Scala case class with a macro annotation?
- How SBT test task manages class path and how to correctly start a Java process from SBT test
More Query from same tag
- get the value of scala Some(text)
- Is it possible to define CDI Stereotypes in Scala?
- Floyd-Warshall Shortest Path Algorithm Error
- In Slick, how to implement multiple projections for a Table?
- Why does scala.Serializable not specify any methods?
- How to create Composite-key for a Model in lift's mapper?
- Handling repetetive data in Spark dataframes/datasets
- Scala implicit def complains about return type with member defs?
- scala-sbt change javacOptions in task
- Persistent data structures in Scala
- Runtime error with udf in Scala Spark
- Why it is an error on compiler but run at Spark-shell?
- Insert Project version to scala code in compile time
- convert List[Tuple2[A,B]] to Tuple2[Seq[A],Seq[B]]
- I'm using Intellij IDEA. How do I "view source" for xerces stacktrace that is used by scala.xml?
- Applying aggregate function to every column of certain type
- How to load date with custom format in Spark
- How to use Scala annotations in Java code
- Why doesn't MySQLDriver have a Nullable Column Option?
- Scala get output in order
- spark mapPartitionRDD can't print values
- Converting Array[(Double,Double)] to Seq[Seq[Double]]
- Application does not take parameters
- Scala | Folding in binary tree
- ScalaTest - writing custom matchers
- Tail Recursive Factorial Function in Scala
- Scala coding standards: curly braces on the same line
- Reflection with Typeclasses
- SCALA: Reading JSON file with the path provided
- Editable Boolean Columns in ScalaFX TableView