How do I import the javax.persistence and javax.inject libraries into a maven project?
Note: I'm using eclipse.
How do I import the javax.persistence and javax.inject libraries into a maven project?
Note: I'm using eclipse.
All dependencies of these two groupID
are in the central repositories, so in short, just include the libraries you need in your pom.xml
.
In the case of groupId
javax.inject
are just two, an example would be this:
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
Since dependencies with groupId
javax.persistence
are more, an example would be the persistence API:
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
</dependency>
To include directly through Eclipse, right click on the maven project, Maven > Add Dependency
, as in the image below:
Inthedialogthatwillbedisplayed,simplyincludetherequestedinformation,orsearchforthesegroupId
youneed,asintheexamplebelow:
If you need some other dependency, you can in an indexer such as MVNRepository