<?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>bundles</artifactId>
    <groupId>org.glassfish.metro</groupId>
    <version>2.3.1</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>webservices-api</artifactId>
  <name>Metro Web Services API non-OSGi Bundle</name>
  <description>This module contains the compilation of all public Metro APIs.</description>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-sources</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>javax.jws</groupId>
                  <artifactId>jsr181-api</artifactId>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${generated.sources.dir}</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>javax.xml.soap</groupId>
                  <artifactId>javax.xml.soap-api</artifactId>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${generated.sources.dir}</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>javax.xml.bind</groupId>
                  <artifactId>jaxb-api</artifactId>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${generated.sources.dir}</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>javax.xml.ws</groupId>
                  <artifactId>jaxws-api</artifactId>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${generated.sources.dir}</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>javax.transaction</groupId>
                  <artifactId>transaction-api</artifactId>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${generated.sources.dir}</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>prepare-package</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${generated.sources.dir}</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <includes>
                  <include>javax.xml.ws:jaxws-api</include>
                  <include>javax.xml.bind:jaxb-api</include>
                  <include>javax.xml.soap:javax.xml.soap-api</include>
                  <include>javax.jws:jsr181-api</include>
                  <include>javax.transaction:transaction-api</include>
                </includes>
              </artifactSet>
              <createSourcesJar>true</createSourcesJar>
              <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
              <transformers>
                <transformer />
              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <executions>
          <execution>
            <id>clean-unpacked-src-dir</id>
            <phase>install</phase>
            <goals>
              <goal>clean</goal>
            </goals>
            <configuration>
              <excludeDefaultDirectories>true</excludeDefaultDirectories>
              <filesets>
                <fileset>
                  <directory>${generated.sources.dir}</directory>
                </fileset>
              </filesets>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>javax.annotation</groupId>
      <artifactId>javax.annotation-api</artifactId>
      <version>1.2</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
  <properties>
    <generated.sources.dir>${project.build.directory}/generated-sources</generated.sources.dir>
  </properties>
</project>

