<?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>services-parent</artifactId>
    <groupId>com.guicedee.services</groupId>
    <version>1.0.20.2-jre15</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>jakarta.xml.bind-api</artifactId>
  <name>jaxb</name>
  <profiles>
    <profile>
      <id>jdk9</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.2.4</version>
            <executions>
              <execution>
                <id>shade</id>
                <phase>package</phase>
                <goals>
                  <goal>shade</goal>
                </goals>
                <configuration>
                  <artifactSet>
                    <includes>
                      <include>jakarta.xml.bind:jakarta.xml.bind-api:*</include>
                      <include>org.glassfish.jaxb:jaxb-runtime:*</include>
                      <include>org.glassfish.jaxb:txw2:*</include>
                      <include>com.sun.istack:istack-commons-runtime:*</include>
                      <include>com.sun.xml.fastinfoset:FastInfoset:*</include>
                      <include>com.sun.xml.bind:jaxb-impl:*</include>
                    </includes>
                  </artifactSet>
                  <filters>
                    <filter>
                      <artifact>*:*</artifact>
                      <excludes>
                        <exclude>META-INF/*.SF</exclude>
                        <exclude>META-INF/*.DSA</exclude>
                        <exclude>META-INF/*.RSA</exclude>
                        <exclude>META-INF/services/*</exclude>
                      </excludes>
                    </filter>
                  </filters>
                  <relocations>
                    <relocation>
                      <pattern>META-INF/versions/9/com</pattern>
                      <shadedPattern>com</shadedPattern>
                    </relocation>
                    <relocation>
                      <pattern>META-INF/versions/9/javax</pattern>
                      <shadedPattern>javax</shadedPattern>
                    </relocation>
                    <relocation>
                      <pattern>jakarta</pattern>
                      <shadedPattern>javax</shadedPattern>
                    </relocation>
                  </relocations>
                  <createDependencyReducedPom>true</createDependencyReducedPom>
                  <createSourcesJar>true</createSourcesJar>
                  <shadeSourcesContent>true</shadeSourcesContent>
                  <shadeTestJar>false</shadeTestJar>
                  <keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm</artifactId>
                <version>8.0.1</version>
                <scope>compile</scope>
              </dependency>
            </dependencies>
            <inherited>true</inherited>
            <configuration>
              <createDependencyReducedPom>true</createDependencyReducedPom>
              <createSourcesJar>true</createSourcesJar>
              <shadeSourcesContent>true</shadeSourcesContent>
              <shadeTestJar>false</shadeTestJar>
              <keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.moditect</groupId>
            <artifactId>moditect-maven-plugin</artifactId>
            <version>1.0.0.RC1</version>
            <executions>
              <execution>
                <id>add-module-infos</id>
                <phase>package</phase>
                <goals>
                  <goal>add-module-info</goal>
                </goals>
                <configuration>
                  <overwriteExistingFiles>true</overwriteExistingFiles>
                  <module>
                    <moduleInfoFile>src/moditect/module-info.java</moduleInfoFile>
                  </module>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>jdk8</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-shade-plugin</artifactId>
            <executions>
              <execution>
                <id>shade</id>
                <phase>package</phase>
                <goals>
                  <goal>shade</goal>
                </goals>
                <configuration>
                  <artifactSet>
                    <includes>
                      <include>jakarta.xml.bind:jakarta.xml.bind-api:*</include>
                      <include>org.glassfish.jaxb:jaxb-runtime:*</include>
                      <include>org.glassfish.jaxb:txw2:*</include>
                      <include>com.sun.istack:istack-commons-runtime:*</include>
                      <include>com.sun.xml.fastinfoset:FastInfoset:*</include>
                      <include>com.sun.xml.bind:jaxb-impl:*</include>
                    </includes>
                  </artifactSet>
                  <filters>
                    <filter>
                      <artifact>*:*</artifact>
                      <excludes>
                        <exclude>META-INF/*.SF</exclude>
                        <exclude>META-INF/*.DSA</exclude>
                        <exclude>META-INF/*.RSA</exclude>
                        <exclude>META-INF/services/*</exclude>
                      </excludes>
                    </filter>
                  </filters>
                  <relocations>
                    <relocation>
                      <pattern>META-INF/versions/9/com</pattern>
                      <shadedPattern>com</shadedPattern>
                    </relocation>
                    <relocation>
                      <pattern>META-INF/versions/9/javax</pattern>
                      <shadedPattern>javax</shadedPattern>
                    </relocation>
                    <relocation>
                      <pattern>META-INF/versions/9/jakarta</pattern>
                      <shadedPattern>javax</shadedPattern>
                    </relocation>
                    <relocation>
                      <pattern>jakarta</pattern>
                      <shadedPattern>javax</shadedPattern>
                    </relocation>
                  </relocations>
                </configuration>
              </execution>
            </executions>
            <inherited>true</inherited>
          </plugin>
          <plugin>
            <groupId>org.moditect</groupId>
            <artifactId>moditect-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>com.guicedee.services</groupId>
      <artifactId>jakarta.activation</artifactId>
      <version>1.0.20.2-jre15</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.guicedee.services</groupId>
      <artifactId>javax.activation</artifactId>
      <version>1.0.20.2-jre15</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.guicedee.services</groupId>
      <artifactId>jakarta.validation-api</artifactId>
      <version>1.0.20.2-jre15</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>stax2-api</artifactId>
      <version>4.2.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.jvnet.staxex</groupId>
      <artifactId>stax-ex</artifactId>
      <version>2.0.0</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
</project>
