<?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>tyrus-bundles</artifactId>
    <groupId>org.glassfish.tyrus.bundles</groupId>
    <version>2.2.2</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>tyrus-standalone-client-jdk</artifactId>
  <name>Tyrus Standalone Client - JDK</name>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <inherited>true</inherited>
        <configuration>
          <instructions>
            <Export-Package>org.glassfish.tyrus.client;version=${project.version},
                            jakarta.websocket;version=${apijar.bundle.version}</Export-Package>
          </instructions>
          <unpackBundle>true</unpackBundle>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
              <transformers>
                <transformer>
                  <resource>**/module-info.*</resource>
                  <resource>LICENSE</resource>
                </transformer>
                <transformer>
                  <resource>about.html</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>jakarta.websocket</groupId>
                  <artifactId>jakarta.websocket-client-api</artifactId>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${gen-src-dir}</outputDirectory>
                  <excludes>**/module-info.java</excludes>
                </artifactItem>
                <artifactItem>
                  <groupId>org.glassfish.tyrus</groupId>
                  <artifactId>tyrus-core</artifactId>
                  <version>${project.version}</version>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${gen-src-dir}</outputDirectory>
                  <excludes>**/module-info.java</excludes>
                </artifactItem>
                <artifactItem>
                  <groupId>org.glassfish.tyrus</groupId>
                  <artifactId>tyrus-client</artifactId>
                  <version>${project.version}</version>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${gen-src-dir}</outputDirectory>
                  <excludes>**/module-info.java</excludes>
                </artifactItem>
                <artifactItem>
                  <groupId>org.glassfish.tyrus</groupId>
                  <artifactId>tyrus-container-jdk-client</artifactId>
                  <version>${project.version}</version>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${gen-src-dir}</outputDirectory>
                  <excludes>**/module-info.java</excludes>
                </artifactItem>
                <artifactItem>
                  <groupId>org.glassfish.tyrus</groupId>
                  <artifactId>tyrus-spi</artifactId>
                  <version>${project.version}</version>
                  <classifier>sources</classifier>
                  <overWrite>false</overWrite>
                  <outputDirectory>${gen-src-dir}</outputDirectory>
                  <excludes>**/module-info.java</excludes>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${gen-src-dir}</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludePackageNames>*.tests.*,*.sample.*</excludePackageNames>
          <failOnError>false</failOnError>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <version>4.2.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.xml.bind</groupId>
      <artifactId>jakarta.xml.bind-api</artifactId>
      <version>4.0.2</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <properties>
    <gen-src-dir>${project.build.directory}/client-bundle-sources</gen-src-dir>
  </properties>
</project>
