<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2016 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>

  <groupId>io.fabric8</groupId>
  <artifactId>fabric8-maven-parent</artifactId>
  <version>3.1.57</version>
  <packaging>pom</packaging>

  <prerequisites>
    <maven>3.0.3</maven>
  </prerequisites>

  <name>Fabric8 Maven :: Parent</name>
  <description>${project.name}</description>

  <url>http://github.com/fabric8io/fabric8-maven-plugin</url>

  <licenses>
    <license>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <comments>A business-friendly OSS license</comments>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>geeks</id>
      <name>Fabric8 Development Team</name>
      <email>fabric8@googlegroups.com</email>
      <organization>fabric8</organization>
      <organizationUrl>http://fabric8.io/</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/fabric8io/fabric8-maven-plugin.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/fabric8io/fabric8-maven-plugin.git</developerConnection>
    <tag>HEAD</tag>
    <url>git://github.com/fabric8io/fabric8-maven-plugin.git</url>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <assertj.core.version>2.4.1</assertj.core.version>
    <fabric8.maven.plugin.version>3.1.55</fabric8.maven.plugin.version>
    <version.maven>3.3.1</version.maven>
    <version.fabric8>2.2.165</version.fabric8>
    <version.docker-maven-plugin>0.16.5</version.docker-maven-plugin>
  </properties>

  <repositories>
    <repository>
      <id>maven-central-plugin-snapshots</id>
      <name>Maven Central Plugin Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

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

  <dependencyManagement>
    <dependencies>

      <!-- == docker-maven-plugin ===================================== -->

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>docker-maven-plugin</artifactId>
        <version>${version.docker-maven-plugin}</version>
      </dependency>

      <!-- == fabric8-maven-plugin ==================================== -->

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

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-maven-enricher-api</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-maven-enricher-standard</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-maven-enricher-debug</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-maven-enricher-expose</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-maven-enricher-fabric8</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-maven-generator-api</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-maven-generator-java-exec</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-maven-generator-spring-boot</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-maven-generator-karaf</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-maven-generator-wildfly-swarm</artifactId>
        <version>${project.version}</version>
      </dependency>

      <!-- == external deps =============================== -->

      <dependency>
        <groupId>org.eclipse.jgit</groupId>
        <artifactId>org.eclipse.jgit</artifactId>
        <version>4.4.1.201607150455-r</version>
      </dependency>

      <!-- == fabric8 ===================================== -->

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>kubernetes-api</artifactId>
        <version>${version.fabric8}</version>
      </dependency>
      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-project-utils</artifactId>
        <version>${version.fabric8}</version>
      </dependency>

      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>ianaservicehelper</artifactId>
        <version>0.0.1</version>
      </dependency>

      <!-- == maven ===================================== -->

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${version.maven}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>${version.maven}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-model</artifactId>
        <version>${version.maven}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-artifact</artifactId>
        <version>${version.maven}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-compat</artifactId>
        <version>${version.maven}</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>3.0.22</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-annotations</artifactId>
        <version>1.5.5</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>3.4</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-interactivity-api</artifactId>
        <version>1.0-alpha-6</version>
      </dependency>


      <!-- == test ====================================== -->

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <scope>test</scope>
      </dependency>


      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <scope>test</scope>
        <version>${assertj.core.version}</version>
      </dependency>

      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-all</artifactId>
        <version>1.3</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.jmockit</groupId>
        <artifactId>jmockit</artifactId>
        <version>1.24</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>com.jayway.jsonpath</groupId>
        <artifactId>json-path-assert</artifactId>
        <version>2.2.0</version>
        <scope>test</scope>
      </dependency>

      <!-- == doc ====================================== -->

      <dependency>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctorj</artifactId>
        <version>1.5.4</version>
      </dependency>

      <!-- == util ====================================== -->

      <dependency>
        <groupId>org.javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.20.0-GA</version>
      </dependency>
    </dependencies>

  </dependencyManagement>

  <build>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>io.fabric8</groupId>
          <artifactId>fabric8-maven-plugin</artifactId>
          <version>${project.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>3.4</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.6</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.4.1</version>
        </plugin>

         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-javadoc-plugin</artifactId>
           <version>2.10.3</version>
         </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.4</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-metadata</artifactId>
          <version>1.6</version>
        </plugin>

        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>

        <plugin>
          <groupId>org.asciidoctor</groupId>
          <artifactId>asciidoctor-maven-plugin</artifactId>
          <version>1.5.3</version>
          <dependencies>
            <dependency>
              <groupId>org.asciidoctor</groupId>
              <artifactId>asciidoctorj</artifactId>
              <version>1.5.4</version>
            </dependency>
          </dependencies>
        </plugin>

      </plugins>
    </pluginManagement>

    <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>
          <compilerArgument>-Xlint:deprecation</compilerArgument>
        </configuration>
      </plugin>
    </plugins>

    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh-external</artifactId>
        <version>2.3</version>
      </extension>
    </extensions>
  </build>

  <profiles>
     <!-- "release" profiles used for deploying with fabric8 -->
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <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>
                  <!-- take that ... -->
                  <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- "milestone" profiles used for deploying manually -->
    <profile>
      <id>milestone</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <useAgent>true</useAgent>
              <keyname>rhuss@redhat.com</keyname>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- "doc-html" for creating the asciidocs -->
     <profile>
      <id>doc-html</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <configuration>
              <backend>html</backend>
              <sourceHighlighter>coderay</sourceHighlighter>
              <attributes>
                <toc>left</toc>
              </attributes>
            </configuration>
          </plugin>
        </plugins>
        <defaultGoal>generate-resources asciidoctor:process-asciidoc</defaultGoal>
      </build>
    </profile>

  </profiles>

</project>
