简体   繁体   English

从 jcenter() 更改为 mavenCentral() 并丢失了 javax.jms

[英]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.

相关问题 Jboss EAP 7 - 如何从部署中排除隐式模块(javax.jms)? - Jboss EAP 7 - How to exclude implicit modules from deployment (javax.jms)? JNLP启动的客户端无法使用javax.jms API - javax.jms API not availble to JNLP launched client javax.jms不存在 - 编译activemq示例 - javax.jms does not exist - compiling activemq examples 将工件从本地Gradle工件存储库部署到JCenter / MavenCentral - Deploying artifacts from a local Gradle artifactory repository to JCenter/MavenCentral Package 在模块中声明了“javax.jms”,但名称无效(“geronimo.jms.2.0.spec”) - Package 'javax.jms' is declared in module with an invalid name ('geronimo.jms.2.0.spec') 是否可以与javax.jms建立rabbitMQ连接(不使用rabbitMQ jms client / java client)? 如果是,怎么办? - is it possible to establish rabbitMQ connection with javax.jms (not using rabbitMQ jms client/ java client )? if yes how? 如何解决 osgi.wiring.package=javax.jms)(version>=1.1.0)(.(version>=2.0?0) 问题? - How do I solve osgi.wiring.package=javax.jms)(version>=1.1.0)(!(version>=2.0.0) issue? 仅使用 jcenter 还是同时使用 jcenter 和 mavenCentral 存储库更稳定? - Is it more stable to use only jcenter or to use both jcenter and mavenCentral repositories? Android 构建脚本存储库:jcenter VS mavencentral - Android buildscript repositories: jcenter VS mavencentral 我可以同时使用 jcenter() 和 mavenCentral() 在我的应用程序中实现 Firebase 吗? - Can I use both jcenter() and mavenCentral() to implement Firebase in my app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM