<?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>graylog-shaded</artifactId>
    <groupId>org.graylog.shaded</groupId>
    <version>1.0.11</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>mongojack4</artifactId>
  <version>4.8.0-1</version>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createDependencyReducedPom>true</createDependencyReducedPom>
              <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
              <shadeSourcesContent>true</shadeSourcesContent>
              <createSourcesJar>true</createSourcesJar>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/maven/**</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.mongojack:mongojack</artifact>
                  <excludes>
                    <exclude>org/mongojack/internal/stream/JsonParserAdapter*.class</exclude>
                    <exclude>org/mongojack/Id.class</exclude>
                    <exclude>org/mongojack/ObjectId.class</exclude>
                  </excludes>
                </filter>
              </filters>
              <transformers>
                <transformer />
                <transformer>
                  <resource>META-INF/LICENSE</resource>
                </transformer>
                <transformer>
                  <resource>META-INF/LICENSE.txt</resource>
                </transformer>
                <transformer>
                  <resource>META-INF/NOTICE</resource>
                </transformer>
                <transformer>
                  <resource>META-INF/NOTICE.txt</resource>
                </transformer>
              </transformers>
              <relocations>
                <relocation>
                  <pattern>org.mongojack</pattern>
                  <shadedPattern>org.graylog.shaded.mongojack4.org.mongojack</shadedPattern>
                  <excludes>
                    <exclude>org.mongojack.Id</exclude>
                    <exclude>org.mongojack.ObjectId</exclude>
                  </excludes>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.15.2</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jsr310</artifactId>
        <version>2.15.2</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.mongodb</groupId>
        <artifactId>mongodb-driver-sync</artifactId>
        <scope>provided</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <properties>
    <maven.compiler.target>8</maven.compiler.target>
    <mongojack.version>4.8.0</mongojack.version>
    <maven.compiler.source>8</maven.compiler.source>
  </properties>
</project>
