2
我嘗試lein uberjar
在我的項目目錄,我得到這個錯誤Uberjar中止,因爲罐子失敗:重複的條目:META-INF/MANIFEST.MF
$ lein uberjar
Uberjar aborting because jar failed: duplicate entry: META-INF/MANIFEST.MF
無法在網上找到任何具體的解決方案。我怎樣才能解決這個問題?
編輯
我發現關於META-INF/MANIFEST.MF here但爲什麼我收到此錯誤信息?
EDIT 2
我試圖lein uberjar
另一個項目,我得到這個:
$ lein uberjar
Warning: specified :main without including it in :aot.
Implicit AOT of :main will be removed in Leiningen 3.0.0.
If you only need AOT for your uberjar, consider adding :aot :all into your
:uberjar profile instead.
Created /Users/a/myapp/target/myapp-0.1.0-SNAPSHOT.jar
Created /Users/a/myapp/target/myapp-0.1.0-SNAPSHOT-standalone.jar
因此,與應用程序的問題?
編輯3
這是我project.clj
:
(defproject web_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.5.1"]
[ring/ring-core "1.1.1"]]
:ring {:handler web-test.core/handler})
EDIT 4
我創建了一個新的留言板項目instructi以下ons here但我仍然收到有關manifest
問題的錯誤。我究竟做錯了什麼?
guestbook a$ lein uberjar
Created /Users/a/guestbook/target/guestbook-0.1.0-SNAPSHOT.jar
Created /Users/a/guestbook/target/guestbook-0.1.0-SNAPSHOT-standalone.jar
target a$ java -jar guestbook-0.1.0-SNAPSHOT-standalone.jar
no main manifest attribute, in guestbook-0.1.0-SNAPSHOT-standalone.jar
target a$ java -jar guestbook.jar
no main manifest attribute, in guestbook.jar
注意
我想通了,我需要添加:main
到project.clj
作爲解釋here
你shoudn't 。每個JAR都有一個,當構建複合JAR時,'uberjar'應該忽略它們。用相同的依賴關係創建一個新項目,重現問題,然後開始刪除依賴關係。找出哪一個導致問題。 –
@MarkoTopolnik好的,我會稍後再嘗試(我現在必須去上班)。但是我在上面粘貼了我的'project.clj',只有兩個依賴關係。你想讓我創建一個具有相同兩個依賴關係的新項目嗎? – Zeynel
製作空白項目的重點是刪除您自己的任何源代碼,並且只能使用涉及的代碼來構建。你有沒有機會在Windows上? –