<?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-b411</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>webservices-tools</artifactId>
  <name>Metro Web Services Tools non-OSGi Bundle</name>
  <description>This module contains the Metro tooling code.</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>com.sun.xml.bind</groupId>
                  <artifactId>jaxb-xjc</artifactId>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${generated.sources.dir}</outputDirectory>
                  <excludes>com\/sun\/org\/**</excludes>
                </artifactItem>
                <artifactItem>
                  <groupId>com.sun.xml.bind</groupId>
                  <artifactId>jaxb-jxc</artifactId>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${generated.sources.dir}</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>com.sun.xml.ws</groupId>
                  <artifactId>jaxws-tools</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>
            <id>create-shaded-jar</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <includes>
                  <include>com.sun.xml.ws:jaxws-tools</include>
                  <include>com.sun.xml.bind:jaxb-xjc</include>
                  <include>com.sun.xml.bind:jaxb-jxc</include>
                </includes>
              </artifactSet>
              <filters>
                <filter>
                  <artifact>com.sun.xml.bind:jaxb-xjc</artifact>
                  <excludes>
                    <exclude>META-INF/LICENSE.txt</exclude>
                    <exclude>META-INF/jing-copying.html</exclude>
                  </excludes>
                </filter>
              </filters>
              <transformers>
                <transformer />
                <transformer>
                  <manifestEntries>
                    <Main-Class>com.sun.tools.ws.WsImport</Main-Class>
                    <Class-Path>webservices-rt.jar</Class-Path>
                  </manifestEntries>
                </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>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-javadoc-plugin</artifactId>
              <version>2.9</version>
              <executions>
                <execution>
                  <id>attach-javadocs</id>
                  <phase>install</phase>
                  <goals>
                    <goal>jar</goal>
                  </goals>
                  <configuration>
                    <minmemory>128m</minmemory>
                    <maxmemory>512m</maxmemory>
                    <sourcepath>/export/home/mghudson/hudson-files/workspace/metro-2.3.1x-promotion/wsit/bundles/webservices-tools/src/main/java:target/generated-sources/rsrc-gen</sourcepath>
                  </configuration>
                </execution>
              </executions>
              <configuration>
                <minmemory>128m</minmemory>
                <maxmemory>512m</maxmemory>
                <sourcepath>/export/home/mghudson/hudson-files/workspace/metro-2.3.1x-promotion/wsit/bundles/webservices-tools/src/main/java:target/generated-sources/rsrc-gen</sourcepath>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.glassfish.metro</groupId>
      <artifactId>webservices-api</artifactId>
      <version>2.3.1-b411</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish.metro</groupId>
      <artifactId>webservices-rt</artifactId>
      <version>2.3.1-b411</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
  <properties>
    <generated.sources.dir>${project.build.directory}/generated-sources</generated.sources.dir>
  </properties>
</project>

