Note that I specified a provided scope here, which means that your dependency is available at compile- and test-time, but will not be packaged into your artifacts. This is usually needed if you want to deploy your artifacts in an application server, since they provide their own implementation of the api.
3条答案
按热度按时间sbtkgmzw1#
This is the one for
javax.persistence
:and this is for the whole Java EE 6 stack:
Edit
Note that I specified a
provided
scope here, which means that your dependency is available at compile- and test-time, but will not be packaged into your artifacts. This is usually needed if you want to deploy your artifacts in an application server, since they provide their own implementation of the api.6yt4nkrj2#
And add this dependency in your
pom.xml
:That "Coping with Sun JARs" page might be a little outdated, this JAR is available in the Maven Central Repository
a11xaf1n3#
更新链接:https://mvnrepository.com/artifact/javax.persistence/javax.persistence-api/2.2在这里。
Maven依赖关系如下: