title: Scala SBT: standalone jar
body: <p>The answer: <a href="https://stackoverflow.com/q/2887655/244526">Making stand-alone jar with Simple Build Tool</a> seems like what I need, but it did not have enough information for me, so this is a followup.</p>
  
  <p>(1) How do I adapt the answer to my need? I don't understand what would need to be changed.</p>
  
  <p>(2) What command do I run to create the standalone jar?</p>
  
  <p>(3) Where can I find the jar after it has been created?</p>
  
  <hr>
  
  <p>What I've tried:</p>
  
  <ul>
  <li><p>Pasting the code in the linked answer verbatim into my: <code>project/build/dsg.scala</code> file. The file now has a </p>
  
  <p><code>class ForkRun(info: ProjectInfo) extends DefaultProject(info)</code></p>
  
  <p>(from before, used for running projects in a separate VM from SBT) and the new:</p>
  
  <p><code>trait AssemblyProject extends BasicScalaProject</code> </p>
  
  <p>from the linked answer.</p></li>
  <li><p>I also tried pasting the body (all <code>defs</code> and the <code>lazy val</code> of the <code>AssemblyProject</code> into the body of <code>ForkRun</code>.</p></li>
  </ul>
  
  <p>To create a <code>jar</code> I ran <code>package</code> at the SBT prompt and get:</p>
  
  <pre><code>[info] Packaging ./target/scala_2.8.1/dsg_2.8.1-1.0.jar ...
  [info] Packaging complete.
  </code></pre>
  
  <p>So I tried running the <code>dsg_2.8.1-1.0.jar</code> from the shell via:</p>
  
  <pre><code>java -jar dsg_2.8.1-1.0.jar 
  </code></pre>
  
  <p>But I get:</p>
  
  <pre><code>Failed to load Main-Class manifest attribute from
  dsg_2.8.1-1.0.jar
  </code></pre>
  
  <p>Could this be caused by having multiple entry points into my project? I select from a list when I execute <code>run</code> from the SBT prompt. Perhaps I need to specify the default when creating the package?</p>