0

I'm using maven-gae-plugin to manage a Google AppEngine project but I don't know how to include the libraries required to use JPA.

Google's documentation says:

The classpath must contain the JARs 'datanucleus-core-*.jar', 'datanucleus-jpa-*', 'datanucleus-enhancer-*.jar', 'asm-*.jar', and 'geronimo-jpa-*.jar' (where * is the appropriate version number of each JAR) from the 'appengine-java-sdk/lib/tools/' directory, as well as all of your data classes.

How can I tell the plugin to put all the jars in the classpath?

So far I just edited the pom.xml file setting gae.version to 1.7.3 (Leaving datanucleus.version to 1.1.5 and I run mvn gae:unpack but I cannot get it to work.

First, I have problems with javax.persistance that is not found. Do I have to add it manually to pom.xml?

If I do it, the development server starts, but I cannot work with the storage: I get the following error:

SEVERE: Found Meta-Data for class com.sharecost.entities.User but this class is not enhanced!! Please enhance the class before running DataNucleus.

mariosangiorgio
  • 5,520
  • 4
  • 32
  • 46

1 Answers1

0

I found a solution to the second part of my question. Looking at the POM.xml file I discovered that the all entities are supposed to be in a **/model package.

I still don't know if the manual inclusion of the javax.persistence dependency is actually required.

mariosangiorgio
  • 5,520
  • 4
  • 32
  • 46