<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2014, The Sporting Exchange Limited
  ~ Copyright 2015, Simon Matić Langford
  ~
  ~ 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/maven-v4_0_0.xsd">

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.betfair.cougar</groupId>
    <artifactId>cougar-master-pom</artifactId>
    <name>cougar-master-pom</name>
    <version>3.2.1</version>
    <packaging>pom</packaging>
    <inceptionYear>2009</inceptionYear>

    <distributionManagement>
        <site>
            <id>github-pages</id>
            <url>file:${site.deploy.dir}</url>
        </site>
    </distributionManagement>

    <organization>
        <name>Betfair</name>
        <url>http://www.betfair.com</url>
    </organization>

    <developers>
        <developer>
            <id>all</id>
            <name>All developers</name>
            <email>betfair-cougar@googlegroups.com</email>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <url>http://betfair.github.io/cougar</url>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/betfair/cougar/issues</url>
    </issueManagement>

    <mailingLists>
        <mailingList>
            <name>Cougar user list</name>
            <post>betfair-cougar@googlegroups.com</post>
            <archive>https://groups.google.com/forum/#!forum/betfair-cougar</archive>
        </mailingList>
        <mailingList>
            <name>Cougar developer notification list</name>
            <post>betfair-cougar-dev@googlegroups.com</post>
            <archive>https://groups.google.com/forum/#!forum/betfair-cougar-dev</archive>
        </mailingList>
    </mailingLists>

    <scm>
        <connection>scm:git:git@github.com:betfair/cougar.git</connection>
        <url>https://github.com/betfair/cougar.git</url>
        <developerConnection>scm:git:git@github.com:betfair/cougar</developerConnection>
      <tag>3.2.1</tag>
  </scm>

    <ciManagement>
        <system>Travis CI</system>
        <url>https://travis-ci.org/betfair/cougar</url>
    </ciManagement>

    <properties>
        <commons.lang.version>2.6</commons.lang.version>
        <!-- Note: 1.2.12 and higher cause issues in SoapTransportCommandProcessorTest that I don't understand -->
        <axiom.version>1.2.11</axiom.version>
        <aspectjweaver.version>1.7.3</aspectjweaver.version>
        <bcel.version>5.2</bcel.version>
        <apache.httpclient.version>4.3</apache.httpclient.version>
        <testng.version>6.8.5</testng.version>
        <apache.httpcore.version>4.3</apache.httpcore.version>
        <json.version>20090211</json.version>
        <commons.exec.version>1.1</commons.exec.version>
        <commons.io.version>2.4</commons.io.version>
        <guava.version>18.0</guava.version>
        <jackson.databind.version>2.3.2</jackson.databind.version>
        <jackson.afterburner.version>2.4.0</jackson.afterburner.version>
        <jasypt.version>1.9.1</jasypt.version>
        <jetty.version>9.1.5.v20140505</jetty.version>
        <opendmk.version>1.0-b02</opendmk.version>
        <joda.time.version>2.3</joda.time.version>
        <jsr311.version>1.1.1</jsr311.version>
        <junit.dependency.version>4.11</junit.dependency.version>
        <log4j.version>1.2.17</log4j.version>
        <mockito-core.version>1.9.5</mockito-core.version>
        <tornjak.version>3.0.0.rc1</tornjak.version>
        <slf4j.version>1.7.5</slf4j.version>
        <spring.dependency.version>3.2.4.RELEASE</spring.dependency.version>
        <woodstox.version>4.2.0</woodstox.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <sonar.skippedModules>
            example,baseline,baseline-client,cougar-client-code-tests,cougar-component-code-tests,cougar-component-tests,cougar-normal-code-tests,baseline-versionidd-tests,cougar-ci-process-launcher,cougar-jett-ci-launcher,cougar-test-utils,cougar-binaryprotocol-tests,cougar-iddversion-tests
        </sonar.skippedModules>
        <hessian.version>4.0.33</hessian.version>
        <virtualheap.version>1.3.0</virtualheap.version>
    </properties>

    <modules>
        <module>cougar-codegen-plugin</module>
        <module>cougar-framework</module>
    </modules>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>cougar-health-service</module>
                <module>cougar-testing-service</module>
                <module>baseline</module>
                <module>baseline-client</module>
                <module>cougar-test</module>
            </modules>
        </profile>
        <!-- Construct an aggregated javadoc JAR which will be installed in the repo. -->
        <profile>
            <id>with-aggregated-javadoc</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.7</version>
                        <inherited>false</inherited>
                        <configuration>
                            <doctitle>Cougar ${project.version} API</doctitle>
                        </configuration>
                        <executions>
                            <execution>
                                <id>aggregate</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>aggregate-jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>ibiblio-mule-dependencies</id>
            <url>http://mirrors.ibiblio.org/maven/mule/dependencies</url>
            <releases>
                <updatePolicy>never</updatePolicy>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.bcel</groupId>
                <artifactId>bcel</artifactId>
                <version>${bcel.version}</version>
            </dependency>
            <dependency>
                <groupId>org.aspectj</groupId>
                <artifactId>aspectjweaver</artifactId>
                <version>${aspectjweaver.version}</version>
            </dependency>
            <dependency>
                <groupId>org.aspectj</groupId>
                <artifactId>aspectjrt</artifactId>
                <version>${aspectjweaver.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.ws.commons.axiom</groupId>
                <artifactId>axiom-api</artifactId>
                <version>${axiom.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.ws.commons.axiom</groupId>
                <artifactId>axiom-impl</artifactId>
                <version>${axiom.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${apache.httpclient.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-exec</artifactId>
                <version>${commons.exec.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-lang</groupId>
                <artifactId>commons-lang</artifactId>
                <version>${commons.lang.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons.io.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.databind.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.module</groupId>
                <artifactId>jackson-module-afterburner</artifactId>
                <version>${jackson.afterburner.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-server</artifactId>
                <version>${jetty.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.servlet</groupId>
                        <artifactId>javax.servlet-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-util</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-jmx</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-servlets</artifactId>
                <version>${jetty.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.servlet</groupId>
                        <artifactId>javax.servlet-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-continuation</artifactId>
                <version>${jetty.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.servlet</groupId>
                        <artifactId>javax.servlet-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-http</artifactId>
                <version>${jetty.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.servlet</groupId>
                        <artifactId>javax.servlet-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-client</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jasypt</groupId>
                <artifactId>jasypt</artifactId>
                <version>${jasypt.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jasypt</groupId>
                <artifactId>jasypt-spring2</artifactId>
                <version>${jasypt.version}</version>
            </dependency>
            <dependency>
                <groupId>com.betfair.net.java.opendmk</groupId>
                <artifactId>core</artifactId>
                <version>${opendmk.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.ws.rs</groupId>
                <artifactId>jsr311-api</artifactId>
                <version>${jsr311.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.dependency.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito-core.version}</version>
            </dependency>
            <dependency>
                <groupId>com.betfair.tornjak</groupId>
                <artifactId>monitor</artifactId>
                <version>${tornjak.version}</version>
            </dependency>
            <dependency>
                <groupId>com.betfair.tornjak</groupId>
                <artifactId>kpi</artifactId>
                <version>${tornjak.version}</version>
            </dependency>
            <dependency>
                <groupId>xerces</groupId>
                <artifactId>xercesImpl</artifactId>
                <version>2.9.1</version>
            </dependency>
            <dependency>
                <groupId>xalan</groupId>
                <artifactId>xalan</artifactId>
                <version>2.7.1</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>3.1.0</version>
            </dependency>
            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>${joda.time.version}</version>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>${log4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <!-- LOG4j binding -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${spring.dependency.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aop</artifactId>
                <version>${spring.dependency.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aspects</artifactId>
                <version>${spring.dependency.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${spring.dependency.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context-support</artifactId>
                <version>${spring.dependency.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>${spring.dependency.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${spring.dependency.version}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.woodstox</groupId>
                <artifactId>woodstox-core-asl</artifactId>
                <version>${woodstox.version}</version>
                <scope>runtime</scope>
                <exclusions>
                    <exclusion>
                        <groupId>stax</groupId>
                        <artifactId>stax-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.caucho</groupId>
                <artifactId>hessian</artifactId>
                <version>${hessian.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!--  The default build settings -->
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <resources>
            <!-- standard Maven folder -->
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>target/generated-sources/java</directory>
                <includes>
                    <include>**/jaxb.index</include>
                </includes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>utf-8</encoding>
                </configuration>
            </plugin>


            <!-- Generate source jars for all projects during the package phase of the build -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Download source jars when mvn eclipse plugin is used and fix the version of the plugin -->
            <plugin>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <downloadSources>true</downloadSources>
                </configuration>
            </plugin>

            <!-- Disable the default test execution and replace it with unit test and integration test executions
                        bound to the test and integration-test phases of the build, respectively.
                    By default compile all the tests and run them i.e. ${skipTests} is set to false in this pom.
                    This additional property is a workaround for http://jira.codehaus.org/browse/SUREFIRE-319
                    Some projects override the skipTests property and set it to true to skip (compile but not run)
                    their tests by default. This is because their tests compile but do not pass yet.
                    Set -DskipTests=false at the command line to run all tests. Set -DskipTests to skip all tests.
                    Similarly set testFailureIgnore with a property or at the command line (-DtestFailureIgnore=false) to override. -->
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.14.1</version>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
                <executions>
                    <execution>
                        <id>unit-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <phase>test</phase>
                        <configuration>
                            <testSourceDirectory>src/test</testSourceDirectory>
                            <includes>
                                <include>**/*Test.java</include>
                            </includes>
                            <excludes>
                                <exclude>**/*$*</exclude>
                                <exclude>**/integrationtest/**/*.java</exclude>
                                <exclude>**/performancetest/**/*.java</exclude>
                                <exclude>**/functionaltest/**/*.java</exclude>
                            </excludes>
                            <skipTests>${skipTests}</skipTests>
                            <testFailureIgnore>false</testFailureIgnore>
                            <!--<debugForkedProcess>true</debugForkedProcess>-->
                        </configuration>
                    </execution>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <phase>integration-test</phase>
                        <configuration>
                            <testSourceDirectory>src/test</testSourceDirectory>
                            <includes>
                                <include>**/integrationtest/**/*Test.java</include>
                                <include>**/integrationtest/**/*TestCase.java</include>
                                <include>**/integrationtest/**/Test*.java</include>
                            </includes>
                            <skipTests>${skipTests}</skipTests>
                            <testFailureIgnore>false</testFailureIgnore>
                            <!--<debugForkedProcess>true</debugForkedProcess>-->
                            <argLine>-Xms256m -Xmx768m</argLine>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.3.1</version>
                <!--<executions>-->
                    <!--<execution>-->
                        <!--<id>enforce-banned-dependencies</id>-->
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>commons-logging</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    <!--</execution>-->
                <!--</executions>-->
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>

        </plugins>
    </build>
</project>
