我正试图在Windows 10计算机上安装数据体,并遵循正式指示。
我按照指示对开发工具进行下载和解压缩。
但是,我不能运行安装脚本,因为它是bash脚本。
我打开了脚本,发现它需要maven,所以我安装了maven并尝试手动运行命令。
echo 'Installing: com.cognitect/rebl {:mvn/version "0.9.242"}'
mvn -q org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file -Dfile=rebl-0.9.242/rebl-0.9.242.jar
echo 'Installing: com.datomic/dev-local {:mvn/version "0.9.232"}'
mvn -q org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file -Dfile=dev-local-0.9.232/dev-local-0.9.232.jar一开始这个错误
您指定的目标需要执行一个项目,但是这个目录中没有POM。
因此,我想出了如何创建maven pom.xml。
那么它的错误
[ERROR] The specified file 'C:\workspaces\clj-recipe\rebl-0' not exists
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file (default-cli) on project clj-recipe: The specified file 'C:\workspaces\clj-recipe\rebl-0' not exists开发本地不是用于窗口的吗?
更新
我确实让maven脚本运行。我在dev工具目录中创建了自己的install.ps1,该目录保持路径不变,并引用文件路径。
# expects to be run from the project (pom.xml) directory, but in a script file in the same directory as the original install script
echo 'Installing: com.cognitect/rebl {:mvn/version "0.9.242"}'
mvn -q org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file -Dfile="rebl-0.9.242/rebl-0.9.242.jar"
echo 'Installing: com.datomic/dev-local {:mvn/version "0.9.232"}'
mvn -q org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file -Dfile="dev-local-0.9.232/dev-local-0.9.232.jar"不过,我还是不能让本地开发人员运行。pom.xml似乎没有任何变化。我为当前的lein项目启动了一个repl并运行
(require '[datomic.client.api :as d])
(def client (d/client {:server-type :dev-local
:system "dev"}))获取错误No such namespace: d。
我猜我不明白deps.edn是怎么工作的..。现在我有一个deps.edn在C:/Users/[username here]/documents/.clojure/deps.edn下面
{
:mvn/repos {"cognitect-dev-tools"
{:url "https://dev-tools.cognitect.com/maven/releases/"}}
:deps
{com.datomic/dev-local {:mvn/version "0.9.225"}}
}发布于 2021-03-01 20:41:52
这里有两个关键问题
为lein配置相当简单。
(defproject ;;...
:dependencies [
;;...
[com.datomic/dev-local "0.9.225"]
]
:repositories [
["cognitect-dev-tools" {:url "https://dev-tools.cognitect.com/maven/releases/"
:username :env/datomic_username
:password :env/datomic_password}]]
;;...
)请注意,凭据必须提供给lein项目。这件事可以用
https://stackoverflow.com/questions/66425455
复制相似问题