Reputation: 2608
I'm trying to work with Eclipse Mars 2 and Glassfish 3.1.2, but when I use EclipseLink 2.1 to create the entitites from tables, javax.persistence is not found in the buildpath.
Is this the normal behaviour?
Something I find curious is that the jee.jar that is inside glassfish/lib only contains a pom.xml
Isn't Glassfish supposed to contain all the jars needed to develop with the jee standard?
Is my project meant to be a Maven project in order to automatically download this jars? Could I fix this by configuring my project as a Maven project?
Upvotes: 0
Views: 400
Reputation: 3309
Isn't Glassfish supposed to contain all the jars needed to develop with the jee standard?
Yes, and it contains all the jars needed but in an indirect way. Even though it is a single jar file with only one file, namely, MANIFEST.MF
and a directory maven
which contains the pom file you mentioned.
But if you open the MANIFEST.MF
file you'll see that it is pointing to a lot of jar files in the Class-Path:
entry which you need to be able develop JavaEE applications.
So everything is there and you only need to add this file into your dependency to be able to compile your JavaEE (Servlets, JSF, EJB, JPA, ...) classes and deploy on the server. But this (javaee.jar) must be a compile time dependency, i.e., should not be packaged with your application as the jars are already contained in the server.
Is my project meant to be a Maven project in order to automatically download this jars?
No. Your project can be but should not be a maven project. Let us say, for example, you have an Eclipse project where you want to develop an EJB application. Just right click on the project
go to the Properties -> Build Path
page and change to Libraries
tab
click on Add External Jars ...
lib
directory and add the javaee.jar
, and you are done.Upvotes: 1