Last active
August 15, 2022 16:25
-
-
Save gja/efa1a7beea9ecb52e906 to your computer and use it in GitHub Desktop.
Building a lein uberjar without any compilation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns simplequest.core) | |
(defn -main | |
"I don't do a whole lot ... yet." | |
[& args] | |
(println "Hello, World!")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package simplequest; | |
public class main { | |
public static void main(String argv[]) { | |
String[] newArgs = new String[argv.length + 2]; | |
newArgs[0] = "-m"; | |
newArgs[1] = "simplequest.core"; | |
System.arraycopy(argv, 0, newArgs, 2, argv.length); | |
clojure.main.main(newArgs); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject simplequest "0.1.0-SNAPSHOT" | |
:description "FIXME: example of lein ubjerjaring without compiling the app" | |
:url "gist.github.com/gja/efa1a7beea9ecb52e906" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.7.0"]] | |
:main ^:skip-aot simplequest.main | |
:target-path "target/%s" | |
# put the core.clj and the main.java in src/simplequest | |
:java-source-paths ["src"] | |
:profiles {:uberjar {:aot []}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What Java command do you use to run this?