<?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->

<!-- $Rev$ $Date$ -->

<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">

    <modelVersion>4.0.0</modelVersion>

    <!--
    <parent>
        <groupId>org.apache.geronimo.genesis</groupId>
        <artifactId>genesis-java5-flava</artifactId>
        <version>2.0</version>
    </parent>
    -->
    <parent>
        <groupId>org.apache.geronimo.plugins</groupId>
        <artifactId>plugins</artifactId>
        <version>2.2</version>
    </parent>

    <groupId>org.apache.geronimo.plugins</groupId>
    <artifactId>openjpa2</artifactId>
    <version>2.2.1-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>Geronimo Plugins, OpenJPA2</name>
    <description>Apache OpenJPA2 plugin</description>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/geronimo/plugins/openjpa2/branches/2.2</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/geronimo/plugins/openjpa2/branches/2.2</developerConnection>
        <url>http://svn.apache.org/viewvc/geronimo/plugins/openjpa2/branches/2.2</url>
    </scm>

    <properties>
        <openjpa2Version>2.0.0</openjpa2Version>
        <jpa2specVersion>1.0</jpa2specVersion>
        <bvspecVersion>1.0</bvspecVersion>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- set siteId to artifactId for any "top level" project rooting a website -->
        <siteId>openjpa2</siteId>

        <geronimoVersion>2.2</geronimoVersion>
         <!-- Plugins source-repository list-->
        <PluginSrcRepoLocal>~/.m2/repository/</PluginSrcRepoLocal>
        <PluginSrcRepoCentral>http://repo1.maven.org/maven2/</PluginSrcRepoCentral>
        <PluginSrcRepoApacheSnapshots>http://repository.apache.org/snapshots/</PluginSrcRepoApacheSnapshots>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Import Geronimo Server used dependency versions
            <dependency>
                <groupId>org.apache.geronimo</groupId>
                <artifactId>geronimo</artifactId>
                <version>${geronimoVersion}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            -->
            <dependency>
                <groupId>org.apache.openjpa</groupId>
                <artifactId>openjpa</artifactId>
                <version>${openjpa2Version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- project depends -->
            <dependency>
                <groupId>org.apache.openjpa</groupId>
                <artifactId>openjpa</artifactId>
                <version>${openjpa2Version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.openjpa</groupId>
                        <artifactId>openjpa-lib</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.openjpa</groupId>
                        <artifactId>openjpa-kernel</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.openjpa</groupId>
                        <artifactId>openjpa-jdbc</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.openjpa</groupId>
                        <artifactId>openjpa-persistence</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.openjpa</groupId>
                        <artifactId>openjpa-persistence-jdbc</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.openjpa</groupId>
                        <artifactId>openjpa-xmlstore</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>net.sourceforge.serp</groupId>
                        <artifactId>serp</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>commons-lang</groupId>
                        <artifactId>commons-lang</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>commons-collections</groupId>
                        <artifactId>commons-collections</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>commons-pool</groupId>
                        <artifactId>commons-pool</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.geronimo.specs</groupId>
                        <artifactId>geronimo-jms_1.1_spec</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.geronimo.specs</groupId>
                        <artifactId>geronimo-jta_1.1_spec</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.geronimo.specs</groupId>
                        <artifactId>geronimo-jpa_2.0_spec</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.geronimo.specs</groupId>
                        <artifactId>geronimo-validation_1.0_spec</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.apache.openjpa</groupId>
                <artifactId>openjpa-persistence-jdbc</artifactId>
                <version>${openjpa2Version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-jpa_2.0_spec</artifactId>
                <version>${jpa2specVersion}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-validation_1.0_spec</artifactId>
                <version>${bvspecVersion}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.apache.geronimo.testsupport</groupId>
            <artifactId>testsupport-common</artifactId>
            <version>${geronimoVersion}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>no-it</id>
            <modules>
                <module>geronimo-openjpa2</module>
                <module>openjpa2</module>
                <module>geronimo-persistence-jpa20</module>
                <module>geronimo-persistence-jpa20-builder</module>
                <module>persistence-jpa20-deployer</module>
            </modules>
        </profile>
    </profiles>

    <modules>
        <module>geronimo-openjpa2</module>
        <module>openjpa2</module>
        <module>geronimo-persistence-jpa20</module>
        <module>geronimo-persistence-jpa20-builder</module>
        <module>persistence-jpa20-deployer</module>
        <module>jpa-tests</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.geronimo.buildsupport</groupId>
                    <artifactId>car-maven-plugin</artifactId>
                    <version>${geronimoVersion}</version>
                    <extensions>true</extensions>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
            <plugin>    
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>rat-maven-plugin</artifactId>
                <executions>
                    <execution> 
                        <phase>verify</phase>
                        <goals>     
                            <goal>check</goal>
                        </goals>   
                    </execution>
                </executions>
                <configuration>
                    <excludes>  
                        <exclude>**/*.log</exclude>
                        <exclude>**/rat.txt</exclude>
                        <exclude>**/dependencies.xml</exclude>
                        <exclude>**/target/**</exclude>
                        <exclude>release.properties</exclude>
                        <!-- Exclude Eclipse generated files -->
                        <exclude>**/.*/**</exclude>
                    </excludes> 
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.geronimo.buildsupport</groupId>
                <artifactId>car-maven-plugin</artifactId>
                <version>${geronimoVersion}</version>
                <extensions>true</extensions>
                <configuration>
                    <category>Persistence</category>
                    <archive>
                        <!-- Do not include META-INF/maven to avoid long file problems on windows -->
                        <addMavenDescriptor>false</addMavenDescriptor>
                    </archive>
                    <osiApproved>true</osiApproved>
                    <useMavenDependencies>
                        <value>true</value>
                        <includeVersion>true</includeVersion>
                        <useTransitiveDependencies>true</useTransitiveDependencies>
                    </useMavenDependencies>
                    <commonInstance>
                        <plugin-artifact>
                            <geronimo-version>2.2</geronimo-version>
                            <geronimo-version>2.2.1-SNAPSHOT</geronimo-version>
                            <geronimo-version>2.2.1</geronimo-version>
                            <geronimo-version>2.2.2-SNAPSHOT</geronimo-version>
                            <jvm-version>1.5</jvm-version>
                            <jvm-version>1.6</jvm-version>
                            <source-repository>${PluginSrcRepoLocal}</source-repository>
                            <source-repository>${PluginSrcRepoCentral}</source-repository>
                            <source-repository>${PluginSrcRepoApacheSnapshots}</source-repository>
                        </plugin-artifact>
                    </commonInstance>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
