<?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.config</groupId>
        <artifactId>project-config</artifactId>
        <version>1.4</version>
    </parent>

    <groupId>org.apache.geronimo.plugins</groupId>
    <artifactId>james-parent</artifactId>
    <name>Geronimo Apache James Server integration parent</name>
    <packaging>pom</packaging>

    <version>1.0-SNAPSHOT</version>

    <description>
        Integration of the Apache James Server into Apache Geronimo
    </description>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/geronimo/plugins/james/trunk</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/geronimo/plugins/james/trunk
        </developerConnection>
        <url>http://svn.apache.org/viewvc/geronimo/plugins/james/trunk</url>
    </scm>

    <properties>
        <!--
        NOTE: Project version, to be used instead of ${pom.version} since that
              value magically changes when using SNAPSHOT versions.

              This value *must* be kept in sync with the value of the <version>
              element, and it will need to be changed manually before a release,
              as the maven-release-plugin will not update this value.
        -->
        <version>1.0-SNAPSHOT</version>

        <!-- This property is required by the car:package mojo -->
        <geronimoVersion>2.2-SNAPSHOT</geronimoVersion>

        <geronimoSchemaVersion>1.2</geronimoSchemaVersion>
        <jamesVersion>3.0-SNAPSHOT</jamesVersion>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- NOTA BENE: use the org.apache.geronimo.javamail/geronimo-javamail_1.4_mail uber jar
            containing both the spec and the providers in order that users can actually use mail
            without advanced degrees in geronimo classloading.  DO NOT add or replace this with
            org.apache.geronimo.specs/geronimo-javamail_1.4_spec -->
            <dependency>
                <groupId>org.apache.geronimo.javamail</groupId>
                <artifactId>geronimo-javamail_1.4_mail</artifactId>
                <version>1.3</version>
            </dependency>

            <dependency>
                <groupId>org.apache.geronimo.framework</groupId>
                <artifactId>geronimo-system</artifactId>
                <version>${geronimoVersion}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.geronimo.framework</groupId>
                <artifactId>j2ee-system</artifactId>
                <version>${geronimoVersion}</version>
                <type>car</type>
            </dependency>

            <dependency>
                <groupId>org.apache.geronimo.configs</groupId>
                <artifactId>system-database</artifactId>
                <version>${geronimoVersion}</version>
                <type>car</type>
            </dependency>
            <dependency>
                <groupId>org.tranql</groupId>
                <artifactId>tranql-connector-derby-embed-xa</artifactId>
                <version>1.4</version>
                <type>rar</type>
            </dependency>

            <dependency>
                <groupId>org.apache.geronimo.framework</groupId>
                <artifactId>geronimo-gbean-deployer</artifactId>
                <version>${geronimoVersion}</version>
                <type>car</type>
            </dependency>
            <dependency>
                <groupId>org.apache.geronimo.configs</groupId>
                <artifactId>j2ee-deployer</artifactId>
                <version>${geronimoVersion}</version>
                <type>car</type>
            </dependency>
            <dependency>
                <groupId>org.apache.geronimo.configs</groupId>
                <artifactId>connector-deployer</artifactId>
                <version>${geronimoVersion}</version>
                <type>car</type>
            </dependency>


            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>1.0.4</version>
            </dependency>

            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.14</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.4.0</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-jcl</artifactId>
                <version>1.4.0</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>1.4.0</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-nop</artifactId>
                <version>1.4.0</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>3.8.1</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring</artifactId>
                <version>2.0.6</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>2.0.6</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>2.0.6</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>2.0.6</version>
            </dependency>

            <dependency>
                <groupId>org.apache.james</groupId>
                <artifactId>james-server-spring-deployment</artifactId>
                <version>${jamesVersion}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.james</groupId>
                <artifactId>james-server-avalon-spring-bridge-library</artifactId>
                <version>${jamesVersion}</version>
            </dependency>

            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>5.8</version>
                <classifier>jdk15</classifier>
                <scope>test</scope>
            </dependency>

            <!-- unstated transitive dependencies of james -->
            <dependency>
                <groupId>spice</groupId>
                <artifactId>spice-configkit</artifactId>
                <version>1.1.2</version>
            </dependency>
            <dependency>
                <groupId>org.apache.james</groupId>
                <artifactId>james-server</artifactId>
                <version>${jamesVersion}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!--<dependency>-->
            <!--<groupId>org.apache.james</groupId>-->
            <!--<artifactId>james-server-spoolmanager-function</artifactId>-->
            <!--<version>${jamesVersion}</version>-->
            <!--</dependency>-->
            <dependency>
                <groupId>org.apache.geronimo.modules</groupId>
                <artifactId>geronimo-derby</artifactId>
                <version>${geronimoVersion}</version>
            </dependency>

            <!--<dependency>-->
            <!--<groupId>commons-lang</groupId>-->
            <!--<artifactId>commons-lang</artifactId>-->
            <!--<version>2.3</version>-->
            <!--</dependency>-->
        </dependencies>
    </dependencyManagement>

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

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.0-alpha-2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.0-alpha-4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.4.2</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>groovy-maven-plugin</artifactId>
                    <version>1.0-alpha-2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <configuration>
                        <archive>
                            <!-- Do not include META-INF/maven to avoid long file problems on windows -->
                            <addMavenDescriptor>false</addMavenDescriptor>
                        </archive>
                    </configuration>
                </plugin>

            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <!-- Allow any Java >= 1.5, but not 1.6 or above -->
                                <requireJavaVersion>
                                    <version>[1.5,1.6)</version>
                                </requireJavaVersion>

                                <!-- Allow any Maven >= 2.0.5 -->
                                <requireMavenVersion>
                                    <version>[2.0.9,)</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.geronimo.genesis.plugins</groupId>
                <artifactId>tools-maven-plugin</artifactId>

                <!-- Tools includes custom packagings, install as extension to pick them up -->
                <extensions>true</extensions>

                <executions>
                    <execution>
                        <id>verify-legal-files</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>verify-legal-files</goal>
                        </goals>
                        <configuration>
                            <!-- Fail the build if no legal files were found -->
                            <strict>true</strict>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <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.apache.maven.plugins</groupId>
                <artifactId>maven-idea-plugin</artifactId>
                <configuration>
                    <jdkName>1.5</jdkName>
                    <jdkLevel>1.5</jdkLevel>
                    <linkModules>true</linkModules>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <tagBase>https://svn.apache.org/repos/asf/geronimo/plugins/james/tags</tagBase>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <!--
        NOTE: The repository and snapshotRepository are picked up from Genesis.
        -->

        <site>
            <id>geronimo-website</id>
            <url>scp://people.apache.org/www/geronimo.apache.org/maven/server</url>
        </site>
    </distributionManagement>

    <modules>
        <module>geronimo-james</module>
        <module>james-derby-database</module>
        <module>james</module>
    </modules>

    <profiles>

        <profile>
            <id>makeeclipse</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-eclipse-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>validate</phase>
                                <goals>
                                    <goal>eclipse</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>groovy-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>validate</phase>
                                <goals>
                                    <goal>execute</goal>
                                </goals>
                                <configuration>
                                    <classpath>
                                        <element>
                                            <groupId>org.apache.geronimo.buildsupport</groupId>
                                            <artifactId>groovy-build-library</artifactId>
                                            <version>${version}</version>
                                        </element>
                                    </classpath>
                                    <source>
                                        <body>
                                            org.apache.geronimo.buildsupport.FixEclipseProjects.execute(this)
                                        </body>
                                    </source>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <configuration>
                            <tagBase>https://svn.apache.org/repos/asf/geronimo/plugins/release/tags</tagBase>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>with-assembly</id>
            <modules>
                <module>james-server</module>
            </modules>
        </profile>
    </profiles>

</project>