<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2018 The original authors.

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">
  <parent>
    <artifactId>annotations</artifactId>
    <groupId>io.dekorate</groupId>
    <version>3.2.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <groupId>io.dekorate</groupId>
  <artifactId>openshift-annotations</artifactId>
  <name>Dekorate :: Annotations :: Openshift</name>

  <dependencies>
    <dependency>
      <groupId>io.dekorate</groupId>
      <artifactId>dekorate-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.dekorate</groupId>
      <artifactId>option-annotations</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.dekorate</groupId>
      <artifactId>s2i-annotations</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.sundr</groupId>
      <artifactId>builder-annotations</artifactId>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.dekorate</groupId>
      <artifactId>dekorate-templates</artifactId>
      <version>${project.version}</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>io.sundr</groupId>
      <artifactId>transform-annotations</artifactId>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.sundr</groupId>
      <artifactId>sundr-codegen-velocity</artifactId>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
 
    <!-- Testing -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${version.junit-jupiter}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${version.junit-jupiter}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-launcher</artifactId>
      <version>${version.junit-platform}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-runner</artifactId>
      <version>${version.junit-platform}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${version.assertj}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${version.maven-compiler-plugin}</version>
        <configuration>
          <source>${java.source}</source>
          <target>${java.target}</target>
          <annotationProcessors>
            <processor>io.sundr.builder.internal.processor.BuildableProcessor</processor>
            <processor>io.sundr.transform.internal.TemplateTransformationProcessor</processor>
          </annotationProcessors>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>${version.maven-shade-plugin}</version>
        <executions>
          <execution>
            <id>annotation</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>annotations</shadedClassifierName>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <includes>
                    <include>io/dekorate/openshift/annotation/**</include>
                    <include>META-INF/MANIFEST.MF</include>
                  </includes>
                </filter>
              </filters>
            </configuration>
          </execution>
          <execution>
            <id>processor</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>processors</shadedClassifierName>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <includes>
                    <include>io/dekorate/openshift/adapter/**</include>
                    <include>io/dekorate/openshift/apt/**</include>
                    <include>io/dekorate/openshift/config/**</include>
                    <include>io/dekorate/openshift/configurator/**</include>
                    <include>io/dekorate/openshift/decorator/**</include>
                    <include>io/dekorate/openshift/generator/**</include>
                    <include>io/dekorate/openshift/manifest/**</include>
                    <include>io/dekorate/openshift/listener/**</include>
                    <include>io/dekorate/openshift/util/**</include>
                    <include>io/dekorate/openshift/*</include>
                    <include>META-INF/services/*</include>
                    <include>META-INF/MANIFEST.MF</include>
                  </includes>
                </filter>
              </filters>
            </configuration>
          </execution>
          <execution>
            <id>noapt</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>noapt</shadedClassifierName>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <includes>
                    <include>io/dekorate/openshift/adapter/**</include>
                    <include>io/dekorate/openshift/annotation/**</include>
                    <include>io/dekorate/openshift/config/**</include>
                    <include>io/dekorate/openshift/configurator/**</include>
                    <include>io/dekorate/openshift/generator/**</include>
                    <include>io/dekorate/openshift/decorator/**</include>
                    <include>io/dekorate/openshift/manifest/**</include>
                    <include>io/dekorate/openshift/listener/**</include>
                    <include>io/dekorate/openshift/util/**</include>
                    <include>io/dekorate/openshift/*</include>
                    <include>META-INF/services/io.dekorate.*</include>
                    <include>META-INF/MANIFEST.MF</include>
                  </includes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
