<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>textgame</groupId>
    <artifactId>textgame-parent</artifactId>
    <version>0.1.0</version>
  </parent>
  <artifactId>textgame-client</artifactId>
  <dependencies><dependency><groupId>textgame</groupId><artifactId>textgame-protocol</artifactId></dependency><dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId></dependency></dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.4.2</version>
        <configuration>
          <archive>
            <manifest>
              <mainClass>textgame.player.PlayerClient</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.6.0</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals><goal>shade</goal></goals>
            <configuration>
              <!-- One jar the teacher can double-click, with the protocol classes inside. -->
              <finalName>textgame-client</finalName>
              <shadedArtifactAttached>false</shadedArtifactAttached>
              <createDependencyReducedPom>false</createDependencyReducedPom>
              <artifactSet>
                <includes><include>textgame:textgame-protocol</include></includes>
              </artifactSet>
              <filters>
                <filter>
                  <!-- The uber jar keeps its own manifest, with the Main-Class in it. -->
                  <artifact>textgame:textgame-protocol</artifact>
                  <excludes><exclude>META-INF/**</exclude></excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
