wsjclear 2011-04-08
用maven构建hibernate项目时,提示:Missingartifactjavax.transaction:jta:jar:1.0.1B:compile,这是因为由于sun的许可协议,Mavenrepository中没有包含这个文件,
有两种解决方案,
SolutionA.我们可以手工添加,具体方法是:
1、在https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=7089-jta-1.0.1B-mr-class-oth-JSpec@CDS-CDS_Developer
页面下载jta-1_0_1B-classes.zip;
2、运行mvninstall:install-file-Dfile=./jta-1_0_1B-classes.zip-DgroupId=javax.transaction-DartifactId=jta-Dversion=1.0.1B-Dpackaging=jar
SolutionB
在Pom.xml里面加入
<repositories> <repository> <id>java</id> <name>java official repository</name> <url>http://download.java.net/maven/2/</url> </repository> </repositories>