相关疑难解决方法(0)

如何从leiningen项目中排除罐子?

在使用Leiningen时,我遇到了以下突然错误:

线程"main"中的异常java.lang.NoSuchMethodError:org.apache.tools.ant.util.FileUtils.getFileUtils()Lorg/apache/tools/ant/util/FileUtils; (core.clj:1)

我在https://github.com/technomancy/leiningen/issues/194找到了以下答案:

if ant version 1.6.1 is included in a project, lein fails. Autodoc "0.7.1" includes ant version 1.6.1.

a work around is to exclude ant.1.6.1 in the project.clj.    <--- *1*
But a better solution is changing the order of lein classpath.

from bin/lein   <--- *2*
CLASSPATH="$CLASSPATH:$LEIN_LIBS:$LEIN_DIR/src:$LEIN_DIR/classes:$LEIN_DIR/resources:$LEIN_JAR"
**changes to : **
CLASSPATH="$LEIN_LIBS:$LEIN_DIR/src:$LEIN_DIR/classes:$LEIN_DIR/resources:$LEIN_JAR;$CLASSPATH"
Run Code Online (Sandbox Code Playgroud)

我读的Leiningen教程https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md,并在样本project.clj文件https://github.com/technomancy/leiningen/blob/stable /sample.project.clj,但我仍然有以下问题:

1)在上面标记为1的行上,我无法告诉如何排除特定版本的jar文件.

2)在2,上面,究竟是什么bin/lein?我的Leiningen项目没有bin目录,Leiningen本身就是一个脚本,所以那里没有bin目录?

非常感谢您的帮助.


附录8/6/11:对于Autodoc的具体问题,我找到了一个Autodoc的分支,为我解决了这个问题.只需将"[org.clojars.weavejester/autodoc"0.9.0"]"添加到project.clj> defproject> :dev-dependencies子句即可.然后,从命令行(目录等于你的leiningen项目的根目录),执行'lein autodoc',等待一段时间.

jar clojure leiningen autodoc

6
推荐指数
1
解决办法
5201
查看次数

标签 统计

autodoc ×1

clojure ×1

jar ×1

leiningen ×1