【发布时间】:2015-06-21 18:51:11
【问题描述】:
我正在尝试在我的 Clojure 应用程序中使用 jar 文件。我以前从未这样做过,但是在阅读网络上的各种文章时,我开始这样做,在我的项目内部:
mkdir maven_repository
mvn install:install-file -DgroupId=local -DartifactId=nlp -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=original-nlp-1.0-SNAPSHOT.jar -DlocalRepositoryPath=maven_repository
在我的 project.clj 文件中,我有:
[local/nlp "1.0-SNAPSHOT"]
但是当我跑步时:
lein clean
lein uberjar
我得到这个错误:
Could not transfer artifact local:nlp:pom:1.0-SNAPSHOT from/to local (/salesslick/maven_repository/): no supported algorithms found
我已经检查过这样的事情:
lein uberjar
(Retrieving local/nlp/1.0-SNAPSHOT/nlp-1.0-SNAPSHOT.pom from local)
(Could not transfer artifact local:nlp:pom:1.0-SNAPSHOT from/to local (file:/Users/charlottesville/projects/ollio/salesslick/maven_repository/): no supported algorithms found)
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Uberjar aborting because jar failed: Could not resolve dependencies
cat local/nlp/1.0-SNAPSHOT/nlp-1.0-SNAPSHOT.pom
cat maven_repository/local/nlp/1.0-SNAPSHOT/nlp-1.0-SNAPSHOT.pom
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>local</groupId>
<artifactId>nlp</artifactId>
<version>1.0-SNAPSHOT</version>
<description>POM was created from install:install-file</description>
</project>
lein --version
Leiningen 2.4.1 on Java 1.8.0_25 Java HotSpot(TM) 64-Bit Server VM
我做错了什么?
【问题讨论】:
-
这可能会有所帮助:gist.github.com/stuartsierra/3062743
-
谢谢。我就是这样工作的。
-
什么对我有用::plugins [ [lein-localrepo "0.5.3"] ;;在本地安装 java 工件,甚至使用假的 artifactId