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

  <groupId>io.openshift</groupId>
  <artifactId>booster-parent</artifactId>
  <version>23</version>
  <packaging>pom</packaging>

  <name>OpenShift.io Boosters</name>
  <description>Strap in; we're going to production. Now.</description>
  <url>https://github.com/openshiftio</url>

  <developers>
    <developer>
      <id>cescoffier</id>
      <name>Clement Escoffier</name>
      <email>clement[AT]apache[DOT]org</email>
      <url>https://github.com/cescoffier</url>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
  </licenses>

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <maven.min.version>3.3.9</maven.min.version>
    <jdk.min.version>${maven.compiler.source}</jdk.min.version>

    <buildnumber-maven-plugin.version>1.4</buildnumber-maven-plugin.version>
    <fabric8-maven-plugin.version>3.5.40</fabric8-maven-plugin.version>
    <maven-clean-plugin.version>3.0.0</maven-clean-plugin.version>
    <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
    <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
    <maven-enforcer-plugin.version>3.0.0-M1</maven-enforcer-plugin.version>
    <maven-failsafe-plugin.version>2.20</maven-failsafe-plugin.version>
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
    <maven-install-plugin.version>2.5.2</maven-install-plugin.version>
    <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
    <maven-javadoc-plugin.version>3.0.0-M1</maven-javadoc-plugin.version>
    <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
    <maven-resources-plugin.version>3.0.2</maven-resources-plugin.version>
    <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
    <maven-surefire-plugin.version>2.20</maven-surefire-plugin.version>
    <maven-war-plugin.version>3.1.0</maven-war-plugin.version>

    <arquillian-cube.version>1.15.3</arquillian-cube.version>

    <fabric8.generator.from>registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift:1.2</fabric8.generator.from>

    <fabric8.openshift.trimImageInContainerSpec>true</fabric8.openshift.trimImageInContainerSpec>
    <fabric8.skip.build.pom>true</fabric8.skip.build.pom>
  </properties>

  <scm>
    <url>https://github.com/openshiftio</url>
    <connection>scm:git:https://github.com/openshiftio/booster-parent.git</connection>
    <developerConnection>scm:git:git:@github.com:openshiftio/booster-parent.git</developerConnection>
    <tag>booster-parent-23</tag>
  </scm>

  <build>
    <pluginManagement>
      <plugins>

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

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven-resources-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven-failsafe-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>${maven-install-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven-deploy-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${maven-clean-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>${maven-war-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${maven-enforcer-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>buildnumber-maven-plugin</artifactId>
          <version>${buildnumber-maven-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${maven-release-plugin.version}</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <useReleaseProfile>false</useReleaseProfile>
            <releaseProfiles>release</releaseProfiles>
            <goals>deploy</goals>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <versionRange>[1.4.1,)</versionRange>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <versionRange>[1.0.0,)</versionRange>
                    <goals>
                      <goal>create</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>io.fabric8</groupId>
                    <artifactId>vertx-maven-plugin</artifactId>
                    <versionRange>[1.0.4,)</versionRange>
                    <goals>
                      <goal>initialize</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-java-version</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <message>To build this project JDK ${jdk.min.version} (or greater) is required. Please install it.
                  </message>
                  <version>${jdk.min.version}</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
          <execution>
            <id>enforce-maven-version</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <message>To build this project Maven ${maven.min.version} (or greater) is required. Please install
                    it.
                  </message>
                  <version>${maven.min.version}</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>get-scm-revision</id>
            <phase>initialize</phase>
            <goals>
              <goal>create</goal>
            </goals>
            <configuration>
              <doCheck>false</doCheck>
              <doUpdate>false</doUpdate>
              <revisionOnScmFailure>UNKNOWN</revisionOnScmFailure>
              <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.arquillian.cube</groupId>
        <artifactId>arquillian-cube-bom</artifactId>
        <version>${arquillian-cube.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <repositories>
    <repository>
      <id>redhat-early-access</id>
      <name>Red Hat Early Access Repository</name>
      <url>https://maven.repository.redhat.com/earlyaccess/all/</url>
    </repository>
    <repository>
      <id>redhat-ga</id>
      <name>Red Hat GA Repository</name>
      <url>https://maven.repository.redhat.com/ga/</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>redhat-early-access</id>
      <name>Red Hat Early Access Repository</name>
      <url>https://maven.repository.redhat.com/earlyaccess/all/</url>
    </pluginRepository>
    <pluginRepository>
      <id>redhat-ga</id>
      <name>Red Hat GA Repository</name>
      <url>https://maven.repository.redhat.com/ga/</url>
    </pluginRepository>
  </pluginRepositories>

  <profiles>
    <profile>
      <id>openshiftio</id>
      <distributionManagement>
        <snapshotRepository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>

      <properties>
        <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
      </properties>

      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>${nexus-staging-maven-plugin.version}</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>

        </plugins>
      </build>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven-source-plugin.version}</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>${maven-javadoc-plugin.version}</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>licenses</id>
      <properties>
        <openshiftio.dir>${project.basedir}/.openshiftio</openshiftio.dir>
        <licenses.dir>${project.basedir}/src/licenses</licenses.dir>

        <license-maven-plugin.version>1.13</license-maven-plugin.version>
        <xml-maven-plugin.version>1.0.1</xml-maven-plugin.version>
      </properties>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-clean-plugin</artifactId>
            <configuration>
              <filesets>
                <fileset>
                  <directory>${licenses.dir}</directory>
                </fileset>
              </filesets>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>${license-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>generate-initial-licenses</id>
                <goals>
                  <goal>aggregate-download-licenses</goal>
                </goals>
                <phase>generate-resources</phase>
                <configuration>
                  <licensesOutputFile>${project.build.directory}/licenses.xml</licensesOutputFile>
                  <offline>true</offline>
                </configuration>
              </execution>
              <execution>
                <id>download-licenses</id>
                <goals>
                  <goal>aggregate-download-licenses</goal>
                </goals>
                <phase>process-resources</phase>
                <configuration>
                  <licensesConfigFile>${project.build.directory}/licenses.xml</licensesConfigFile>
                  <licensesOutputFile>${licenses.dir}/licenses.xml</licensesOutputFile>
                  <licensesOutputDirectory>${licenses.dir}/content</licensesOutputDirectory>
                  <sortByGroupIdAndArtifactId>true</sortByGroupIdAndArtifactId>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>xml-maven-plugin</artifactId>
            <version>${xml-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>fix-licenses</id>
                <goals>
                  <goal>transform</goal>
                </goals>
                <phase>generate-resources</phase>
                <configuration>
                  <transformationSets>
                    <transformationSet>
                      <dir>${project.build.directory}</dir>
                      <includes>
                        <include>licenses.xml</include>
                      </includes>
                      <stylesheet>${openshiftio.dir}/licenses-fix.xsl</stylesheet>
                      <outputDir>${project.build.directory}</outputDir>
                      <fileMappers>
                        <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
                          <targetExtension>.xml</targetExtension>
                        </fileMapper>
                      </fileMappers>
                    </transformationSet>
                  </transformationSets>
                </configuration>
              </execution>
              <execution>
                <id>generate-licenses-html</id>
                <goals>
                  <goal>transform</goal>
                </goals>
                <phase>process-resources</phase>
                <configuration>
                  <transformationSets>
                    <transformationSet>
                      <dir>${project.build.directory}</dir>
                      <includes>
                        <include>licenses.xml</include>
                      </includes>
                      <stylesheet>${openshiftio.dir}/licenses.xsl</stylesheet>
                      <outputDir>${licenses.dir}</outputDir>
                      <fileMappers>
                        <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
                          <targetExtension>.html</targetExtension>
                        </fileMapper>
                      </fileMappers>
                      <parameters>
                        <parameter>
                          <name>product</name>
                          <value>${project.name}</value>
                        </parameter>
                      </parameters>
                    </transformationSet>
                  </transformationSets>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>extra-maven-repository</id>
      <activation>
        <property>
          <name>extra.maven.repo</name>
        </property>
      </activation>
      <repositories>
        <repository>
          <id>extra-repo</id>
          <name>Extra maven repository</name>
          <url>${extra.maven.repo}</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>extra-repo</id>
          <name>Extra maven repository</name>
          <url>${extra.maven.repo}</url>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>

</project>
