title: How to get `lein-repl` to use `user` instead of `main` for development purposes
body: <p>I'm trying to set up a development version and a production version of my application using <code>leiningen</code> via the <code>project.clj</code>.</p>
  
  <p>How can I have both? Because I have to comment out the <code>:main</code> part of my <code>project.clj</code> in order to get access to the development version when I use <code>lein repl</code>.</p>
  
  <p>So I am using <a href="https://github.com/stuartsierra/reloaded" rel="nofollow noreferrer">stuartsierra/reloaded leiningen template</a> which has a nice development environment.</p>
  
  <p>It comes with no <code>:main</code> key and when I added one that's when I stopped getting the development version of my project.</p>
  
  <p>Instead of seeing</p>
  
  <pre><code>user=&gt;
  </code></pre>
  
  <p>When I type <code>lein repl</code> I end up seeing my main, which is in the <code>jaribu</code> namespace</p>
  
  <pre><code>io.wakamau.jaribu=&gt; ;; my main
  </code></pre>
  
  <p>The solution that seems to work is to comment out the <code>:main</code> part of the <code>project.clj</code>.</p>
  
  <pre><code>(defproject io.wakamau/jaribu "0.1.0-SNAPSHOT"
    :description "trying out pedestal and component"
    :url "https://github.com/kevinmungai/jaribu"
    :license {:name "TODO: Choose a license"
              :url "http://choosealicense.com/"}
    :dependencies [[org.clojure/clojure "1.10.0"]
                   [com.stuartsierra/component "0.3.2"]]
    :profiles {:dev
                 {:dependencies [[org.clojure/tools.namespace 0.2.11"]
                                 [com.stuartsierra/component.repl "0.2.0"]]
                  :source-paths ["dev"]}
               :uberjar {:aot [io.wakamau.jaribu]}}
    :main ^{:skip-aot true} io.wakamau.jaribu
    :min-lein-version "2.0.0")
  </code></pre>
  
  <p>trying out</p>
  
  <pre><code>lein repl
  </code></pre>
  
  <p>results in:</p>
  
  <pre><code>io.wakamau.jaribu=&gt;
  </code></pre>
  
  <p>when the <code>:main</code> is commented out:</p>
  
  <pre><code>(defproject io.wakamau/jaribu "0.1.0-SNAPSHOT"
     ...
    ;; :main ^{:skip-aot true} io.wakamau.jaribu
    :min-lein-version "2.0.0")
  </code></pre>
  
  <p>the result is:</p>
  
  <pre><code>user=&gt;
  </code></pre>
  
  <p>I have to admit that I don't know much about using <code>leiningen</code>.</p>