howto package my project resource-paths to use as project dependency?

不羁的心 提交于 2019-12-25 13:45:55

问题


I'm trying for a while with no success to package as jar file my resource-paths files (.dylib and .so files).

I've packaged the resources folder following this page: How to create jar file with package structure?

and I've installed the jar in my local maven repo following this page http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

I've seen this page how to package resources in a leiningen project also but in this case it seems that the package is not used as clojure dependency in futures projects

This is my project.clj

(defproject quil-video "0.1.0-SNAPSHOT"
  :description "extends clojure quil to use video"
  :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"]
                 [quil/quil "2.0.0-SNAPSHOT"]]
  :resource-paths ["lib/gstreamer-java.jar" "lib/video.jar" "lib/jna.jar" "lib/macosx64.jar/macosx64"])

And this is the way I'm searching for:

(defproject quil-video-example "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"]
                 [quil-video/quil-video "0.1.0-SNAPSHOT"]
                 [quil-video/macosx64 "2"]
                 [quil-video/jna "1"]
                 [quil-video/video "1"]
                 [quil-video/gstreamer-java "1"]])

Thanks in advance!

来源:https://stackoverflow.com/questions/23020288/howto-package-my-project-resource-paths-to-use-as-project-dependency

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!