maven2不能下载jta-1.0.1B.jar的解决方法(手工安装):

时间:2022-05-28 13:53:12

maven2不能自动下载jta-1.0.1B.jar,我们就手工安装:
异常现象:
Downloading: ->
    http://repo1.maven.org/maven2/javax/transaction ->
      /jta/1.0.1B/jta-1.0.1B.jar
[WARNING] Unable to get resource from repository central ->
    (http://repo1.maven.org/maven2)
...
[INFO] Failed to resolve artifact.

required artifacts missing:
 javax.transaction:jta:jar:1.0.1B
 
 
1 可在以下站点下载jta-1_0_1B-classes.zip
 http://java.sun.com/javaee/technologies/jta/index.jsp
2 进入zip文件所在目录,执行一下命令从本地安装
mvn install:install-file   -Dfile=./jta-1_0_1B-classes.zip   -DgroupId=javax.transaction   -DartifactId=jta -Dversion=1.0.1B   -Dpackaging=jar