title: how to trigger some action before SBT target is executed?
body: <p>For my scala project, I use SBT with (really cool) <a href="https://github.com/sbt/sbt-assembly" rel="nofollow">sbt-assembly plugin</a> that provides easy-to-use JAR packing.</p>
  
  <p>Before JAR is packed, I'd like to execute some actions/functions e.g. compile some resources or fetch some more.</p>
  
  <p>My current <code>project/assembly.sbt</code>:</p>
  
  <pre><code>addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.11.2")
  </code></pre>
  
  <p><strong>The question</strong>: Can I specify a functions to be executed before <code>assembly</code> is actually called? If so, how? Similar question for "call after assembly".</p>
  
  <p><strong>Edit1</strong>: The question is actually more general - assembly is interesting in particular, The problem is about triggering actions before (and after) some SBT target such as compile/run/test etc.</p>