scalasbtplayframework-2.3

How to exclude files under conf folder for distribution?


I have a application.dev.conf and application.test.conf under my conf folder in my Play 2.3 application but I do not want it to be packaged as part of my distribution? What is the right excludeFilter for it?


Solution

  • You could use mappings to exclude both files.

    mappings in Universal := {
      val origMappings = (mappings in Universal).value
      origMappings.filterNot { case (_, file) => file.endsWith("application.dev.conf") || file.endsWith("application.test.conf") }
    }