java - Maven : Not able to download dependencies jta:1. 0.1B

标签 java maven-2 jta

运行 mvn clean install 时收到以下错误。

错误表示无法解析依赖项javax.transaction:jta:jar:1.0.1B

请注意,我没有在我的 pom.xml 中引用 javax.transaction:jta:jar:1.0.1B可能这个依赖项是由我在 pom 中提到的其他一些依赖项引用的。

请找出下面的错误

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building sample-webapp Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.810 s
[INFO] Finished at: 2016-12-05T08:43:47+05:30
[INFO] Final Memory: 12M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project sample-webapp: Could not resolve dependencies for project com.ganesh:sample-webapp:war:1.0-SNAPSHOT: Could not find artifact ja
vax.transaction:jta:jar:1.0.1B in central (https://repo.maven.apache.org/maven2), try downloading from http://java.sun.com/products/jta -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

最佳答案

that's a legacy library that is not available from Maven Central. It isn't available because there are still some old Sun-era Javax JARS that are not covered under open source licenses. If you need to access this JTA 1.0.1B library, you will need to replace that dependency using an exclusion.

注意:当我点击此网址时 https://repo.maven.apache.org/maven2/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar 在浏览器中,它返回404 Not Found然后我不知道为什么你可以下载它。


了解更多信息Why can't I download the javax.transaction:jta:1.0.1B JAR?

关于java - Maven : Not able to download dependencies jta:1. 0.1B,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40966655/

相关文章:

java - 作为 root 的 Spring 资源文件

maven-2 - 如何在不部署 jars 的情况下在 Maven 中配置子项目依赖项?

java - 配置hibernate 3.6依赖项

jakarta-ee - 在提交 JTA 事务之前为 JMS 消息激活 MDB

java - 后端的 CDI?

java - 奇怪的 Java 运行时错误 - currency.data

java - 是否有一种简洁的方法可以使用 Java 将 NOP 记录添加到 AFP 文件中?

java - 如何从 "API URL"隐藏 "API KEY"和 "ApiResources.java"

maven-2 - Intellij - 为什么 Maven 和 Perforce 在设置中而不是 IDE 设置中?

java - 客户端->服务器->客户端之间的分布式事务