我正在使用clojure-maven-plugin。当我做一个苹果酒连接时,我得到了这个"警告:clj-refactor和refactor-nrepl不同步。他们的版本分别是2.4.0-SNAPSHOT(包装:20171117.317)和n / a。"我可以对我的pom.xml做些什么来让这个警告消失吗?我尝试将refactor-nrepl 2.4.0-SNAPSHOT添加为依赖项。
答案 0 :(得分:1)
我有一个较旧的项目,出于某些原因使用 maven 进行构建,此配置对我有用:
确保您拥有所有需要的依赖项。
<dependencies>
<dependency>
<groupId>nrepl</groupId>
<artifactId>nrepl</artifactId>
</dependency>
<dependency>
<groupId>cider</groupId>
<artifactId>cider-nrepl</artifactId>
</dependency>
<dependency>
<groupId>refactor-nrepl</groupId>
<artifactId>refactor-nrepl</artifactId>
</dependency>
</dependencies>
然后在插件配置中配置中间件。
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<version>${clojure-maven-plugin-version}</version>
<extensions>true</extensions>
<configuration>
...
<nreplMiddlewares>
<middleware>cider.nrepl/wrap-apropos</middleware>
<middleware>cider.nrepl/wrap-classpath</middleware>
<middleware>cider.nrepl/wrap-clojuredocs</middleware>
<middleware>cider.nrepl/wrap-complete</middleware>
<middleware>cider.nrepl/wrap-content-type</middleware>
<middleware>cider.nrepl/wrap-debug</middleware>
<middleware>cider.nrepl/wrap-enlighten</middleware>
<middleware>cider.nrepl/wrap-format</middleware>
<middleware>cider.nrepl/wrap-info</middleware>
<middleware>cider.nrepl/wrap-inspect</middleware>
<middleware>cider.nrepl/wrap-macroexpand</middleware>
<middleware>cider.nrepl/wrap-ns</middleware>
<middleware>cider.nrepl/wrap-out</middleware>
<middleware>cider.nrepl/wrap-slurp</middleware>
<middleware>cider.nrepl/wrap-profile</middleware>
<middleware>cider.nrepl/wrap-refresh</middleware>
<middleware>cider.nrepl/wrap-resource</middleware>
<middleware>cider.nrepl/wrap-spec</middleware>
<middleware>cider.nrepl/wrap-stacktrace</middleware>
<middleware>cider.nrepl/wrap-test</middleware>
<middleware>cider.nrepl/wrap-trace</middleware>
<middleware>cider.nrepl/wrap-tracker</middleware>
<middleware>cider.nrepl/wrap-undef</middleware>
<middleware>cider.nrepl/wrap-version</middleware>
<middleware>cider.nrepl/wrap-xref</middleware>
<middleware>refactor-nrepl.middleware/wrap-refactor</middleware>
</nreplMiddlewares>
</configuration>
...
</plugin>
答案 1 :(得分:0)
Cider-connect需要一些依赖(cider和clj-refactor nrepl-middleware)。
以下链接说明了如何为启动或 lein 添加依赖关系。
https://github.com/clojure-emacs/refactor-nrepl
http://cider.readthedocs.io/en/latest/installation/#ciders-nrepl-middleware
示例 boot :。boot / profile.boot
(require 'boot.repl)
(swap! boot.repl/*default-dependencies*
concat '[[cider/cider-nrepl "0.15.1"]
[refactor-nrepl "2.3.1"]])
(swap! boot.repl/*default-middleware*
concat '[cider.nrepl/cider-middleware
refactor-nrepl.middleware/wrap-refactor])