title: Get reference to jar assembly path in sbt
body: <p>I'm using <a href="http://software.clapper.org/sbt-izpack/" rel="nofollow">sbt-izpack</a> to build an installer. It looks like there's a <a href="https://github.com/bmc/sbt-izpack/issues/19" rel="nofollow">bug</a> where the variable for the package file name isn't being referenced properly. I'm looking to <a href="http://software.clapper.org/sbt-izpack/#settings" rel="nofollow">pass in a variable</a> so that the main jar is properly packaged like so:</p>
  
  <pre><code>variables in IzPack += ("artifactName", artifactFileName.value )
  </code></pre>
  
  <p>The thing is I can't figure out how to get a path string of the main artifact. The <a href="http://www.scala-sbt.org/0.13/docs/Artifacts.html#Modifying+default+artifacts" rel="nofollow">docs</a> say that I can map over package and get a <code>(Artifact, File)</code> pair like so:</p>
  
  <pre><code>val artifactFileName = settingKey[String]("My task.")
  
  artifactFileName :=  {
    val (art, file) = packagedArtifact.in(Compile, packageBin).value
    println("Artifact definition: " + art)
    println("Packaged file: " + file.getAbsolutePath)
    file.getAbsolutePath
  }
  </code></pre>
  
  <p>But sbt complains that <code>A setting cannot depend on a task</code>.</p>
  
  <p>Is there a way that I can somehow get the path of the main assembly without needing to generate it first (in a task) so that I can pass it in via a setting?</p>
  
  <p>Alternatively, is there someway to update the setting supplied to izpack in a task?</p>