title: Setting up Clojure code in Eclipse for both REPL and application deployment
body: <p>I'm developing some polyglot Java + Clojure code using the REPL most of the time (in Eclipse with CounterClockwise and Maven). In this context, it's fine to just load the source in the REPL and start interacting with the code.</p>
  
  <p>However, I will ultimately want to be able to distribute and deploy the code in .jar files or similar so that it can be run as a standalone application. In this context, the code needs to be executable as a Java application with the appropriate <code>main(...)</code> function. And I'd like it all to build cleanly from the Maven pom.xml file.</p>
  
  <p>So far I have got code working so that I have a -main function that doesn't get called when I use Clojure at the REPL, but should get called when packaged/deployed as a jar. This seems to work, but I'm not sure if this represents the best approach.</p>
  
  <p>Ideally I'd like everything to work smoothly in both:</p>
  
  <ul>
  <li>The Counterclockwise REPL</li>
  <li>A standard Maven build process which results in a fully packaged / deployed jar file</li>
  </ul>
  
  <p>What are the best practices for setting up a Clojure code base so that it can easily be used both at the REPL and built a standalone application?</p>