title: Rename file using sbt-assembly
body: <p>I have a scala project that uses the <code>ConfigFactory</code> to set up the application configurations. For building I use <code>sbt</code> (together with <code>sbt-assembly</code>).</p>
  
  <p>Depending on whether I create an assembly with <code>sbt-assembly</code> or whether I just run the project, I would like to use different config files (<code>application.conf</code> when running the project, <code>assembly.conf</code> when running the assembly of the project).</p>
  
  <p>I thought of using the <code>assemblyMergeStrategy</code> for this purpose: When assembling the jar, I would discard the <code>application.conf</code> and rename <code>assembly.conf</code>. My idea was something like:</p>
  
  <pre><code>assemblyMergeStrategy in assembly := {
    case PathList("application.conf") =&gt; MergeStrategy.discard
    case PathList("assembly.conf") =&gt; MergeStrategy.rename
    ...
  }
  </code></pre>
  
  <p>By this I would like to achieve is that when assembling the jar, the file <code>assembly.conf</code> is renamed to <code>application.conf</code> and is therefore used by <code>ConfigFactory</code>, whereas the original <code>application.conf</code> is discarded. </p>
  
  <p>The code above obviously does not work, as I cannot specify to what filename <code>assembly.conf</code> should be renamed to. How can I achieve this?</p>