Created
July 19, 2012 22:52
Lein (uber)jar fails
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
projects $ lein -v | |
Leiningen 2.0.0-preview7 on Java 1.6.0_33 Java HotSpot(TM) 64-Bit Server VM | |
projects $ lein new test | |
Generating a project called test based on the 'default' template. | |
To see other templates (app, lein plugin, etc), try `lein help new`. | |
projects $ cd test/ | |
projects $ vim project.clj | |
test $ cat project.clj | |
(defproject test "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.4.0"]] | |
:main test.core) | |
n^Ctest $ lein run | |
Compiling test.core | |
Compilation succeeded. | |
Hello, World! | |
test $ lein jar | |
All namespaces already :aot compiled. | |
Created /Users/bloudermilk/Projects/a3s/test/target/test-0.1.0-SNAPSHOT.jar | |
test $ java -jar target/test-0.1.0-SNAPSHOT.jar | |
Exception in thread "main" java.lang.NoClassDefFoundError: test/core | |
Caused by: java.lang.ClassNotFoundException: test.core | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:202) | |
at java.security.AccessController.doPrivileged(Native Method) | |
at java.net.URLClassLoader.findClass(URLClassLoader.java:190) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:306) | |
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) | |
test $ lein uberjar | |
All namespaces already :aot compiled. | |
Created /Users/bloudermilk/Projects/a3s/test/target/test-0.1.0-SNAPSHOT.jar | |
Including test-0.1.0-SNAPSHOT.jar | |
Including clojure-1.4.0.jar | |
Created /Users/bloudermilk/Projects/a3s/test/target/test-0.1.0-SNAPSHOT-standalone.jar | |
test $ java -jar target/test-0.1.0-SNAPSHOT-standalone.jar | |
Exception in thread "main" java.lang.NoClassDefFoundError: test/core | |
Caused by: java.lang.ClassNotFoundException: test.core | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:202) | |
at java.security.AccessController.doPrivileged(Native Method) | |
at java.net.URLClassLoader.findClass(URLClassLoader.java:190) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:306) | |
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment