Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将不兼容maven的jar文件添加到leiningen项目中?_Maven_Clojure_Leiningen - Fatal编程技术网

如何将不兼容maven的jar文件添加到leiningen项目中?

如何将不兼容maven的jar文件添加到leiningen项目中?,maven,clojure,leiningen,Maven,Clojure,Leiningen,我正试图将其作为依赖项添加到我的clojure应用程序中。但它没有pom文件。因此,无论是否使用lein localrepo,我都无法将其安装到本地repo。目前我已将artemis jar文件保存到lib/中。我如何在我的项目中提供它 $ lein localrepo install -r repo/ lib/artemis-a609b2076aacc0ef5ecf0b390205d01bb88ceae2.jar com.artemis/artemis a609b2076aacc0ef5ecf

我正试图将其作为依赖项添加到我的clojure应用程序中。但它没有pom文件。因此,无论是否使用lein localrepo,我都无法将其安装到本地repo。目前我已将artemis jar文件保存到
lib/
中。我如何在我的项目中提供它

$ lein localrepo install -r repo/ lib/artemis-a609b2076aacc0ef5ecf0b390205d01bb88ceae2.jar com.artemis/artemis a609b2076aacc0ef5ecf0b390205d01bb88ceae2
$ lein trampoline run Retrieving com/artemis/artemis/a609b2076aacc0ef5ecf0b390205d01bb88ceae2/artemis-a609b2076aacc0ef5ecf0b390205d01bb88ceae2.pom from lib
Could not transfer artifact com.artemis:artemis:pom:a609b2076aacc0ef5ecf0b390205d01bb88ceae2 from/to lib (file:repo): no supported algorithms found
This could be due to a typo in :dependencies or network issues.
lein localrepo
不生成pom文件:

$ ls -1 repo/com/artemis/artemis/
a609b2076aacc0ef5ecf0b390205d01bb88ceae2
maven-metadata-local.xml
以下是我的
项目中的相关行。clj

:dependencies [[org.clojure/clojure "1.5.1"]
               [com.artemis/artemis "a609b2076aacc0ef5ecf0b390205d01bb88ceae2"]]
:plugins [[lein-localrepo "0.5.0"]]
:repositories {"lib" "file:repo"}  

我没有将eclipse用于此项目。

您可以随时将jar添加到本地maven存储库中

即使没有可用的pom。您只需提供一些信息,如groupID、版本和工件名称

完成此操作后,您可以像使用任何其他maven依赖项一样使用它


否则,您可能会看到“”描述了netty的类似问题,以及如何使用lein localrepo解决该问题。

+1这是解决此问题的一种方法。但我正在寻找一个更简单的解决方案。一些不涉及本地maven回购的东西。我想签入我的jar文件,并在签出时将其提供给您。我想您正在使用leiningen2。Leiningen 2不再支持
:额外的类路径dirs
。有一些黑客对此(我不会使用它)。您可以使用
:资源路径
添加所需的jar。在您的例子中,您可以向
项目.clj
文件中添加类似
:资源路径[“lib/*”]
的内容。如前所述。这是一个黑客,我不会使用它。首选的方法是使用
leinlocalrepo
。对,我使用的是leiningen2.2.0。我现在正试图让你提到的黑客程序发挥作用。首选的方法并不能解决问题,它只是将其从leiningen域中推出。我不喜欢新开发人员在运行
leindeps
期间或之后出现错误的想法。我尝试了
leinlocalrepo
,但没有成功。我已经更新了这个问题。