<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2012 Red Hat, Inc., and individual contributors
  ~ as indicated by the @author tags.
  ~
  ~ Licensed 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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>15</version>
    </parent>

    <groupId>io.undertow</groupId>
    <artifactId>undertow-parent</artifactId>
    <version>1.1.0.CR4</version>

    <name>Undertow</name>
    <description>Undertow</description>

    <packaging>pom</packaging>

    <licenses>
        <license>
            <name>Apache License Version 2.0</name>
            <url>http://repository.jboss.org/licenses/apache-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git://github.com/undertow-io/undertow.git</connection>
        <developerConnection>scm:git://github.com/undertow-io/undertow.git</developerConnection>
        <url>https://github.com/undertow-io/undertow</url>
    </scm>

    <properties>
        <!--
            Dependency versions. Please keep alphabetical.

            Each version property should be of the form "version.<groupId>".
            For example: <version.org.jboss.as>

            In cases where multiple artifacts use the same groupId but have different
            versions, add the artifactId or other qualifier to the property name.
            For example: <version.org.jboss.as.console>
         -->
        <version.com.h2database>1.3.175</version.com.h2database>
        <version.easymock>3.2</version.easymock>        
        <version.io.undertow.jastow>1.0.0.Final</version.io.undertow.jastow>
        <version.junit>4.11</version.junit>        
        <version.netty>3.6.6.Final</version.netty>     
        <version.org.apache.directory.server>2.0.0-M15</version.org.apache.directory.server>   
        <version.org.apache.httpmime>4.2.6</version.org.apache.httpmime>
        <version.org.apache.httpcomponents>4.2.6</version.org.apache.httpcomponents>
        <version.org.glassfish.el>3.0.0</version.org.glassfish.el>
        <version.org.jboss.classfilewriter>1.0.5.Final</version.org.jboss.classfilewriter>
        <version.org.jboss.logging>3.1.4.GA</version.org.jboss.logging>
        <version.org.jboss.logging.processor>1.2.0.Final</version.org.jboss.logging.processor>
        <version.org.jboss.logmanager>1.5.2.Final</version.org.jboss.logmanager>
        <version.org.jboss.spec.javax.annotation.jboss-annotations-api_1.2_spec>1.0.0.Final</version.org.jboss.spec.javax.annotation.jboss-annotations-api_1.2_spec>
        <version.org.jboss.spec.javax.servlet.jboss-servlet-api_3.1_spec>1.0.0.Final</version.org.jboss.spec.javax.servlet.jboss-servlet-api_3.1_spec>
        <version.org.jboss.spec.javax.servlet.jsp>1.0.0.Final</version.org.jboss.spec.javax.servlet.jsp>
        <version.org.jboss.spec.javax.websockets>1.1.0.Final</version.org.jboss.spec.javax.websockets>
        <version.xnio>3.3.0.Beta4</version.xnio>
        
        <!-- jacoco -->
        <version.org.jacoco>0.7.1.201405082137</version.org.jacoco>
        <jacoco.agent.argLine></jacoco.agent.argLine>

        <!-- Surefire args -->
        <surefire.jpda.args/>
        <surefire.system.args>-da ${surefire.jpda.args}</surefire.system.args>

        <!-- Checkstyle configuration -->
        <linkXRef>false</linkXRef>
        <version.io.undertow.build.checkstyle-config>1.0.0.Final</version.io.undertow.build.checkstyle-config>
        <version.org.mortbay.jetty.alpn.jdk7>7.0.0.v20140317</version.org.mortbay.jetty.alpn.jdk7>
        <version.org.mortbay.jetty.alpn.jdk8>8.0.0.v20140317</version.org.mortbay.jetty.alpn.jdk8>
        <version.org.mortbay.jetty.alpn>${version.org.mortbay.jetty.alpn.jdk7}</version.org.mortbay.jetty.alpn>
        <version.org.eclipse.jetty.alpn>1.0.0</version.org.eclipse.jetty.alpn>
        <alpn-boot-string></alpn-boot-string>
    </properties>

    <modules>
        <module>parser-generator</module>
        <module>core</module>
        <module>servlet</module>
        <module>examples</module>
        <module>websockets-jsr</module>
    </modules>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-java</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>1.7</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>

                <!-- Checkstyle -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${version.checkstyle.plugin}</version>
                    <configuration>
                        <configLocation>undertow-checkstyle/checkstyle.xml</configLocation>
                        <consoleOutput>true</consoleOutput>
                        <failsOnError>true</failsOnError>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        <useFile/>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>io.undertow.build</groupId>
                            <artifactId>undertow-checkstyle-config</artifactId>
                            <version>${version.io.undertow.build.checkstyle-config}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>check-style</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>checkstyle</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
                <plugin>
                    <!--suppress MavenModelInspection -->
                    <groupId>org.eclipse.m2e</groupId>
                    <!--suppress MavenModelInspection -->
                    <artifactId>lifecycle-mapping</artifactId>
                    <!--suppress MavenModelInspection -->
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            org.apache.maven.plugins
                                        </groupId>
                                        <artifactId>
                                            maven-checkstyle-plugin
                                        </artifactId>
                                        <versionRange>
                                            [2.5,)
                                        </versionRange>
                                        <goals>
                                            <goal>checkstyle</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>

            <!-- Modules in this project -->

            <dependency>
                <groupId>io.undertow</groupId>
                <artifactId>undertow-core</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.undertow</groupId>
                <artifactId>undertow-core</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>io.undertow</groupId>
                <artifactId>undertow-examples</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.undertow</groupId>
                <artifactId>undertow-parser-generator</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.undertow</groupId>
                <artifactId>undertow-servlet</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.undertow</groupId>
                <artifactId>undertow-servlet</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>io.undertow</groupId>
                <artifactId>undertow-proxy</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.undertow</groupId>
                <artifactId>undertow-websockets-jsr</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- External Dependencies -->

            <dependency>
                <groupId>io.undertow.build</groupId>
                <artifactId>undertow-checkstyle-config</artifactId>
                <version>${version.io.undertow.build.checkstyle-config}</version>
            </dependency>

            <dependency>
                <groupId>org.jboss.classfilewriter</groupId>
                <artifactId>jboss-classfilewriter</artifactId>
                <version>${version.org.jboss.classfilewriter}</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${version.junit}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.eclipse.jetty.alpn</groupId>
                <artifactId>alpn-api</artifactId>
                <version>${version.org.eclipse.jetty.alpn}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.easymock</groupId>
                <artifactId>easymock</artifactId>
                <version>${version.easymock}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty</artifactId>
                <version>${version.netty}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-all</artifactId>
                <version>${version.org.apache.directory.server}</version>
                <scope>test</scope>
            </dependency>            

            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${version.org.apache.httpcomponents}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpmime</artifactId>
                <version>${version.org.apache.httpmime}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging</artifactId>
                <version>${version.org.jboss.logging}</version>
            </dependency>

            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging-processor</artifactId>
                <version>${version.org.jboss.logging.processor}</version>
            </dependency>

            <dependency>
                <groupId>org.jboss.logmanager</groupId>
                <artifactId>jboss-logmanager</artifactId>
                <version>${version.org.jboss.logmanager}</version>
            </dependency>

            <dependency>
                <groupId>org.jboss.spec.javax.annotation</groupId>
                <artifactId>jboss-annotations-api_1.2_spec</artifactId>
                <version>${version.org.jboss.spec.javax.annotation.jboss-annotations-api_1.2_spec}</version>
            </dependency>

            <dependency>
                <groupId>org.jboss.spec.javax.servlet</groupId>
                <artifactId>jboss-servlet-api_3.1_spec</artifactId>
                <version>${version.org.jboss.spec.javax.servlet.jboss-servlet-api_3.1_spec}</version>
            </dependency>

            <dependency>
                <groupId>org.jboss.spec.javax.servlet.jsp</groupId>
                <artifactId>jboss-jsp-api_2.3_spec</artifactId>
                <version>${version.org.jboss.spec.javax.servlet.jsp}</version>
            </dependency>

            <dependency>
                <groupId>org.jboss.spec.javax.websocket</groupId>
                <artifactId>jboss-websocket-api_1.1_spec</artifactId>
                <version>${version.org.jboss.spec.javax.websockets}</version>
            </dependency>

             <dependency>
                <groupId>io.undertow.jastow</groupId>
                <artifactId>jastow</artifactId>
                <version>${version.io.undertow.jastow}</version>
            </dependency>

            <dependency>
                <groupId>org.jboss.xnio</groupId>
                <artifactId>xnio-api</artifactId>
                <version>${version.xnio}</version>
            </dependency>

            <dependency>
                <groupId>org.jboss.xnio</groupId>
                <artifactId>xnio-nio</artifactId>
                <version>${version.xnio}</version>
            </dependency>

            <dependency>
                <groupId>org.mortbay.jetty.alpn</groupId>
                <artifactId>alpn-boot</artifactId>
                <version>${version.org.mortbay.jetty.alpn}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>javax.el</artifactId>
                <version>${version.org.glassfish.el}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>${version.com.h2database}</version>
                <scope>test</scope>
            </dependency>


        </dependencies>
    </dependencyManagement>

    <repositories>
        <repository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Repository Group</name>
            <url>http://repository.jboss.org/nexus/content/groups/public/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Repository Group</name>
            <url>http://repository.jboss.org/nexus/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <profiles>
        <profile>
            <id>jdk8</id>
            <activation>
                <jdk>1.8</jdk>
            </activation>
            <properties>
                <version.org.mortbay.jetty.alpn>${version.org.mortbay.jetty.alpn.jdk8}</version.org.mortbay.jetty.alpn>
                <alpn-boot-string>-Xbootclasspath/p:${org.mortbay.jetty.alpn:alpn-boot:jar}</alpn-boot-string>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.mortbay.jetty.alpn</groupId>
                    <artifactId>alpn-boot</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jdk7</id>
            <activation>
                <jdk>1.7</jdk>
            </activation>
            <properties>
                <alpn-boot-string>-Xbootclasspath/p:${org.mortbay.jetty.alpn:alpn-boot:jar}</alpn-boot-string>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.mortbay.jetty.alpn</groupId>
                    <artifactId>alpn-boot</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>dist</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>
            <modules>
                <module>dist</module>
            </modules>
        </profile>

        <profile>
            <id>test-coverage</id>
            <modules>
                <module>coverage-report</module>
            </modules>
            <properties>
                <jacoco.agent.argLine>${jacoco.activated.agent.argLine}</jacoco.agent.argLine>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${version.org.jacoco}</version>
                        <executions>
                            <execution>
                                <id>agent</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <includes>
                                        <include>io.undertow*</include>
                                    </includes>
                                    <propertyName>jacoco.activated.agent.argLine</propertyName>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>