<?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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.tentackle</groupId>
    <artifactId>tentackle-parent</artifactId>
    <version>21.16.2.0</version>
  </parent>

  <artifactId>tentackle-fx-rdc</artifactId>
  <packaging>jar</packaging>
  <name>Tentackle FX Rich Desktop Client</name>
  <description>Rich Desktop Client based on FX</description>
  <url>https://tentackle.org</url>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>tentackle-fx</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>tentackle-pdo</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <properties>
    <rootBasedir>${project.parent.basedir}</rootBasedir>
  </properties>

  <build>
    <resources>
      <!-- workaround:
        SceneBuilder cannot locate the controller if the fxml file is not in the same
        directory as the java file. Hence, we change the convention
        as follows:
        1. each controller and its related fxml, resource-properties and css files go into the same physical folder.
        2. there is only one such folder/package per controller
      -->
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <directory>target/generated-resources</directory>
      </resource>
      <resource>
        <directory>src/main/java</directory>
        <includes>
          <include>**/*.fxml</include>
          <include>**/*.css</include>
          <include>**/*.properties</include>
        </includes>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>${project.groupId}</groupId>
        <artifactId>tentackle-maven-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
          <execution>
            <id>analyze</id>
            <goals>
              <goal>analyze</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <verbosity>info</verbosity>
          <showCompileOutput>true</showCompileOutput>
          <index>META-INF/RESOURCE-INDEX.LIST</index>
        </configuration>
      </plugin>

      <plugin>
        <groupId>${project.groupId}</groupId>
        <artifactId>tentackle-check-maven-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
          <execution>
            <id>bundles</id>
            <goals>
              <goal>bundles</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <verbosity>info</verbosity>
          <locales>en_US, de_DE</locales>
          <showCompileOutput>true</showCompileOutput>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <compilerArgs>
            <arg>-Xlint:${javac.lint}</arg>
            <!-- proc:none because of chicken-egg problem with annotation processors in same module -->
            <arg>-proc:none</arg>
          </compilerArgs>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
