[英]changed from jcenter() to mavenCentral() and got missing javax.jms
Due to jcentral() shutdown so javax.ws.rs doesn't exits:由于 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
So i changed my gradle repo from jcenter() to mavenCentral(), and packaged gradle war got some errors about missing jms library所以我将我的 gradle repo 从 jcenter() 更改为 mavenCentral(),并打包了gradle war got some errors about missing jms library
Got output error:得到 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
Also checked the URL above, and this jms lib is not found.也查了上面的URL,并没有找到这个jms lib。
How can I resolve this, tks in advantage!我该如何解决这个问题,谢谢!
After test one by one dependency in my build.gradle, i found my legacy dependency oscache that used jms.jar that no exits in maven download:在我的 build.gradle 中一一测试依赖后,我发现我的遗留依赖 oscache 使用了 jms.jar,在 maven 下载中没有退出:
providedCompile group: 'opensymphony', name: 'oscache', version: '2.4.1'
OScache hasn't been developed a long time ago, it might used old link in maven to reference jms library. OScache好久没开发了,可能用maven的老链接引用jms库。 Crazy things is gradle running differently in different environments.疯狂的事情是 gradle 在不同的环境中以不同的方式运行。 It worked well in intelj(with jcentral), event with javax.ws.rs(jcentral) but not the same in eclipse or command line environment.它在 intelj(与 jcentral)、事件与 javax.ws.rs(jcentral)中运行良好,但在 eclipse 或命令行环境中不一样。
If i remove this dependency in gradle, it works again.如果我在 gradle 中删除此依赖项,它将再次运行。 So to solve this issue I must download oscache as local lib.所以要解决这个问题,我必须下载 oscache 作为本地库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.