<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>
    <groupId>be.ugent.idlab.knows</groupId>
    <artifactId>dataio</artifactId>
    <version>1.2.0</version>
    <name>dataio</name>
    <packaging>jar</packaging>
    <url>https://github.com/RMLio/dataio</url>
    <description>
        DataIO allows iterating over different kinds of data sources.
    </description>
    <licenses>
        <license>
            <name>The MIT License</name>
            <url>https://raw.githubusercontent.com/RMLio/dataio/main/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:ssh://git@github.com:RMLio/dataio.git</connection>
        <url>https://github.com/RMLio/dataio</url>
    </scm>
    <developers>
        <developer>
            <id>ghsnd</id>
            <name>Gerald Haesendonck</name>
            <email>gerald.haesendonck@ugent.be</email>
        </developer>
        <developer>
            <id>jjankaj</id>
            <name>Jozef Jankaj</name>
            <email>jozef.jankaj@ugent.be</email>
        </developer>
        <developer>
            <id>rvrijsse</id>
            <name>Robbe Van Rijsselberghe</name>
        </developer>
        <developer>
            <id>thabils</id>
            <name>Tibe Habils</name>
            <email>tibe.habils@ugent.be</email>
        </developer>
        <developer>
            <id>anemchyn</id>
            <name>Aliaksandra Nemchynava</name>
            <email>aliaksandra.nemchynava@ugent.be</email>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>17</java.version>
        <junit.version>5.10.0</junit.version>
        <testcontainers.version>1.18.3</testcontainers.version>
        <slf4j.version>2.0.7</slf4j.version>
        <poi.version>5.2.3</poi.version>
        <fuseki.version>4.9.0</fuseki.version>
    </properties>

    <repositories>
        <repository>
            <id>repo.maven.apache.org</id>
            <url>https://repo.maven.apache.org/maven2/</url>
        </repository>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>


    <dependencies>

        <!--======================-->
        <!-- Logging dependencies -->
        <!--======================-->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-to-slf4j</artifactId>
            <version>2.20.0</version>
        </dependency>
        <!-- provide a simple logging implementation for testing -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>

        <!--=============================-->
        <!-- CSV processing dependencies -->
        <!--=============================-->
        <dependency>
            <groupId>com.opencsv</groupId>
            <artifactId>opencsv</artifactId>
            <version>5.8</version>
        </dependency>
        <dependency>
            <groupId>org.simpleflatmapper</groupId>
            <artifactId>sfm-csv</artifactId>
            <version>8.2.3</version>
        </dependency>

        <!--======================================-->
        <!-- Microsoft document format processing -->
        <!--======================================-->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>${poi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>${poi.version}</version>
        </dependency>
        <!-- Excel processing dependencies -->
        <dependency>
            <groupId>com.github.pjfanning</groupId>
            <artifactId>excel-streaming-reader</artifactId>
            <version>4.0.5</version>
        </dependency>
        <dependency>
            <groupId>com.monitorjbl</groupId>
            <artifactId>xlsx-streamer</artifactId>
            <version>2.2.0</version>
        </dependency>

        <!--==============================================-->
        <!-- Open document format processing dependencies -->
        <!--==============================================-->
        <dependency>
            <groupId>org.odftoolkit</groupId>
            <artifactId>simple-odf</artifactId>
            <version>0.9.0</version>
            <exclusions>
                <exclusion>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!--==============================-->
        <!-- HTML processing dependencies -->
        <!--==============================-->
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>1.16.1</version>
        </dependency>

        <!--=============================-->
        <!-- XML processing dependencies -->
        <!--=============================-->
        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>Saxon-HE</artifactId>
            <version>12.3</version>
        </dependency>

        <!--==============================-->
        <!-- JSON processing dependencies -->
        <!--==============================-->
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>2.8.0</version>
        </dependency>
        <dependency>
            <groupId>com.github.jsurfer</groupId>
            <artifactId>jsurfer-jackson</artifactId>
            <version>1.6.4</version>
        </dependency>

        <!--=============================-->
        <!-- SQL processing dependencies -->
        <!--=============================-->
        <!-- Easy parsing and execution of SQL files -->
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>3.5.13</version>
        </dependency>

        <!--==================-->
        <!-- Database drivers -->
        <!--==================-->
        <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.6.0</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.mysql/mysql-connector-j -->
        <dependency>
            <groupId>com.mysql</groupId>
            <artifactId>mysql-connector-j</artifactId>
            <version>8.2.0</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>11.2.1.jre11</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc11 -->
        <dependency>
            <groupId>com.oracle.database.jdbc</groupId>
            <artifactId>ojdbc11</artifactId>
            <version>23.3.0.23.09</version>
        </dependency>

        <!--=======================-->
        <!-- Reactive dependencies -->
        <!--=======================-->
        <!-- RXJava for Flow implementation -->
        <dependency>
            <groupId>io.reactivex.rxjava3</groupId>
            <artifactId>rxjava</artifactId>
            <version>3.1.6</version>
        </dependency>

        <!--========================-->
        <!-- Test-only dependencies -->
        <!--========================-->

        <!-- testcontainer dependencies  -->
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>postgresql</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>mysql</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>mssqlserver</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>oracle-xe</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- JUnit dependendies -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jopendocument</groupId>
            <artifactId>jOpenDocument</artifactId>
            <version>1.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.any23</groupId>
            <artifactId>apache-any23-encoding</artifactId>
            <version>2.7</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.junit.vintage/junit-vintage-engine -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <!--======================================-->
        <!-- SPARQL - RDF processing dependencies -->
        <!--======================================-->
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-arq</artifactId>
            <version>${fuseki.version}</version>
        </dependency>

        <!-- Fuseki, providing a SPARQL endpoint, is only needed during tests. -->
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-fuseki-core</artifactId>
            <version>${fuseki.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-fuseki-main</artifactId>
            <version>${fuseki.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <testSourceDirectory>src/test/java</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.1.2</version>
                <dependencies>
                    <dependency>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter-engine</artifactId>
                        <version>${junit.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <!--
                    Replacing the default excludes allows us to structure tests into nested classes
                    and make use of JUnit 5's Nested annotation
                    -->
                    <excludes>
                        <exclude/>
                    </excludes>
                </configuration>
            </plugin>


        </plugins>
    </build>

    <profiles>

        <!-- Profile used to release to Maven central repo -->
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- Publish on Maven central repository -->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.13</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>

                    <!-- Generate Source jar -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.0</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Generate Javadoc jar -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.5.0</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Sign components with GPG -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>6861488FA42A028D5378AF8833C4D74DDB5F1B28</keyname>
                                    <passphraseServerId>6861488FA42A028D5378AF8833C4D74DDB5F1B28</passphraseServerId>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
