<?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>eu.europa.ec.joinup.sat</groupId>
        <artifactId>demetra-parent</artifactId>
        <version>2.2.4-RC1</version>
    </parent>
  
    <artifactId>demetra-tstoolkit</artifactId>
    <packaging>jar</packaging>

    <name>jtstoolkit</name>
    <description>Seasonal Adjustment Toolkit - jtstoolkit</description>
    <url>https://github.com/jdemetra/jdemetra-core</url>

    <properties>
        <project.x.binaries>${project.basedir}/../binaries</project.x.binaries>
    </properties>

    <dependencies>
        <!-- test only -->
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Copies files to binaries -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <phase>install</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.x.binaries}</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${project.build.directory}</directory>
                                    <includes>
                                        <include>${project.build.finalName}.jar</include>
                                        <include>${project.build.finalName}.jar.asc</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Generates SHA256 on binaries -->
            <plugin>
                <groupId>net.nicoulaj.maven.plugins</groupId>
                <artifactId>checksum-maven-plugin</artifactId>
                <version>1.11</version>
                <executions>
                    <execution>
                        <phase>install</phase>
                        <goals>
                            <goal>files</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <algorithms>
                        <algorithm>SHA-256</algorithm>
                    </algorithms>
                    <fileSets>
                        <fileSet>
                            <directory>${project.x.binaries}</directory>
                            <excludes>
                                <exclude>*.sha256</exclude>
                                <exclude>*.asc</exclude>
                            </excludes>
                        </fileSet>
                    </fileSets>
                    <csvSummary>false</csvSummary>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>