<?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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>jagger-parent</artifactId>
    <groupId>org.tillerino.jagger</groupId>
    <version>0.7.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>jagger-processor</artifactId>
  <name>Jagger annotation processor</name>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <annotationProcessorPaths>
            <annotationProcessorPath>
              <groupId>com.google.auto.service</groupId>
              <artifactId>auto-service</artifactId>
            </annotationProcessorPath>
          </annotationProcessorPaths>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <minimizeJar>true</minimizeJar>
              <artifactSet>
                <includes>
                  <include>org.tillerino.jagger:*</include>
                  <include>org.apache.commons:*</include>
                  <include>com.squareup:javapoet</include>
                  <include>com.github.jsqlparser:jsqlparser</include>
                </includes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>org.apache</pattern>
                  <shadedPattern>org.tillerino.jagger.shaded.org.apache</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.squareup</pattern>
                  <shadedPattern>org.tillerino.jagger.shaded.com.squareup</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>net.sf.jsqlparser</pattern>
                  <shadedPattern>org.tillerino.jagger.shaded.net.sf.jsqlparser</shadedPattern>
                </relocation>
              </relocations>
              <filters>
                <filter>
                  <artifact>com.github.jsqlparser:jsqlparser</artifact>
                  <excludes>
                    <exclude>META-INF/**</exclude>
                    <exclude>THIRD-PARTY</exclude>
                    <exclude>LICENSE</exclude>
                    <exclude>rr/**</exclude>
                    <exclude>**/*.xml</exclude>
                    <exclude>jmh*</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>${maven-failsafe-plugin.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
            <configuration>
              <includes>
                <include>**/ShadedJarIT.java</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>com.google.auto.service</groupId>
      <artifactId>auto-service</artifactId>
      <version>1.1.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.annotation</groupId>
      <artifactId>jakarta.annotation-api</artifactId>
      <version>3.0.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>6.0.3</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>opentest4j</artifactId>
          <groupId>org.opentest4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-platform-commons</artifactId>
          <groupId>org.junit.platform</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apiguardian-api</artifactId>
          <groupId>org.apiguardian</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jspecify</artifactId>
          <groupId>org.jspecify</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>3.27.7</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>byte-buddy</artifactId>
          <groupId>net.bytebuddy</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <properties>
    <java.version>17</java.version>
  </properties>
</project>
