<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>
  <groupId>org.iata.ndc</groupId>
  <artifactId>ndc-parent-pom</artifactId>
  <version>0.1.3</version>
  <packaging>pom</packaging>
  <name>NDC Client parent POM</name>
  <description>Parent pom for ndc-java-sdk</description>
  <url>https://github.com/iata-ndc/ndc-java-sdk</url>

  <licenses>
    <license>
      <name>Modified MIT</name>
      <url>https://github.com/iata-ndc/ndc-java-sdk/blob/master/LICENSE.md</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:iata-ndc/ndc-java-sdk.git</connection>
    <developerConnection>scm:git:git@github.com:iata-ndc/ndc-java-sdk.git</developerConnection>
    <url>git@github.com:iata-ndc/ndc-java-sdk.git</url>
  </scm>

  <developers>
    <developer>
      <name>Juozas Rimsa</name>
      <organizationUrl>https://github.com/iata-ndc</organizationUrl>
    </developer>
  </developers>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <!--<api.key>insert your api key here or specify system property when running integration tests</api.key>-->
    <test.server.url>http://iata.api.mashery.com/kronos/api</test.server.url>
  </properties>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <property>
          <name>performRelease</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
        <groupId>external.atlassian.jgitflow</groupId>
        <artifactId>jgitflow-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.3</version>
          <configuration>
            <source>1.6</source>
            <target>1.6</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jvnet.jaxb2.maven2</groupId>
          <artifactId>maven-jaxb2-plugin</artifactId>
          <version>0.12.3</version>
          <executions>
            <execution>
              <goals>
                <goal>generate</goal>
              </goals>
              <configuration>
                <specVersion>2.1</specVersion>
                <episode>false</episode>
                <extension>true</extension>
                <args>
                  <arg>-no-header</arg>
                  <arg>-Xxew</arg>
                  <arg>-Xxew:instantiate lazy</arg>
                  <arg>-Xxew:control ${basedir}/src/main/resources/xev_control</arg>
                </args>
                <plugins>
                  <plugin>
                    <groupId>com.github.jaxb-xew-plugin</groupId>
                    <artifactId>jaxb-xew-plugin</artifactId>
                    <version>1.5</version>
                  </plugin>
                </plugins>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.4</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.3</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>2.18.1</version>
          <configuration>
            <systemPropertyVariables>
              <server.url>${test.server.url}</server.url>
              <api.key>${api.key}</api.key>
            </systemPropertyVariables>
          </configuration>
          <executions>
            <execution>
              <id>integration-test</id>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <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>
        <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>true</autoReleaseAfterClose>
          </configuration>
        </plugin>
        <plugin>
          <groupId>external.atlassian.jgitflow</groupId>
          <artifactId>jgitflow-maven-plugin</artifactId>
          <version>1.0-m5.1</version>
          <configuration>
            <flowInitContext>
              <developBranchName>development</developBranchName>
            </flowInitContext>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <alwaysUpdateOrigin>false</alwaysUpdateOrigin>
            <localOnly>true</localOnly>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <modules>
    <module>ndc-jaxb</module>
    <module>ndc-client</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>fluent-hc</artifactId>
        <version>4.5.1</version>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.12</version>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.7.12</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
</project>
