<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://maven.apache.org/POM/4.0.0"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <artifactId>schafkopf-backend-java</artifactId>
  <packaging>pom</packaging>
  <modules>
    <module>schafkopf-client</module>
    <module>schafkopf-server</module>
    <module>schafkopf-shared</module>
  </modules>
  <groupId>org.schafkopf</groupId>
  <modelVersion>4.0.0</modelVersion>
  <version>1.0-SNAPSHOT</version>

  <properties>
    <maven-compiler.version>3.5.1</maven-compiler.version>
    <maven.compiler.source>21</maven.compiler.source>
    <maven.compiler.target>21</maven.compiler.target>
    <pi4j.version>2.4.0</pi4j.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <slf4j.version>1.7.32</slf4j.version>
  </properties>


  <build>
    <finalName>schafkopf-backend-build</finalName>
    <plugins>
      <!-- Maven Clean Plugin -->
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <id>clean-initial</id>
            <phase>pre-clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <executions>
          <execution>
            <configuration>
              <configLocation>google_checks.xml</configLocation>
              <consoleOutput>true</consoleOutput>
              <failOnViolation>true</failOnViolation>
              <violationSeverity>warning</violationSeverity>
            </configuration>
            <goals>
              <goal>check</goal>
            </goals>
            <id>validate</id>
            <phase>validate</phase>
          </execution>
        </executions>
        <groupId>org.apache.maven.plugins</groupId>
        <version>3.3.1</version>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.schafkopf.DedicatedServer</mainClass>
            </manifest>
          </archive>
        </configuration>
        <version>3.3.0</version>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
          <verbose>false</verbose>
        </configuration>
        <version>3.11.0</version>
      </plugin>

      <!-- Maven Assembly Plugin -->
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>com.fazecast</groupId>
      <artifactId>jSerialComm</artifactId>
      <version>2.6.0</version> <!-- Check for the latest version on the official repository -->
    </dependency>

    <dependency>
      <artifactId>slf4j-api</artifactId>
      <groupId>org.slf4j</groupId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <artifactId>slf4j-simple</artifactId>
      <groupId>org.slf4j</groupId>
      <version>${slf4j.version}</version>
    </dependency>
    <!-- To write basic websockets against -->
    <dependency>
      <artifactId>websocket-jetty-api</artifactId>
      <groupId>org.eclipse.jetty.websocket</groupId>
      <version>11.0.15</version>
    </dependency>
    <!-- To run websockets in embedded server -->
    <dependency>
      <artifactId>websocket-jetty-server</artifactId>
      <groupId>org.eclipse.jetty.websocket</groupId>
      <version>11.0.20</version>
    </dependency>
    <dependency>
      <artifactId>jetty-servlets</artifactId>
      <groupId>org.eclipse.jetty</groupId>
      <version>11.0.19</version>
    </dependency>
    <!-- To run websockets client -->
    <dependency>
      <artifactId>websocket-jetty-client</artifactId>
      <groupId>org.eclipse.jetty.websocket</groupId>
      <version>11.0.15</version>
    </dependency>
    <dependency>
      <artifactId>gson</artifactId>
      <groupId>com.google.code.gson</groupId>
      <version>2.10.1</version>
    </dependency>
    <dependency>
      <artifactId>dotenv-java</artifactId>
      <groupId>io.github.cdimascio</groupId>
      <version>3.0.0</version>
    </dependency>
    <!-- Jackson for JSON serialization/deserialization -->
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>20240303</version>
    </dependency>
  </dependencies>
</project>