<?xml version="1.0" encoding="UTF-8"?>
<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.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <name>Helios Parent</name>
  <description>A docker container orchestration system and deployment platform</description>
  <url>https://github.com/molindo/helios</url>
  <groupId>at.molindo</groupId>
  <artifactId>helios-parent</artifactId>
  <version>0.9.12</version>
  <packaging>pom</packaging>

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

  <scm>
    <connection>scm:git:https://github.com/molindo/helios.git</connection>
    <developerConnection>scm:git:git@github.com:molindo/helios.git</developerConnection>
    <url>https://github.com/molindo/helios</url>
    <tag>0.9.12</tag>
  </scm>
  <ciManagement>
    <system>TeamCity</system>
    <url>https://oss.molindo.at/</url>
  </ciManagement>
  <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Release Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>
  </distributionManagement>
  <developers>
    <developer>
      <id>dano</id>
      <name>Daniel Norberg</name>
      <email>dano@spotify.com</email>
    </developer>
    <developer>
      <id>drewc</id>
      <name>Drew Csillag</name>
      <email>drewc@spotify.com</email>
    </developer>
    <developer>
      <id>matslina</id>
      <name>Mats Linander</name>
      <email>matslina@spotify.com</email>
    </developer>
    <developer>
      <id>philipcristiano</id>
      <name>Philip Cristiano</name>
      <email>philipcristiano@spotify.com</email>
    </developer>
    <developer>
      <id>rohan</id>
      <name>Rohan Singh</name>
      <email>rohan@spotify.com</email>
    </developer>
    <developer>
      <id>ryan</id>
      <name>Ryan Culbertson</name>
      <email>ryan@spotify.com</email>
    </developer>
    <developer>
      <id>snc</id>
      <name>Simon Cohen</name>
      <email>snc@spotify.com</email>
    </developer>
    <developer>
      <id>davidxia</id>
      <name>David Xia</name>
      <email>dxia@spotify.com</email>
    </developer>
    <developer>
      <id>kobolog</id>
      <name>Andrey Sibiryov</name>
      <email>kobolog@spotify.com</email>
    </developer>
  </developers>

  <repositories>
    <repository>
      <id>clojars.org</id>
      <url>http://clojars.org/repo</url>
    </repository>
    <repository>
      <id>bintray-readytalk</id>
      <url>http://jcenter.bintray.com/</url>
    </repository>
        <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Central Repository</name>
      <url>http://repo.maven.apache.org/maven2</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>com.intellij</groupId>
      <artifactId>annotations</artifactId>
      <version>12.0</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <autoReleaseAfterClose>true</autoReleaseAfterClose>
    <jacoco.version>0.7.1.201405082137</jacoco.version>
    <surefireArgLine>-Xmx128m -XX:+TieredCompilation -XX:TieredStopAtLevel=1</surefireArgLine>
  </properties>

  <modules>
    <module>helios-client</module>
    <module>helios-service-registration</module>
    <module>helios-tools</module>
    <module>helios-testing</module>
    <module>helios-testing-common</module>
    <module>helios-services</module>
    <module>helios-system-tests</module>
    <module>helios-integration-tests</module>
    <module>helios-api-documentation</module>
  </modules>

  <profiles>
    <profile>
      <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.16</version>
            <configuration>
              <enableAssertions>false</enableAssertions>
              <forkCount>1C</forkCount>
              <reuseForks>false</reuseForks>
              <argLine>${surefireArgLine}</argLine>
              <systemPropertyVariables>
                <curator-default-session-timeout>500</curator-default-session-timeout>
                <curator-default-connection-timeout>500</curator-default-connection-timeout>
                <logToFile>true</logToFile>
                <heliosLoggingLevel>OFF</heliosLoggingLevel>
                <externalLoggingLevel>OFF</externalLoggingLevel>
                <rootLoggingLevel>OFF</rootLoggingLevel>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>circleci</id>
      <activation>
        <property>
          <name>env.CIRCLECI</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.16</version>
            <configuration>
              <enableAssertions>false</enableAssertions>
              <forkCount>4</forkCount>
              <reuseForks>false</reuseForks>
              <argLine>${surefireArgLine}</argLine>
              <rerunFailingTestsCount>2</rerunFailingTestsCount>
              <environmentVariables>
                <HELIOS_CLUSTER_DEPLOYMENT_TEST_HOSTS>2</HELIOS_CLUSTER_DEPLOYMENT_TEST_HOSTS>
              </environmentVariables>
              <systemPropertyVariables>
                <logToFile>false</logToFile>
                <heliosLoggingLevel>INFO</heliosLoggingLevel>
                <externalLoggingLevel>OFF</externalLoggingLevel>
                <rootLoggingLevel>ERROR</rootLoggingLevel>
              </systemPropertyVariables>
              <excludesFile>../.test-excludes</excludesFile>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>jenkins</id>
      <activation>
        <property>
          <name>env.JENKINS</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.16</version>
            <configuration>
              <enableAssertions>false</enableAssertions>
              <forkCount>1C</forkCount>
              <reuseForks>false</reuseForks>
              <argLine>${surefireArgLine}</argLine>
              <systemPropertyVariables>
                <junit.parallel.threads>1</junit.parallel.threads>
                <logToFile>false</logToFile>
                <heliosLoggingLevel>WARN</heliosLoggingLevel>
                <externalLoggingLevel>OFF</externalLoggingLevel>
                <rootLoggingLevel>WARN</rootLoggingLevel>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>debug</id>
      <activation>
        <property>
          <name>debug</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.16</version>
            <configuration>
              <enableAssertions>false</enableAssertions>
              <systemPropertyVariables>
                <logToFile>false</logToFile>
                <heliosLoggingLevel>DEBUG</heliosLoggingLevel>
                <externalLoggingLevel>ERROR</externalLoggingLevel>
                <rootLoggingLevel>ERROR</rootLoggingLevel>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>integration-only</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>release-unsafe-fast</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.5</version>
            <configuration>
              <arguments>-DskipITs -Dgpg.skip=true -DskipTests -Prelease-unsafe-fast</arguments>
              <pushChanges>false</pushChanges>
              <tagNameFormat>@{project.version}</tagNameFormat>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-provider-gitexe</artifactId>
                <version>1.9</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>
    
    <profile>
      <id>release-sonatype-molindo</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.5</version>
            <configuration>
              <arguments>-DskipITs -DskipTests -Dgpg.skip=false -Prelease-sonatype-molindo</arguments>
              <pushChanges>true</pushChanges>
              <tagNameFormat>@{project.version}</tagNameFormat>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-provider-gitexe</artifactId>
                <version>1.9</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>
    
    <profile>
      <id>release-no-sign</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.5</version>
            <configuration>
              <arguments>-DskipITs -Dgpg.skip=true -Prelease-no-sign</arguments>
              <pushChanges>false</pushChanges>
              <tagNameFormat>@{project.version}</tagNameFormat>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-provider-gitexe</artifactId>
                <version>1.9</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>sign-artifacts</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.5</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>jacoco</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco.version}</version>
            <executions>
              <execution>
                <id>pre-unit-test</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
                <configuration>
                  <destFile>${project.build.directory}/jacoco/jacoco.exec</destFile>
                  <propertyName>jacocoArgLine</propertyName>
                </configuration>
              </execution>
              <execution>
                <id>post-unit-test</id>
                <phase>test</phase>
                <goals>
                  <goal>report</goal>
                </goals>
                <configuration>
                  <dataFile>${project.build.directory}/jacoco/jacoco.exec</dataFile>
                  <outputDirectory>${project.build.directory}/jacoco</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <argLine>${jacocoArgLine} ${surefireArgLine}</argLine>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <arguments>-DskipITs -Dgpg.skip=true</arguments>
          <pushChanges>false</pushChanges>
          <tagNameFormat>@{project.version}</tagNameFormat>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>1.9</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
      <!-- 
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.5</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>${autoReleaseAfterClose}</autoReleaseAfterClose>
          <skipRemoteStaging>true</skipRemoteStaging>
          <stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
        </configuration>
      </plugin>-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.2</version>
        <executions>
          <execution>
            <id>enforce</id>
            <configuration>
              <rules>
                <requireUpperBoundDeps />
              </rules>
            </configuration>
            <goals>
              <goal>enforce</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.13</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <configuration>
              <configLocation>checkstyle.xml</configLocation>
              <encoding>UTF-8</encoding>
              <consoleOutput>true</consoleOutput>
              <failsOnError>true</failsOnError>
              <linkXRef>false</linkXRef>
            </configuration>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>6.1.1</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.4</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-file</artifactId>
            <version>2.4</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.0</version>
        <configuration>
          <effort>Max</effort>
          <failOnError>false</failOnError>
          <threshold>Low</threshold>
          <xmlOutput>true</xmlOutput>
          <findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory>
          <excludeFilterFile>${project.parent.basedir}/findbugs-exclude.xml</excludeFilterFile>
        </configuration>
      </plugin>
    </plugins>
  </reporting>
</project>
