<?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.
-->
<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.daytrader</groupId>
        <artifactId>daytrader-parent</artifactId>
        <version>3.0-SNAPSHOT</version>
    </parent>

    <groupId>org.apache.geronimo.daytrader</groupId>
    <artifactId>plugins</artifactId>
    <name>DayTrader :: Plugins</name>
    <packaging>pom</packaging>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <property>
                    <name>default</name>
                </property>
            </activation>
            <modules>
                <module>daytrader-derby-datasource</module>        	
                <module>daytrader-jms</module>
                <!--<module>daytrader-jetty</module>
                <module>daytrader-tomcat</module>-->
            </modules>
        </profile>
        <!--
            You can build the extra datasources in this profile if you have
            the required JDBC artifacts from each DB vendor installed into
            either your local repo or a private maven repo you have setup,
            by supplying the URL on the mvn cmdline as:
                -Dmaven.repo.drivers=http://my.local.repo
        -->
        <profile>
            <id>all</id>
            <activation>
                <property>
                    <name>all</name>
                </property>
            </activation>
            <modules>
                <module>daytrader-derby-datasource</module>
                <module>daytrader-db2-datasource</module>
                <module>daytrader-oracle-datasource</module>
        	<module>daytrader-mysql-datasource</module>
                <module>daytrader-informix-datasource</module>
        	<module>daytrader-sqlserver-datasource</module>
                <module>daytrader-postgre-datasource</module>        	
                <!--<module>daytrader-jetty</module>
                <module>daytrader-tomcat</module>-->
            </modules>
            <properties>
                <maven.repo.drivers>http://not.a.real.repository</maven.repo.drivers>
            </properties>
            <repositories>
                <repository>
                    <id>maven.repo.drivers</id>
                    <name>Private JDBC Driver Repository</name>
                    <url>${maven.repo.drivers}</url>
                    <layout>default</layout>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <releases>
                        <enabled>true</enabled>
                        <checksumPolicy>ignore</checksumPolicy>
                    </releases>
                </repository>
            </repositories>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.geronimo.buildsupport</groupId>
                <artifactId>car-maven-plugin</artifactId>
                <version>${geronimoVersion}</version>
                <!-- Install as extention to allow 'car' packaging to be used. -->
                <extensions>true</extensions>
                <configuration>
                    <archive>
                        <!-- Do not include META-INF/maven to avoid long file problems on windows -->
                        <addMavenDescriptor>false</addMavenDescriptor>
                    </archive>
                    <url>http://geronimo.apache.org/</url>
                    <author>The Apache Geronimo development community</author>
                    <osiApproved>true</osiApproved>
                    <useMavenDependencies>
                        <value>true</value>
                        <includeVersion>true</includeVersion>
                        <useTransitiveDependencies>true</useTransitiveDependencies>
                    </useMavenDependencies>
                    <deploymentConfigs>
                        <deploymentConfig>${gbeanDeployer}</deploymentConfig>
                        <deploymentConfig>${j2eeDeployer}</deploymentConfig>
                        <deploymentConfig>${connectorDeployer}</deploymentConfig>
                    </deploymentConfigs>
                    <commonInstance>
                        <plugin-artifact>
                        <geronimo-version>${geronimoVersion}</geronimo-version>
                            <!--<geronimo-version>2.2</geronimo-version>
                            <geronimo-version>2.2.1-SNAPSHOT</geronimo-version>-->
                            <jvm-version>1.5</jvm-version>
                            <jvm-version>1.6</jvm-version>
                            <source-repository>~/.m2/repository/</source-repository>
                            <source-repository>http://repository.apache.org/snapshots/</source-repository>
                            <source-repository>http://repo1.maven.org/maven2/</source-repository>
                        </plugin-artifact>
                    </commonInstance>
                </configuration>
            </plugin>

            <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 -->
                                <requireJavaVersion>
                                    <version>[1.5,)</version>
                                </requireJavaVersion>

                                <!-- Allow any Maven >= 2.0.9 -->
                                <requireMavenVersion>
                                    <version>[2.0.9,)</version>
                                </requireMavenVersion>
                            </rules>
                        </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>
                    <linkModules>true</linkModules>
                </configuration>
            </plugin>

        </plugins>
    </build>
</project>
