title: Environment-specific distributions using sbt native packager
body: <p>I'm trying to create/configure environment-specifc distributions (for development, quality and production) using the sbt native packager functionality available in Play (2.2). I tried to achieve this using the following settings in a build.sbt file:</p>
  
  <pre><code>val dev  = config("dev")  extend(Universal)
  val qual = config("qual") extend(Universal)
  val prod = config("prod") extend(Universal)
  
  
  def distSettings: Seq[Setting[_]] =
    inConfig(dev)(Seq(
      mappings in Universal &lt;+= (resourceDirectory in Compile) map { dir =&gt;
       println("dev")
       (dir / "start.bat.dev") -&gt; "bin/start.bat"
       // additional mappings
     }
    )) ++
    inConfig(qual)(Seq(
      mappings in Universal &lt;+= (resourceDirectory in Compile) map { dir =&gt;
        println("qual")
        (dir / "start.bat.qual") -&gt; "bin/start.bat"
        // additional mappings
      }
    )) ++
    inConfig(prod)(Seq(
      mappings in Universal &lt;+= (resourceDirectory in Compile) map { dir =&gt;
        println("prod")
        (dir / "start.bat.prod") -&gt; "bin/start.bat"
        // additional mappings
      }
    ))
  
  
  play.Project.playScalaSettings ++ distSettings
  </code></pre>
  
  <p>In the SBT console, when I'm typing "dev:dist" I was expecting to see only "dev" as output and correspondingly only the corresponding mappings to be used. Instead, it looks like all mappings across all configs are merged. Most likely I don't understand how configs are supposed to work in SBT. In addition, there might be better approaches which achieve what I'm looking for.</p>