<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2016 Red Hat, Inc. Licensed 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.jenkins-ci.plugins</groupId>
    <artifactId>plugin</artifactId>
    <version>4.16</version>
    <relativePath />
  </parent>
  <groupId>io.fabric8.jenkins.plugins</groupId>
  <artifactId>openshift-sync</artifactId>
  <version>1.0.51</version>
  <packaging>hpi</packaging>

  <properties>
    <spotbugs.failOnError>false</spotbugs.failOnError>
    <animal.sniffer.skip>true</animal.sniffer.skip>
    <enforcer.skip>true</enforcer.skip>
    <jenkins.version>2.303.3</jenkins.version>
    <java.level>8</java.level>
    <jenkins-test-harness.version>2.71</jenkins-test-harness.version>
    <openshift-client.version>5.10.1</openshift-client.version>
    <log.level>DEBUG</log.level>
    <findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version>
    <findbugs.failOnError>false</findbugs.failOnError>
    <slf4j.version>1.7.5</slf4j.version>
  </properties>

  <name>OpenShift Sync</name>
  <description>Syncs OpenShift BuildConfigs with Jenkins jobs</description>
  <url>https://wiki.jenkins-ci.org/display/JENKINS/OpenShift+Sync+Plugin</url>
  <inceptionYear>2016</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>

  <developers>
    <developer>
      <id>jimmi</id>
      <name>Jimmi Dyson</name>
      <organization>fabric8</organization>
      <organizationUrl>http://fabric8.io/</organizationUrl>
      <email>jimmidyson@gmail.com</email>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git</connection>
    <developerConnection>scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
    <url>http://github.com/jenkinsci/${project.artifactId}-plugin/</url>
    <tag>openshift-sync-1.0.51</tag>
  </scm>

  <repositories>
    <repository>
      <id>incremental-repo.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/incrementals/</url>
    </repository>
    <repository>
      <id>repo.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/public/</url>
    </repository>
    <repository>
      <id>nexus-oss-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>repo.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/public/</url>
    </pluginRepository>
  </pluginRepositories>

  <dependencies>
    <dependency>
      <groupId>io.fabric8</groupId>
      <artifactId>openshift-client</artifactId>
      <version>${openshift-client.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-cps</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.workflow</groupId>
      <artifactId>workflow-multibranch</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>cloudbees-folder</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>credentials</artifactId>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>git</artifactId>
    </dependency>

    <dependency>
      <groupId>io.jenkins.blueocean</groupId>
      <artifactId>blueocean-rest</artifactId>
      <version>1.4.0</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins.pipeline-stage-view</groupId>
      <artifactId>pipeline-rest-api</artifactId>
      <version>2.9</version>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.jenkins-ci.plugins.pipeline-stage-view</groupId>
      <artifactId>pipeline-stage-view</artifactId>
      <version>2.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.csanchez.jenkins.plugins</groupId>
      <artifactId>kubernetes</artifactId>
      <version>1.31.0</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>kubernetes-client-api</artifactId>
      <version>5.10.1-171.vaa0774fb8c20</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>jackson2-api</artifactId>
      <version>2.13.0-230.v59243c64b0a5</version>
    </dependency> 

    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-util</artifactId>
      <version>9.4.36.v20210114</version>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.jenkins.tools.bom</groupId>
        <artifactId>bom-2.303.x</artifactId>
        <version>1036.v9f5a1aba8fab</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.10.2</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.kohsuke</groupId>
          <artifactId>access-modifier-checker</artifactId>
          <version>1.16</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>${findbugs-maven-plugin.version}</version>
        <configuration>
          <xmlOutput>true</xmlOutput>
          <failOnError>${findbugs.failOnError}</failOnError>
        </configuration>
        <executions>
          <execution>
            <id>run-findbugs</id>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jenkins-ci.tools</groupId>
        <artifactId>maven-hpi-plugin</artifactId>
        <configuration>
          <pluginFirstClassLoader>true</pluginFirstClassLoader>
          <loggers>
            <io.fabric8>${log.level}</io.fabric8>
            <okhttp3>${log.level}</okhttp3>
          </loggers>
          <webApp>
            <contextPath>/</contextPath>
          </webApp>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jvnet.localizer</groupId>
        <artifactId>maven-localizer-plugin</artifactId>
        <version>1.12</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <fileMask>Messages.properties</fileMask>
              <outputDirectory>target/generated-sources/localizer</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>2.11</version>
        <configuration>
          <aggregate>true</aggregate>
          <header>header.txt</header>
          <properties>
            <owner>Red Hat, Inc.</owner>
          </properties>
          <excludes>
            <exclude>LICENSE</exclude>
            <exclude>work/**</exclude>
          </excludes>
          <headerDefinitions>
            <headerDefinition>license-headers-config.xml</headerDefinition>
          </headerDefinitions>
          <mapping>
            <jelly>XML_STYLE</jelly>
            <editorconfig>SEMICOLON_STYLE</editorconfig>
            <groovy>GROOVY_STYLE</groovy>
            <Jenkinsfile>GROOVY_STYLE</Jenkinsfile>
          </mapping>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>release</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>
          </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>
                  <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>doclint-java8-disable</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <properties>
        <javadoc.opts>-Xdoclint:none</javadoc.opts>
      </properties>
    </profile>
  </profiles>
</project>
