<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <name>Google AppEngine DataNucleus plugin</name>
    <description>
        Plugin for DataNucleus providing persistence to the Google AppEngine BigTable datastore
    </description>
    <groupId>com.google.appengine.orm</groupId>
    <artifactId>datanucleus-appengine</artifactId>
    <packaging>jar</packaging>
    <version>2.1.1</version>

    <repositories>
        <repository>
            <id>DataNucleus</id>
            <url>http://www.datanucleus.org/downloads/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <!--<repository>-->
            <!--<id>DataNucleus_Nightly</id>-->
            <!--<url>http://www.datanucleus.org/downloads/maven2-nightly</url>-->
            <!--<snapshots>-->
                <!--<enabled>true</enabled>-->
            <!--</snapshots>-->
        <!--</repository>-->
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>DataNucleus_2</id>
            <url>http://www.datanucleus.org/downloads/maven2/</url>
        </pluginRepository>
    </pluginRepositories>

    <dependencies>
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-api-1.0-sdk</artifactId>
            <version>1.7.1</version>
        </dependency>
        <dependency>
            <groupId>org.datanucleus</groupId>
            <artifactId>datanucleus-core</artifactId>
            <!--version>3.1.0-m3</version-->
            <version>[3.1.1, 3.2)</version>
        </dependency>

        <!-- Only needed for building the dist.  Can we pull it in just for the assembly? -->
        <dependency>
          <groupId>org.datanucleus</groupId>
          <artifactId>datanucleus-enhancer</artifactId>
          <version>[3.1.0-release, )</version>
          <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>javax.jdo</groupId>
            <artifactId>jdo-api</artifactId>
            <version>3.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jpa_2.0_spec</artifactId>
            <version>1.0</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.datanucleus</groupId>
            <artifactId>datanucleus-api-jdo</artifactId>
            <version>[3.1.1, 3.2)</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.datanucleus</groupId>
            <artifactId>datanucleus-api-jpa</artifactId>
            <version>[3.1.1, 3.2)</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.9</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymockclassextension</artifactId>
            <version>2.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-api-stubs</artifactId>
            <version>1.7.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-testing</artifactId>
            <version>1.7.1</version>
            <scope>test</scope>
        </dependency>
        <!--dependency>
            <groupId>com.google</groupId>
            <artifactId>cloudcover</artifactId>
            <version>1.0.0.final</version>
            <scope>test</scope>
        </dependency-->
    </dependencies>

    <build>
        <sourceDirectory>src</sourceDirectory>
        <resources>
            <resource>
                <filtering>true</filtering>
                <directory>src</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/plugin.xml</include>
                    <include>**/META-INF/*</include>
                    <include>**/META-INF/services/*</include>
                </includes>
            </resource>
        </resources>

        <testSourceDirectory>tests</testSourceDirectory>
		<testResources>
            <testResource>
                <directory>${basedir}/tests</directory>
                <includes>
                    <include>**/*.xml</include>
                    <include>**/*.jdo*</include>
                    <include>**/*.orm*</include>
                    <include>**/*.jdoquery*</include>
                </includes>
            </testResource>
            <testResource>
                <directory>${basedir}</directory>
                <includes>
                    <include>log4j.properties</include>
                </includes>
            </testResource>
        </testResources>

        <plugins>
            <plugin>
                <version>2.4.1</version>
                <artifactId>maven-clean-plugin</artifactId>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${basedir}</directory>
                            <includes>
                                <include>**/datanucleus.log</include>
                            </includes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.datanucleus</groupId>
                <artifactId>maven-datanucleus-plugin</artifactId>
                <version>3.1.0-m3</version>
                <configuration>
                    <metadataDirectory>${project.build.testOutputDirectory}</metadataDirectory>
                    <metadataIncludes>**/test/**/*.class</metadataIncludes>
                    <classes>${project.build.testOutputDirectory}</classes>
                    <log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
                    <verbose>true</verbose>
                </configuration>
                <executions>
                    <execution>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>enhance</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.8.1</version>
                <configuration>
                    <argLine>-Xmx256m</argLine>
                    <argLine>-Djava.util.logging.config.file=logging.properties</argLine>
                    <forkMode>always</forkMode>
                    <excludes>
                        <exclude>**/*TestCase.java</exclude>
                    </excludes>
                    <skipTests>false</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <archive>
                        <manifestFile>src/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.3</version>
                <executions>
                    <execution>
                        <id>src-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <classifier>sources</classifier>
                            <failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
                            <excludeTransitive>false</excludeTransitive>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Jar up the source for the plugin -->
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <configuration>
                    <outputDirectory>${project.build.directory}/sources</outputDirectory>
                    <attach>false</attach>
                </configuration>
                <executions>
                    <execution>
                        <id>make-src-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.2.1</version>
                <configuration>
                    <descriptors>
                        <descriptor>dist-assembly.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-dep-src-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
