<?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>oak-parent</artifactId>
    <groupId>org.apache.jackrabbit</groupId>
    <version>1.76.0</version>
    <relativePath>../oak-parent/pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>oak-shaded-guava</artifactId>
  <packaging>bundle</packaging>
  <name>Jackrabbit Guava Wrapper</name>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <includes>
                  <include>com.google.guava:guava</include>
                  <include>com.google.guava:failureaccess</include>
                </includes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>com.google</pattern>
                  <shadedPattern>${pref}</shadedPattern>
                </relocation>
              </relocations>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>com/google/common/annotations/**</exclude>
                    <exclude>com/google/common/eventbus/**</exclude>
                    <exclude>com/google/common/html/**</exclude>
                    <exclude>com/google/common/net/**</exclude>
                    <exclude>com/google/common/reflect/**</exclude>
                    <exclude>com/google/common/xml/**</exclude>
                  </excludes>
                </filter>
              </filters>
              <createDependencyReducedPom>true</createDependencyReducedPom>
              <createSourcesJar>true</createSourcesJar>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>dependency-reduced-pom.xml</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>org.apache.jackrabbit.guava</Bundle-SymbolicName>
            <Export-Package>${pref}.common.base;version="${exported.guava.version}",
              ${pref}.common.cache;version="${exported.guava.version}";uses:="${pref}.common.base,${pref}.common.collect,${pref}.common.util.concurrent",
              ${pref}.common.collect;version="${exported.guava.version}";uses:="${pref}.common.base",
              ${pref}.common.escape;version="${exported.guava.version}";uses:="${pref}.common.base",
              ${pref}.common.graph;version="${exported.guava.version}";uses:="${pref}.common.collect",
              ${pref}.common.hash;version="${exported.guava.version}";uses:="${pref}.common.base",
              ${pref}.common.io;version="${exported.guava.version}";uses:="${pref}.common.base,${pref}.common.collect,${pref}.common.graph,${pref}.common.hash",
              ${pref}.common.math;version="${exported.guava.version}",
              ${pref}.common.primitives;version="${exported.guava.version}";uses:="${pref}.common.base",
              ${pref}.common.util.concurrent;version="${exported.guava.version}";uses:="${pref}.common.base,${pref}.common.collect,${pref}.common.util.concurrent.internal",</Export-Package>
            <Import-Package>javax.annotation;resolution:=optional;version="[3.0,4)",
              javax.crypto;resolution:=optional,
              javax.crypto.spec;resolution:=optional,
              sun.misc;resolution:=optional</Import-Package>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.jetbrains</groupId>
      <artifactId>annotations</artifactId>
      <version>18.0.0</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <properties>
    <pref>org.apache.jackrabbit.guava</pref>
    <shaded.guava.version>33.4.0-jre</shaded.guava.version>
    <exported.guava.version>33.4.0</exported.guava.version>
  </properties>
</project>
