簡體   English   中英

從 jcenter() 更改為 mavenCentral() 並丟失了 javax.jms

[英]changed from jcenter() to mavenCentral() and got missing javax.jms

由於 jcentral()關閉,所以 javax.ws.rs 不會退出:

FAILURE: Build failed with an exception.
* What went wrong: Could not resolve all dependencies for configuration ':compileClasspath'.
> Could not determine artifacts for javax.ws.rs:javax.ws.rs-api:2.1.1
   > Could not get resource 'https://jcenter.bintray.com/javax/ws/rs/javax.ws.rs-api/2.1.1/javax.ws.rs-api-2.1.1.$%7Bpackaging.type%7D'.
      > Could not HEAD 'https://jcenter.bintray.com/javax/ws/rs/javax.ws.rs-api/2.1.1/javax.ws.rs-api-2.1.1.$%7Bpackaging.type%7D'. Received status code 400 from server: Bad Request

所以我將我的 gradle repo 從 jcenter() 更改為 mavenCentral(),並打包了gradle war got some errors about missing jms library

得到 output 錯誤:

* What went wrong:
Could not resolve all files for configuration ':compileClasspath'.
> Could not find jms.jar (javax.jms:jms:1.1).
  Searched in the following locations:
      https://repo.maven.apache.org/maven2/javax/jms/jms/1.1/jms-1.1.jar

也查了上面的URL,並沒有找到這個jms lib。

我該如何解決這個問題,謝謝!

在我的 build.gradle 中一一測試依賴后,我發現我的遺留依賴 oscache 使用了 jms.jar,在 maven 下載中沒有退出:

providedCompile group: 'opensymphony', name: 'oscache', version: '2.4.1'

OScache好久沒開發了,可能用maven的老鏈接引用jms庫。 瘋狂的事情是 gradle 在不同的環境中以不同的方式運行。 它在 intelj(與 jcentral)、事件與 javax.ws.rs(jcentral)中運行良好,但在 eclipse 或命令行環境中不一樣。

如果我在 gradle 中刪除此依賴項,它將再次運行。 所以要解決這個問題,我必須下載 oscache 作為本地庫。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM