Skip to content

Instantly share code, notes, and snippets.

@bartprokop
Created June 9, 2012 20:35
Show Gist options
  • Save bartprokop/2902491 to your computer and use it in GitHub Desktop.
Save bartprokop/2902491 to your computer and use it in GitHub Desktop.
JPA 2.0 for GAE with Maven
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<!-- Project description -->
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>bart.prokop.name</groupId>
<artifactId>parent-pom</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>bart.prokop.name</groupId>
<artifactId>e-start24</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>E-Start24</name>
<description>System Rozliczania Biegaczy</description>
<url>http://e-start24.appspot.com</url>
<properties>
<gae.home>c:\bart\appengine-java-sdk-1.6.5</gae.home>
<gae.version>1.6.5</gae.version>
</properties>
<!-- Project dependencies -->
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin</artifactId>
</dependency>
<!-- GAE SDK -->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>${gae.version}</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-labs</artifactId>
<version>${gae.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-stubs</artifactId>
<version>${gae.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-testing</artifactId>
<version>${gae.version}</version>
<scope>test</scope>
</dependency>
<!-- Logging dependencies -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</dependency>
<!-- JPA 2.0 for GAE -->
<dependency>
<groupId>org.datanucleus</groupId>
<version>3.0.5</version>
<artifactId>datanucleus-api-jdo</artifactId>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<version>3.0.6</version>
<artifactId>datanucleus-api-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.google.appengine.orm</groupId>
<artifactId>datanucleus-appengine</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
<version>3.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jpa_2.0_spec</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>javax.jdo</groupId>
<artifactId>jdo-api</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<!-- This plug-in "enhances" your domain model objects (i.e. makes them persistent for datanucleus) -->
<plugin>
<groupId>org.datanucleus</groupId>
<artifactId>maven-datanucleus-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<!-- Make sure this path contains your persistent classes! -->
<mappingIncludes>**/bol/*.class</mappingIncludes>
<verbose>true</verbose>
<api>JPA</api>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>enhance</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>asm</groupId>
<artifactId>asm-commons</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<version>3.0.6</version>
<artifactId>datanucleus-api-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
<version>3.0.6</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-enhancer</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>
</plugin>
<!-- The actual maven-gae-plugin. Type "mvn gae:run" to run project, "mvn gae:deploy" to upload to GAE. -->
<plugin>
<groupId>net.kindleit</groupId>
<artifactId>maven-gae-plugin</artifactId>
<version>0.9.3</version>
<configuration>
<serverId>appengine.google.com</serverId>
</configuration>
<dependencies>
<dependency>
<groupId>net.kindleit</groupId>
<artifactId>gae-runtime</artifactId>
<version>${gae.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment