<?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>xbean</artifactId>
    <groupId>org.apache.xbean</groupId>
    <version>4.14</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>xbean-finder-shaded</artifactId>
  <name>Apache XBean :: Finder shaded (repackaged)</name>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createSourcesJar>true</createSourcesJar>
              <relocations>
                <relocation>
                  <pattern>org.apache.xbean.asm7.original.commons.EmptyVisitor</pattern>
                  <shadedPattern>org.apache.xbean.asm7.shade.commons.EmptyVisitor</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.objectweb.asm</pattern>
                  <shadedPattern>org.apache.xbean.asm7</shadedPattern>
                </relocation>
              </relocations>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                    <exclude>META-INF/versions/**</exclude>
                    <exclude>**/module-info.class</exclude>
                  </excludes>
                </filter>
              </filters>
              <artifactSet>
                <includes>
                  <include>org.apache.xbean:xbean-finder</include>
                </includes>
                <excludes>
                  <exclude>*:*:sources</exclude>
                  <exclude>org.apache.xbean:xbean-asm7-shaded</exclude>
                  <exclude>org.apache.xbean:xbean-asm-util</exclude>
                  <exclude>junit:junit</exclude>
                </excludes>
              </artifactSet>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <delete />
                <unzip />
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>package</phase>
            <goals>
              <goal>bundle</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <instructions>
            <Export-Package>org.apache.xbean.finder.*;version=${project.version};-noimport:=true</Export-Package>
            <Import-Package>org.apache.xbean.asm7.*;version="[7.0,8.0)",
                            *</Import-Package>
            <Private-Package />
            <_removeheaders>Ignore-Package,Private-Package,Include-Resource,Embed-Dependency</_removeheaders>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.apache.xbean</groupId>
      <artifactId>xbean-asm7-shaded</artifactId>
      <version>4.14</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <version>4.3.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <properties>
    <xbean.osgi.import>org.apache.xbean.finder;version=${project.version},org.apache.xbean.asm7;version=7,org.apache.xbean.asm7.shade.commons;version=7</xbean.osgi.import>
    <xbean.osgi.export>org.apache.xbean.finder;version=${project.version}</xbean.osgi.export>
    <xbean.automatic.module.name>${project.groupId}.finder.shaded</xbean.automatic.module.name>
  </properties>
</project>

