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

  <groupId>io.dekorate</groupId>
  <artifactId>prometheus-annotations</artifactId>

 <name>Dekorate :: Annotations :: Prometheus</name>

  <dependencies>
    <dependency>
      <groupId>io.dekorate</groupId>
      <artifactId>dekorate-core</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>io.sundr</groupId>
      <artifactId>builder-annotations</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>
  </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>
          </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/prometheus/annotation/**</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/prometheus/adapter/**</include>
                    <include>io/dekorate/prometheus/apt/**</include>
                    <include>io/dekorate/prometheus/config/**</include>
                    <include>io/dekorate/prometheus/generator/**</include>
                    <include>io/dekorate/prometheus/handler/**</include>
                    <include>io/dekorate/prometheus/model/**</include>
                    <include>META-INF/services/javax.annotation.processing.Processor</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/prometheus/adapter/**</include>
                    <include>io/dekorate/prometheus/annotation/**</include>
                    <include>io/dekorate/prometheus/config/**</include>
                    <include>io/dekorate/prometheus/generator/**</include>
                    <include>io/dekorate/prometheus/handler/**</include>
                    <include>io/dekorate/prometheus/model/**</include>
                    <include>META-INF/services/io.dekorate.Generator</include>
                  </includes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
