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

    Copyright (C) 2015 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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>io.fabric8</groupId>
    <artifactId>kubernetes-client-project</artifactId>
    <version>6.13.5</version>
  </parent>

  <artifactId>kubernetes-examples</artifactId>
  <packaging>jar</packaging>
  <name>Fabric8 :: Kubernetes :: Client Examples</name>

  <properties>
    <podName>mypod</podName>
    <masterUrl>https://localhost:8443/</masterUrl>
    <namespace>default</namespace>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.fabric8</groupId>
      <artifactId>openshift-client-api</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.fabric8</groupId>
      <artifactId>openshift-client</artifactId>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>okhttp</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>${slf4j.version}</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <version>${commons-compress.version}</version>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <scope>compile</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>java</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <!-- lets make it easy to run the example programs via a mvn profile -->
    <profile>
      <id>list-crd</id>
      <build>
        <defaultGoal>test-compile exec:java</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
              <mainClass>io.fabric8.kubernetes.examples.ListCustomResourceDefinitions</mainClass>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>list-bc</id>
      <build>
        <defaultGoal>test-compile exec:java</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
              <mainClass>io.fabric8.openshift.examples.ListBuildConfigs</mainClass>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>watch-bc</id>
      <build>
        <defaultGoal>test-compile exec:java</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
              <mainClass>io.fabric8.openshift.examples.WatchBuildConfigs</mainClass>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>leader-election</id>
      <build>
        <defaultGoal>test-compile exec:java</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
              <mainClass>io.fabric8.kubernetes.examples.LeaderElectionExamples$ConcurrentExample</mainClass>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>list-dc</id>
      <build>
        <defaultGoal>test-compile exec:java</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
              <mainClass>io.fabric8.openshift.examples.ListDeploymentConfigs</mainClass>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>list-image</id>
      <build>
        <defaultGoal>test-compile exec:java</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
              <mainClass>io.fabric8.openshift.examples.ListImageStreams</mainClass>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>pod-log</id>
      <build>
        <defaultGoal>test-compile exec:java</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
              <mainClass>io.fabric8.kubernetes.examples.PodLogExample</mainClass>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>exec-example</id>
      <build>
        <defaultGoal>test-compile exec:java</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
              <mainClass>io.fabric8.kubernetes.examples.ExecExample</mainClass>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>wait-until-ready</id>
      <build>
        <defaultGoal>test-compile exec:java</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
              <mainClass>io.fabric8.kubernetes.examples.WaitUntilReadyExample</mainClass>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>java9-plus</id>
      <activation>
        <jdk>[9,)</jdk>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.jboss.spec.javax.rmi</groupId>
          <artifactId>jboss-rmi-api_1.0_spec</artifactId>
          <version>1.0.6.Final</version>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

</project>
