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