<?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: 1056232 $ $Date: 2011-01-07 05:04:25 -0500 (Fri, 07 Jan 2011) $ -->

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

    <groupId>org.apache.geronimo.samples</groupId>
    <artifactId>samples-parent</artifactId>
    <name>Geronimo Samples :: Parent</name>
    <version>2.2.1</version>
    <packaging>pom</packaging>

    <description>
        Geronimo Samples.
    </description>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/geronimo/samples/tags/samples-parent-2.2.1</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/geronimo/samples/tags/samples-parent-2.2.1</developerConnection>
        <url>http://svn.apache.org/repos/asf/geronimo/samples/tags/samples-parent-2.2.1</url>
    </scm>

    <properties>
        <geronimoVersion>2.2.1</geronimoVersion>
        <siteId>geronimo-samples</siteId>
        <projectName>Apache Geronimo Samples</projectName>
        <jetty>jetty7</jetty>
    </properties>

    <url>http://geronimo.apache.org/maven/${siteId}/${version}</url>
    <distributionManagement>
        <site>
            <id>geronimo-website</id>
            <url>${staging.siteURL}/${siteId}/${version}</url>
        </site>
    </distributionManagement>

    <repositories>
        <!--
          NOTE: The default repositories are picked up by Genesis, but need to
                specify where Genesis lives to pickup snapshot versions.
        <repository>
            <id>apache-snapshots</id>
            <name>Apache Snapshots Repository</name>
            <url>http://people.apache.org/repo/m2-snapshot-repository</url>
            <layout>default</layout>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
                <checksumPolicy>ignore</checksumPolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
        -->
        <!--
          NOTE: The following shows how to point to a locally installed
                Geronimo Server for using artifacts already on a machine
                instead of downloading them from remote repositories.
        -->
        <!--
        <repository>
            <id>geronimo-server</id>
            <name>Local Apache Geronimo Server Repository</name>
            <url>file://~/geronimo-tomcat6-javaee5-2.2/repository</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
        -->
    </repositories>

    <modules>
        <module>buildutil</module>
        <module>geronimo-samples-archetype</module>
        <module>samples</module>
    </modules>

    <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>
            <!-- Import ActiveMQ dependency versions -->
            <dependency>
                <groupId>org.apache.geronimo.plugins</groupId>
                <artifactId>activemq</artifactId>
                <version>${geronimoVersion}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

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

                    <configuration>
                        <assemblies>
                            <assembly>
                                <id>jetty</id>
                                <groupId>org.apache.geronimo.assemblies</groupId>
                                <artifactId>geronimo-${jetty}-javaee5</artifactId>
                                <version>${geronimoVersion}</version>
                                <classifier>bin</classifier>
                                <type>zip</type>
                            </assembly>

                            <assembly>
                                <id>jetty-minimal</id>
                                <groupId>org.apache.geronimo.assemblies</groupId>
                                <artifactId>geronimo-${jetty}-minimal</artifactId>
                                <version>${geronimoVersion}</version>
                                <classifier>bin</classifier>
                                <type>zip</type>
                            </assembly>

                            <assembly>
                                <id>tomcat</id>
                                <groupId>org.apache.geronimo.assemblies</groupId>
                                <artifactId>geronimo-tomcat6-javaee5</artifactId>
                                <version>${geronimoVersion}</version>
                                <classifier>bin</classifier>
                                <type>zip</type>
                            </assembly>

                            <assembly>
                                <id>tomcat-minimal</id>
                                <groupId>org.apache.geronimo.assemblies</groupId>
                                <artifactId>geronimo-tomcat6-minimal</artifactId>
                                <version>${geronimoVersion}</version>
                                <classifier>bin</classifier>
                                <type>zip</type>
                            </assembly>

                            <assembly>
                                <id>framework</id>
                                <groupId>org.apache.geronimo.assemblies</groupId>
                                <artifactId>geronimo-framework</artifactId>
                                <version>${geronimoVersion}</version>
                                <classifier>bin</classifier>
                                <type>zip</type>
                            </assembly>
                        </assemblies>

                        <defaultAssemblyId>framework</defaultAssemblyId>

                        <optionSets>
                            <optionSet>
                                <id>morememory</id>
                                <options>
                                    <option>-Xmx512m</option>
                                    <option>-XX:MaxPermSize=128m</option>
                                </options>
                            </optionSet>

                            <optionSet>
                                <id>debug</id>
                                <options>
                                    <option>-Xdebug</option>
                                    <option>-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n</option>
                                </options>
                            </optionSet>
                        </optionSets>
                    </configuration>
                    <executions>
                         <execution>
                             <id>start</id>
                             <phase>pre-integration-test</phase>
                             <goals>
                                 <goal>start-server</goal>
                             </goals>
                             <configuration>
                                 <assemblyId>${it-server}</assemblyId>
                                 <logOutput>true</logOutput>
                                 <background>true</background>
                                 <verifyTimeout>300</verifyTimeout>
                                 <refresh>true</refresh>
                                 <optionSets>
                                     <optionSet>
                                         <id>default</id>
                                         <options>
                                            <option>-XX:MaxPermSize=128m</option>
                                         </options>
                                     </optionSet>

                                     <optionSet>
                                          <id>morememory</id>
                                          <options>
                                              <option>-Xmx512m</option>
                                              <option>-XX:MaxPermSize=128m</option>
                                          </options>
                                      </optionSet>

                                      <optionSet>
                                          <id>debug</id>
                                          <options>
                                              <option>-Xdebug</option>
                                              <option>-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n</option>
                                          </options>
                                      </optionSet>
                                 </optionSets>
                             </configuration>
                         </execution>
                         <execution>
                             <id>install-plugin</id>
                             <phase>install</phase>
                             <goals>
                                 <goal>install-plugin</goal>
                             </goals>
                             <!--<configuration>-->
                                 <!--<defaultGeronimoRepository>http://geronimo.apache.org/plugins/geronimo-${geronimoVersion}/</defaultGeronimoRepository>-->
                             <!--</configuration>-->
                         </execution>
                         <execution>
                             <id>stop</id>
                             <phase>install</phase>
                             <goals>
                                 <goal>stop-server</goal>
                             </goals>
                         </execution>
                     </executions>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.0-alpha-3</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <!-- Allow any Java >= 1.5 -->
                                <requireJavaVersion>
                                    <version>[1.5,)</version>
                                </requireJavaVersion>
                                
                                <!-- Require 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>
                    <optimize>true</optimize>
                    <debug>false</debug>
                    <showDeprecation>false</showDeprecation>
                    <showWarnings>false</showWarnings>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <configuration>
                    <targetJdk>1.5</targetJdk>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

</project>
