ITPub博客

首页 > 应用开发 > IT综合 > Missing indirectly referenced artifact javax.transaction:jta:jar:1.0.1B:compile

Missing indirectly referenced artifact javax.transaction:jta:jar:1.0.1B:compile

原创 IT综合 作者:dwhvan 时间:2009-01-22 10:42:31 0 删除 编辑

Here's the solutions to the problem that occurred when I added "Hibernate" dependency using Maven: the JTA jar cannot be resolved from remote repository.

This blog is for me later and for anyone else googling it.

[@more@]

Here's the solutions to the problem that occurred when I added "Hibernate" dependency using Maven: the JTA jar cannot be resolved from remote repository.

This blog is for me later and for anyone else googling it.

Note: The Maven's website provides the general information for this:

Copying with Sun's Jars.

Install 3rd Party Jars.

1. Manually Add the JARs

The hibernate has dependency on JTA, which is owned by Sun. Due to Sun's license, the JTA jar cannot be placed in the Maven repository so we have to download it and install it to our local repository manually:

mvn install:install-file
-Dfile=./jta-1_0_1B-classes.zip
-DgroupId=javax.transaction
-DartifactId=jta -Dversion=1.0.1B
-Dpackaging=jar

2. Add another Repository for Sun's JARs

Java.net provides a Maven 2 repository. You could specify it directly in your POM or in your settings.xml between the tags :




maven2-repository.dev.java.net
Java.net Repository for Maven
http://download.java.net/maven/2/


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7789781/viewspace-1016380/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2008-12-05

  • 博文量
    2
  • 访问量
    44875