title: How do I build multiple jar files using scala sbt
body: <p>In my project I have the following structure:</p>
  
  <blockquote>
    <p>src/</p>
    
    <p>plugins/</p>
    
    <blockquote>
      <p>\__ mpc</p>
      
      <p>|__ oper</p>
    </blockquote>
  </blockquote>
  
  <p>I compile all of the scala files in src into a single jar (the main program), then each subdirectory in plugins contains scala files that should build a plugin jar to be loaded by the main program (so one jar for plugins/mpc and another for plugins/oper).</p>
  
  <p>In the root I have a build.sbt:</p>
  
  <blockquote>
    <p>name := "mrtoms"</p>
    
    <p>organization := "chilon"</p>
    
    <p>version := "0.1"</p>
    
    <p>libraryDependencies ++= Seq("commons-httpclient" % "commons-httpclient" % "3.1")</p>
    
    <p>crossPaths := false</p>
    
    <p>scalaHome := Some(file("/usr/share/scala"))</p>
    
    <p>target := file("project/target")</p>
    
    <p>scalaSource in Compile &lt;&lt;= baseDirectory(_ / "src")</p>
    
    <p>mainClass := Some("org.chilon.mrtoms.MrToms")</p>
  </blockquote>
  
  <p>That builds my main jar file from the files in src just fine.. how do I add jars for the sources file in each plugin directory?</p>