title: How to define project.clj for both lein run and lein repl to work?
body: <p>I'm new to Clojure, and I don't quite understand how to write my <code>project.clj</code> so it works for both <code>lein repl</code> and <code>lein run</code>. Here it is (whole path: <code>~/my-project/project.clj</code>):</p>
  
  <pre><code>(defproject my-project "1.0.0-SNAPSHOT"
    :description "FIXME: write description"
    :dependencies [[org.clojure/clojure "1.3.0"]]
    :main my-project.core/hello
  )
  </code></pre>
  
  <p>Then I have my <code>~/my-project/src/my_project/core.clj</code> file</p>
  
  <pre><code>(ns my-project.core)
  
  (defn hello []
    (println "Hello world!")
  )
  </code></pre>
  
  <p><code>lein run</code> works just fine but I get a <code>FileNotFoundException</code> when running <code>lein repl</code>:</p>
  
  <pre><code>~/my-project$ lein run
  Hello world!
  ~/my-project$ lein repl
  REPL started; server listening on localhost port 42144
  FileNotFoundException Could not locate hello__init.class or hello.clj on classpath:   clojure.lang.RT.load (RT.java:430)
  clojure.core=&gt;
  </code></pre>
  
  <p>How should I edit the <code>project.clj</code> to solve this? Or do I have to call <code>lein repl</code> in a different way?</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>EDIT</strong>: tried with <code>lein dep</code>s and <code>lein compile</code>, but still the same error</p>
  
  <pre><code>~/my-project$ lein version
  Leiningen 1.7.1 on Java 1.6.0_27 OpenJDK Client VM
  ~/my-project$ lein deps
  Copying 1 file to /home/yasin/Programming/Clojure/my-project/lib
  ~/my-project$ lein compile
  No namespaces to :aot compile listed in project.clj.
  ~/my-project$ lein repl
  REPL started; server listening on localhost port 41945
  FileNotFoundException Could not locate hello__init.class or hello.clj on classpath:   clojure.lang.RT.load (RT.java:430)
  </code></pre>