<?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>undertow-ee-parent</artifactId>
    <groupId>io.undertow.ee</groupId>
    <version>2.0.0.Final</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>undertow-ee-examples</artifactId>
  <name>Undertow Jakarta EE Examples</name>
  <build>
    <finalName>undertow-ee-examples</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <filters>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>META-INF/MANIFEST.MF</exclude>
                <exclude>module-info.class</exclude>
                <exclude>META-INF/LICENSE.md</exclude>
                <exclude>META-INF/LICENSE.txt</exclude>
                <exclude>META-INF/NOTICE.md</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>io.undertow:undertow-core</artifact>
              <excludes>
                <exclude>META-INF/services/io.undertow.attribute.ExchangeAttributeBuilder</exclude>
                <exclude>META-INF/services/io.undertow.predicate.PredicateBuilder</exclude>
                <exclude>META-INF/services/io.undertow.server.handlers.builder.HandlerBuilder</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>io.undertow:undertow-examples</artifact>
              <includes>
                <include>io/undertow/examples/Runner.class</include>
                <include>io/undertow/examples/UndertowExample.class</include>
              </includes>
            </filter>
          </filters>
          <transformers>
            <transformer>
              <manifestEntries>
                <Main-Class>io.undertow.examples.Runner</Main-Class>
                <Multi-Release>true</Multi-Release>
              </manifestEntries>
            </transformer>
          </transformers>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <configuration>
          <executable>java</executable>
          <arguments>
            <argument>-jar</argument>
            <argument>target/${project.build.finalName}.jar</argument>
          </arguments>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
