<?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>jersey-project</artifactId>
    <groupId>com.sun.jersey</groupId>
    <version>1.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>jersey-bundle</artifactId>
  <name>jersey-bundle</name>
  <version>1.0</version>
  <description>A bundle containing code of all jar-based modules that provide 
        JAX-RS and Jersey-related features. Such a bundle is *only intended* for
        developers that do not use Maven's dependency system.
        The bundle does not include code for contributes, tests and samples.
        For source and javadoc jar files please look at the bellow specified
        dependencies.</description>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <shadedGroupFilter>com.sun.jersey</shadedGroupFilter>
              <promoteTransitiveDependencies>false</promoteTransitiveDependencies>
              <createDependencyReducedPom>true</createDependencyReducedPom>
              <transformers>
                <transformer>
                  <resource>META-INF/services/com.sun.jersey.spi.container.ContainerProvider</resource>
                </transformer>
                <transformer>
                  <resource>META-INF/services/com.sun.jersey.spi.container.ContainerRequestFilter</resource>
                </transformer>
                <transformer>
                  <resource>META-INF/services/com.sun.jersey.impl.model.method.dispatch.ResourceMethodDispatchProvider</resource>
                </transformer>
                <transformer>
                  <resource>META-INF/services/com.sun.jersey.spi.container.WebApplicationProvider</resource>
                </transformer>
                <transformer>
                  <resource>META-INF/services/com.sun.jersey.spi.HeaderDelegateProvider</resource>
                </transformer>
                <transformer>
                  <resource>META-INF/services/javax.ws.rs.core.Response$ResponseBuilder</resource>
                </transformer>
                <transformer>
                  <resource>META-INF/services/javax.ws.rs.core.UriBuilder</resource>
                </transformer>
                <transformer>
                  <resource>META-INF/services/javax.ws.rs.core.Variant$VariantListBuilder</resource>
                </transformer>
                <transformer>
                  <resource>META-INF/services/javax.ws.rs.ext.MessageBodyReader</resource>
                </transformer>
                <transformer>
                  <resource>META-INF/services/javax.ws.rs.ext.MessageBodyWriter</resource>
                </transformer>
                <transformer>
                  <resource>META-INF/services/javax.ws.rs.ext.RuntimeDelegate</resource>
                </transformer>
              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>com.sun.jersey</groupId>
                  <artifactId>jersey-core</artifactId>
                  <version>${project.version}</version>
                  <type>jar</type>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${gen-src-dir}</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>com.sun.jersey</groupId>
                  <artifactId>jersey-server</artifactId>
                  <version>${project.version}</version>
                  <type>jar</type>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${gen-src-dir}</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>com.sun.jersey</groupId>
                  <artifactId>jersey-client</artifactId>
                  <version>${project.version}</version>
                  <type>jar</type>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${gen-src-dir}</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>com.sun.jersey</groupId>
                  <artifactId>jersey-atom</artifactId>
                  <version>${project.version}</version>
                  <type>jar</type>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${gen-src-dir}</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>com.sun.jersey</groupId>
                  <artifactId>jersey-json</artifactId>
                  <version>${project.version}</version>
                  <type>jar</type>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${gen-src-dir}</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>com.sun.jersey</groupId>
                  <artifactId>jersey-fastinfoset</artifactId>
                  <version>${project.version}</version>
                  <type>jar</type>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${gen-src-dir}</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <sourcepath>${gen-src-dir}</sourcepath>
          <excludePackageNames>com.sun.jersey.impl com.sun.research.ws.wadl</excludePackageNames>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <get />
                <java>
                  <arg />
                </java>
                <move />
                <delete />
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <properties>
    <gen-src-dir>${project.build.directory}/gen-src</gen-src-dir>
  </properties>
</project>

