Search code examples
scalaplayframeworksbtpublishtypesafe-activator

How can I publish my scala play project without application.conf?


In my case I run this commands for publish my scala project library:

./activator clean compile
./activator test
./activator publish-local

I need my local library application.conf only for tests.

But I wanna use application.conf of my new project which use this library jar as dependency.

How can I build jar without application.conf?


Solution

  • Try to add the following to your build.sbt:

    mappings in (Compile, packageBin) ~= { (ms: Seq[(File, String)]) =>
      ms filterNot { case (file, dest) =>
        dest.contains("application.conf")
      }
    }
    

    This is adapted from another question (removing files from dist task output), but should work here also