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

     Copyright 2005-2015 Red Hat, Inc.

     Red Hat 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.

--><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.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>9</version>
  </parent>

  <groupId>io.fabric8.quickstarts</groupId>
  <artifactId>ipaas-quickstarts</artifactId>
  <version>2.2.101</version>
  <packaging>pom</packaging>

  <name>Fabric8 Quickstarts</name>
  <description>Quickstart applications for working with Fabric8</description>

  <url>http://fabric8.io/v2/quickstarts.html</url>
  <inceptionYear>2014</inceptionYear>

  <organization>
    <name>Red Hat</name>
    <url>http://redhat.com</url>
  </organization>

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

  <!-- including A developer as it's required by the maven poms going into central -->
  <developers>
    <developer>
      <id>geeks</id>
      <name>Fabric8 Development Team</name>
      <organization>fabric8</organization>
      <organizationUrl>http://fabric8.io/</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:fabric8io/quickstarts.git</connection>
    <developerConnection>scm:git:git@github.com:fabric8io/quickstarts.git</developerConnection>
    <url>http://github.com/fabric8io/quickstarts</url>
    <tag>quickstarts-2.0.1</tag>
  </scm>

  <properties>
    <skipTests>false</skipTests>
    <skipItests>true</skipItests>
    <integrationTestPattern>**/*KT*.java</integrationTestPattern>

    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.javadoc.plugin.version>2.10.3</maven.javadoc.plugin.version>

    <docker.source.dir>${basedir}/src/main/docker</docker.source.dir>

    <arquillian.version>1.1.11.Final</arquillian.version>
    <docker.maven.plugin.version>0.14.2</docker.maven.plugin.version>
    <fabric8.dockerUser>fabric8/</fabric8.dockerUser>
    <!--
            <docker.registry>registry.hub.docker.com</docker.registry>
    -->
    <exec-maven-plugin.version>1.4.0</exec-maven-plugin.version>
    <maven.surefire.plugin.version>2.19.1</maven.surefire.plugin.version>
    <maven-resources-plugin.version>2.6</maven-resources-plugin.version>
    <junit.version>4.12</junit.version>
    <fabric8.version>2.2.97</fabric8.version>
    <fabric8.release.version>${fabric8.version}</fabric8.release.version>
    <maven.enforcer.plugin.version>1.4.1</maven.enforcer.plugin.version>
  </properties>

  <modules>
    <module>archetype-builder</module>
    <module>archetypes-catalog</module>
    <module>archetypes</module>
    <module>archetype-itests</module>
    <module>quickstart</module>
  </modules>

  <distributionManagement>
    <repository>
      <id>oss-sonatype-staging</id>
      <name>Sonatype Staging Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>oss-sonatype-snapshots</id>
      <name>OSS Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <repositories>
    <repository>
      <id>oss-sonatype-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
      <name>OSS Sonatype Nexus Snapshots</name>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>oss-sonatype-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
      <name>OSS Sonatype Nexus Snapshots</name>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven.javadoc.plugin.version}</version>
          <configuration>
              <additionalparam>${javadoc.opts}</additionalparam>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>${maven-resources-plugin.version}</version>
        <configuration>
          <nonFilteredFileExtensions>
            <nonFilteredFileExtension>zip</nonFilteredFileExtension>
            <nonFilteredFileExtension>gz</nonFilteredFileExtension>
            <nonFilteredFileExtension>jar</nonFilteredFileExtension>
          </nonFilteredFileExtensions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <releaseProfiles>docker-push,docker-public</releaseProfiles>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.19.1</version>
        <inherited>true</inherited>
        <configuration>
          <skipTests>${skipTests}</skipTests>
          <excludes>
            <exclude>${integrationTestPattern}</exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <id>int-test</id>
            <goals>
              <goal>test</goal>
            </goals>
            <phase>integration-test</phase>
            <configuration>
              <skipTests>${skipItests}</skipTests>
              <excludes>
                <exclude>none</exclude>
              </excludes>
              <includes>
                <include>${integrationTestPattern}</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencyManagement>
    <dependencies>

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-cdi</artifactId>
        <version>${fabric8.version}</version>
      </dependency>

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-cdi</artifactId>
        <version>${fabric8.version}</version>
        <type>test-jar</type>
      </dependency>

      <dependency>
        <groupId>org.jboss.arquillian.junit</groupId>
        <artifactId>arquillian-junit-container</artifactId>
        <version>${arquillian.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-arquillian</artifactId>
        <version>${fabric8.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>kubernetes-assertions</artifactId>
        <version>${fabric8.version}</version>
        <scope>test</scope>
      </dependency>

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

  <profiles>
    <profile>
      <id>fabric8-snapshot</id>
      <properties>
        <fabric8.version>2.2.98-SNAPSHOT</fabric8.version>
      </properties>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>${maven.enforcer.plugin.version}</version>
            <executions>
              <execution>
                <id>enforce-no-snapshots</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireReleaseDeps>
                      <message>No Snapshots Allowed!</message>
                    </requireReleaseDeps>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <additionalparam>${javadoc.opts}</additionalparam>
                </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</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>license</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>2.6</version>
            <configuration>
              <includes>
                <include>src/main/java/**</include>
                <include>src/test/java/**</include>
                <include>pom.xml</include>
                <include>**/*.xml</include>
                <include>**/*.zip</include>
                <include>**/*.tar.gz</include>
                <include>**/*.cfg</include>
                <include>**/*.properties</include>
              </includes>
              <excludes>
                <!-- exclude sampel data -->
                <exclude>**/src/data/**</exclude>
                <exclude>**/resources/data/**</exclude>
                <!-- exclude hidden dir -->
                <exclude>**/.*/**</exclude>
              </excludes>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>ts.kube</id>
      <properties>
        <skipItests>false</skipItests>
      </properties>
    </profile>

    <profile>
      <id>doclint-java8-disable</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <properties>
          <javadoc.opts>-Xdoclint:none</javadoc.opts>
      </properties>
    </profile>
  </profiles>

</project>
