简体   繁体   English

“在 leiningen 项目中找不到工件 org.openjfx”

[英]"Cannot find artifact org.openjfx" in leiningen project

My Leiningin project cannot find JavaFX in Maven.我的 Leiningin 项目在 Maven 中找不到 JavaFX。 What did I do wrong?我做错了什么?

Here's the command line output (along with some tool version info):这是命令行输出(以及一些工具版本信息):

> java --version
openjdk 13.0.2 2020-01-14
OpenJDK Runtime Environment (build 13.0.2+8)
OpenJDK 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)
> lein --version
Leiningen 2.9.1 on Java 13.0.2 OpenJDK 64-Bit Server VM
> lein clean
> lein run
Could not find artifact org.openjfx:javafx:jar:13.0.2 in central (https://repo1.maven.org/maven2/)
Could not find artifact org.openjfx:javafx:jar:13.0.2 in clojars (https://repo.clojars.org/)
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.

And here is my project file:这是我的项目文件:

(defproject pdb-java-client "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.8.0"]
                 [clj-http "2.2.0"]
                 [cheshire "5.6.3"]
                 [local/tsp-dev "6.2.0"]
                 [org.clojure/core.match "0.3.0-alpha4"]
                 [org.reflections/reflections "0.9.10"]
                 [org.openjfx/javafx "13.0.2"]]
  :main ^:skip-aot pdb-java-client.core
  :source-paths ["src/clojure"]
  :java-source-paths ["src/java"]
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all}})

Even though this is a Leiningen project, presumably a Maven project would have the same problem since Maven is used under the hood to get the dependencies.尽管这是一个 Leiningen 项目,但 Maven 项目可能会遇到同样的问题,因为 Maven 在幕后使用来获取依赖项。 I've tried several other org.openjfx artifacts and they all fail.我已经尝试了其他几个org.openjfx工件,但它们都失败了。

Looking at Maven Central , there is no release "13.0.2".查看Maven Central ,没有发布“13.0.2”。 However, it appears that "13.0.1" exists:但是,似乎存在“13.0.1”:

;; https://mvnrepository.com/artifact/org.openjfx/javafx
[org.openjfx/javafx "13.0.1" :extension "pom"]

See https://mvnrepository.com/artifact/org.openjfx/javafx/13.0.1#leiningenhttps://mvnrepository.com/artifact/org.openjfx/javafx/13.0.1#leiningen

This works in a demo project:这适用于演示项目:

~/expr/demo > lein deps
Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Retrieving org/openjfx/javafx/13.0.1/javafx-13.0.1.pom from central

I'm not sure about the qualification :extension "pom" .我不确定资格:extension "pom" That is left as an exercise for the reader.这留给读者作为练习。 ;) ;)


Update更新

Found some discussion:发现一些讨论:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM