Skip to content

Instantly share code, notes, and snippets.

@sorenmacbeth
Created March 5, 2012 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sorenmacbeth/1980947 to your computer and use it in GitHub Desktop.
Save sorenmacbeth/1980947 to your computer and use it in GitHub Desktop.
you have to add and namespaces with (gen-class) forms to the :aot key in your leiningen project file. Next you have make sure you do a `lein compile` to actually generate the class
(ns lein-maybe-bug.core
(:import leinmaybebug.SomeClass))
(gen-class :name lein-maybe-bug.SomeGenClass
:prefix "somegenclass-")
(defn somegenclass-test [this]
(SomeClass.))
(defproject lein-maybe-bug "1.0.0-SNAPSHOT"
:description "demostrates some odd leiningen behaviour with java sources and gen-class forms"
:source-path "src/clj"
:java-source-path "src/jvm"
:javac-options {:debug "true" :fork "true"}
:dependencies [[org.clojure/clojure "1.3.0"]]
:aot [lein-maybe-bug.core])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment