<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>ch.so.agi.gretl</groupId>
    <artifactId>gretl-runtime-parent</artifactId>
    <version>0.1.0-SNAPSHOT</version>
  </parent>
  <artifactId>gretl-io-tasks</artifactId>
  <packaging>jar</packaging>
  <name>GRETL IO Tasks</name>
  <description>HTTP, archives, XSLT, FTP and S3 task library.</description>

  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <version>${commons-compress.version}</version>
    </dependency>
    <dependency>
      <groupId>ch.so.agi.gretl</groupId>
      <artifactId>gretl-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>ch.so.agi.gretl</groupId>
      <artifactId>gretl-i18n</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>net.sf.saxon</groupId>
      <artifactId>Saxon-HE</artifactId>
      <version>${saxon.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xmlresolver</groupId>
      <artifactId>xmlresolver</artifactId>
      <version>${xmlresolver.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>commons-net</groupId>
      <artifactId>commons-net</artifactId>
      <version>${commons-net.version}</version>
    </dependency>
    <dependency>
      <groupId>software.amazon.awssdk</groupId>
      <artifactId>s3</artifactId>
      <version>${aws-sdk.version}</version>
      <exclusions>
        <exclusion>
          <groupId>software.amazon.awssdk</groupId>
          <artifactId>netty-nio-client</artifactId>
        </exclusion>
        <exclusion>
          <groupId>software.amazon.awssdk</groupId>
          <artifactId>apache-client</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>software.amazon.awssdk</groupId>
      <artifactId>url-connection-client</artifactId>
      <version>${aws-sdk.version}</version>
    </dependency>
    <dependency>
      <groupId>ch.so.agi.gretl</groupId>
      <artifactId>gretl-runner</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockftpserver</groupId>
      <artifactId>MockFtpServer</artifactId>
      <version>${mockftpserver.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>production-module-boundary</id>
            <phase>validate</phase><goals><goal>enforce</goal></goals>
            <configuration><rules><bannedDependencies>
              <searchTransitive>true</searchTransitive>
              <message>Production dependencies inside GRETL are limited to API and i18n; test dependencies remain separate.</message>
              <excludes><exclude>ch.so.agi.gretl:*:*:*:compile</exclude><exclude>ch.so.agi.gretl:*:*:*:runtime</exclude><exclude>ch.so.agi.gretl:*:*:*:provided</exclude></excludes>
              <includes><include>ch.so.agi.gretl:gretl-api</include><include>ch.so.agi.gretl:gretl-i18n</include></includes>
            </bannedDependencies></rules></configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Automatic-Module-Name>ch.so.agi.gretl.tasks.io</Automatic-Module-Name>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
