<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>

    <groupId>io.github.kg-construct</groupId>
    <artifactId>burp</artifactId>
    <version>0.1.3-rc.5</version>

    <name>BURP</name>
    <!-- @formatter:off -->
    <description>A Basic and Unassuming RML Processor (BURP) with RML Execution Report (RER) error handling</description>
    <!-- @formatter:on -->
    <url>https://github.com/kg-construct/BURP/</url>
    <inceptionYear>2024</inceptionYear>

    <licenses>
        <license>
            <name>MIT</name>
            <url>https://opensource.org/license/mit/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Christophe Debruyne</name>
            <url>https://ChristopheDebruyne.be</url>
            <organization>University of Liège</organization>
            <organizationUrl>https://www.uliege.be</organizationUrl>
        </developer>
        <developer>
            <name>Jakub Duchateau</name>
            <url>https://jduchateau.github.io</url>
            <organization>University of Liège</organization>
            <organizationUrl>https://www.uliege.be</organizationUrl>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/kg-construct/BURP/</url>
        <connection>scm:git:git://github.com/kg-construct/BURP.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/kg-construct/BURP.git</developerConnection>
    </scm>

    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jena.version>5.6.0</jena.version>
        <antlr.version>4.13.1</antlr.version>
        <testcontainers.version>2.0.5</testcontainers.version>
    </properties>

    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.ttl</include>
                </includes>
            </resource>

            <!-- shapes -->
            <resource>
                <directory>rml-modules/rml-core/shapes</directory>
                <targetPath>shapes</targetPath>
                <includes>
                    <include>core.ttl</include>
                </includes>
            </resource>
            <resource>
                <directory>rml-modules/rml-cc/shapes</directory>
                <targetPath>shapes</targetPath>
                <includes>
                    <include>cc.ttl</include>
                </includes>
            </resource>
            <resource>
                <directory>rml-modules/rml-lv/shapes</directory>
                <targetPath>shapes</targetPath>
                <includes>
                    <include>lv.ttl</include>
                </includes>
            </resource>
            <resource>
                <directory>rml-modules/rml-io/shapes</directory>
                <targetPath>shapes</targetPath>
                <includes>
                    <include>io.ttl</include>
                </includes>
            </resource>

            <!-- ontologies -->
            <resource>
                <directory>rml-modules/rml-core/ontology</directory>
                <targetPath>vocabularies/rml</targetPath>
                <includes>
                    <include>*.owl</include>
                </includes>
            </resource>
            <resource>
                <directory>rml-modules/rml-cc/ontology</directory>
                <targetPath>vocabularies/rml</targetPath>
                <includes>
                    <include>*.owl</include>
                </includes>
            </resource>
            <resource>
                <directory>rml-modules/rml-io/ontology</directory>
                <targetPath>vocabularies/rml</targetPath>
                <includes>
                    <include>*.owl</include>
                </includes>
            </resource>
            <resource>
                <directory>rml-modules/rml-fnml/ontology</directory>
                <targetPath>vocabularies/rml</targetPath>
                <includes>
                    <include>*.owl</include>
                </includes>
            </resource>
            <resource>
                <directory>rml-modules/rml-lv/ontology</directory>
                <targetPath>vocabularies/rml</targetPath>
                <includes>
                    <include>*.owl</include>
                </includes>
            </resource>
        </resources>

        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
            <testResource>
                <directory>rml-modules/rml-core/test-cases</directory>
                <targetPath>rml-core</targetPath>
            </testResource>
            <testResource>
                <directory>rml-modules/rml-cc/test-cases</directory>
                <targetPath>rml-cc</targetPath>
            </testResource>
            <testResource>
                <directory>rml-modules/rml-lv/test-cases</directory>
                <targetPath>rml-lv</targetPath>
            </testResource>
            <testResource>
                <directory>rml-modules/rml-io/test-cases</directory>
                <targetPath>rml-io</targetPath>
            </testResource>
            <testResource>
                <directory>rml-modules/rml-io-registry/test-cases</directory>
                <targetPath>rml-io-registry</targetPath>
            </testResource>
            <testResource>
                <directory>rml-modules/rml-fnml/test-cases</directory>
                <targetPath>rml-fnml</targetPath>
            </testResource>
        </testResources>

        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <release>21</release>
                    <source>21</source>
                    <target>21</target>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>com.google.auto.service</groupId>
                            <artifactId>auto-service</artifactId>
                            <version>1.1.1</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>

            <!-- ANTLR4 Plugin -->
            <plugin>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-maven-plugin</artifactId>
                <version>${antlr.version}</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <id>antlr</id>
                        <goals>
                            <goal>antlr4</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <visitor>true</visitor>
                    <listener>false</listener>
                    <arguments>
                        <argument>-package</argument>
                        <argument>burp.parse.turtleprov</argument>
                    </arguments>
                </configuration>
            </plugin>

            <!-- Generate Vocabularies with Exec Maven Plugin -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>generate-ptr</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>
                        <configuration>
                            <mainClass>jena.schemagen</mainClass>
                            <arguments>
                                <argument>-i</argument>
                                <argument>${project.basedir}/src/main/resources/vocabularies/ptr.ttl</argument>
                                <argument>-e</argument>
                                <argument>TURTLE</argument>
                                <argument>-o</argument>
                                <argument>${project.build.directory}/generated-sources/vocabularies</argument>
                                <argument>--package</argument>
                                <argument>burp.vocabularies</argument>
                                <argument>-n</argument>
                                <argument>PTR</argument>
                                <argument>--ontology</argument>
                                <argument>--rdfs</argument>
                                <argument>--inference</argument>
                                <argument>-a</argument>
                                <argument>https://w3id.org/dre/ptr#</argument>
                            </arguments>
                            <includePluginDependencies>true</includePluginDependencies>
                        </configuration>
                    </execution>
                    <execution>
                        <id>generate-rer</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>
                        <configuration>
                            <mainClass>jena.schemagen</mainClass>
                            <arguments>
                                <argument>-i</argument>
                                <argument>${project.basedir}/src/main/resources/vocabularies/rer.ttl</argument>
                                <argument>-e</argument>
                                <argument>TURTLE</argument>
                                <argument>-o</argument>
                                <argument>${project.build.directory}/generated-sources/vocabularies</argument>
                                <argument>--package</argument>
                                <argument>burp.vocabularies</argument>
                                <argument>-n</argument>
                                <argument>RER</argument>
                                <argument>--ontology</argument>
                                <argument>--inference</argument>
                                <argument>--import</argument>
                                <argument>${project.basedir}/src/main/resources/vocabularies/ptr.ttl</argument>
                                <argument>-a</argument>
                                <argument>https://w3id.org/dre/rer#</argument>
                                <argument>--declarations</argument>
                                <argument>
                                    static{M_MODEL.read(RER.class.getClassLoader().getResourceAsStream("vocabularies/rer.ttl"),
                                    RER.NS, "TURTLE");}
                                </argument>
                            </arguments>
                            <includePluginDependencies>true</includePluginDependencies>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.jena</groupId>
                        <artifactId>jena-cmds</artifactId>
                        <version>${jena.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <!-- Build Helper Plugin to add generated sources -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.4.0</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/generated-sources/vocabularies</source>
                                <source>${project.build.directory}/generated-sources/antlr4</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.2.5</version>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>dependency/</classpathPrefix>
                            <mainClass>burp.Main</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

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

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <additionalOptions>-Xdoclint:none</additionalOptions>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>deploy</id>
            <build>
                <plugins>

                    <!-- Fat JAR plugin -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-shade-plugin</artifactId>
                        <version>3.6.2</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>shade</goal>
                                </goals>
                                <configuration>
                                    <createDependencyReducedPom>false</createDependencyReducedPom>
                                    <shadedArtifactAttached>true</shadedArtifactAttached>
                                    <transformers>
                                        <transformer
                                                implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                            <mainClass>burp.Main</mainClass>
                                        </transformer>
                                        <transformer
                                                implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                                        <transformer
                                                implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
                                        <transformer
                                                implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
                                            <addHeader>false</addHeader>
                                        </transformer>
                                    </transformers>
                                    <filters>
                                        <filter>
                                            <artifact>*:*</artifact>
                                            <excludes>
                                                <exclude>META-INF/*.SF</exclude>
                                                <exclude>META-INF/*.DSA</exclude>
                                                <exclude>META-INF/*.RSA</exclude>
                                            </excludes>
                                        </filter>
                                    </filters>
                                    <finalName>burp</finalName>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- GPG signing plugin -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Sigstore keyless signing plugin, because GPG is hard -->
                    <plugin>
                        <groupId>dev.sigstore</groupId>
                        <artifactId>sigstore-maven-plugin</artifactId>
                        <version>2.2.0</version>
                        <executions>
                            <execution>
                                <id>sign</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>


                    <!-- Maven Central Publishing Plugin -->
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.9.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                        </configuration>
                    </plugin>

                    <!-- Source plugin for publishing -->
                    <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>

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

                    <!-- JReleaser Plugin -->
                    <plugin>
                        <groupId>org.jreleaser</groupId>
                        <artifactId>jreleaser-maven-plugin</artifactId>
                        <version>1.12.0</version>
                        <configuration>
                            <jreleaser>
                                <project>
                                    <!-- @formatter:off -->
                                    <description>A Basic and Unassuming RML Processor (BURP) with RML Execution Report (RER) error handling</description>
                                    <!-- @formatter:on -->
                                    <authors>Jakub Duchateau, Christophe Debruyne</authors>
                                    <license>MIT</license>
                                    <links>
                                        <homepage>https://github.com/kg-construct/BURP</homepage>
                                    </links>
                                    <copyright>2026 Jakub Duchateau, 2024 Christophe Debruyne</copyright>
                                </project>
                                <release>
                                    <github>
                                        <owner>kg-construct</owner>
                                        <name>BURP</name>
                                        <host>github.com</host>
                                        <overwrite>true</overwrite>
                                        <skipTag>true</skipTag>
                                        <draft>true</draft>
                                        <changelog>
                                            <enabled>true</enabled>
                                            <formatted>ALWAYS</formatted>
                                            <preset>conventional-commits</preset>
                                        </changelog>
                                        <issues>
                                            <enabled>true</enabled>
                                        </issues>
                                    </github>
                                </release>
                                <distributions>
                                    <burp>
                                        <active>ALWAYS</active>
                                        <type>SINGLE_JAR</type>
                                        <java>
                                            <version>21</version>
                                            <mainClass>burp.Main</mainClass>
                                        </java>
                                        <executable>
                                            <name>burp</name>
                                        </executable>
                                        <artifacts>
                                            <artifact>
                                                <path>${project.build.directory}/burp.jar</path>
                                            </artifact>
                                        </artifacts>
                                    </burp>
                                </distributions>
                                <packagers>
                                    <jbang>
                                        <active>ALWAYS</active>
                                        <repository>
                                            <active>ALWAYS</active>
                                            <owner>kg-construct</owner>
                                            <name>jbang-catalog</name>
                                        </repository>
                                        <commitAuthor>
                                            <name>jduchateau</name>
                                            <email>jduchateau@users.noreply.github.com</email>
                                        </commitAuthor>
                                    </jbang>
                                </packagers>
                            </jreleaser>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>


    <dependencies>
        <dependency>
            <groupId>info.picocli</groupId>
            <artifactId>picocli</artifactId>
            <version>4.7.5</version>
        </dependency>

        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-arq</artifactId>
            <version>${jena.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-shacl</artifactId>
            <version>${jena.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-iri3986</artifactId>
            <version>${jena.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-ontapi</artifactId>
            <version>${jena.version}</version>
        </dependency>

        <dependency>
            <groupId>com.opencsv</groupId>
            <artifactId>opencsv</artifactId>
            <version>5.12.0</version>
        </dependency>
        <dependency>
            <groupId>com.univocity</groupId>
            <artifactId>univocity-parsers</artifactId>
            <version>2.9.1</version>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>2.10.0</version>
        </dependency>
        <dependency>
            <groupId>net.minidev</groupId>
            <artifactId>json-smart</artifactId>
            <version>2.6.0</version>
        </dependency>
        <dependency>
            <groupId>at.asitplus</groupId>
            <artifactId>jsonpath4k-jvm</artifactId>
            <version>3.1.1</version>
        </dependency>
        <dependency>
            <groupId>com.strumenta</groupId>
            <artifactId>antlr-kotlin-runtime-jvm</artifactId>
            <version>1.0.8</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlinx</groupId>
            <artifactId>kotlinx-serialization-json-jvm</artifactId>
            <version>1.6.3</version>
        </dependency>
        <dependency>
            <groupId>org.mongodb</groupId>
            <artifactId>bson-kotlinx</artifactId>
            <version>5.9.0</version>
        </dependency>
        <dependency>
            <groupId>com.mysql</groupId>
            <artifactId>mysql-connector-j</artifactId>
            <version>9.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.7.2</version>
        </dependency>
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>13.2.1.jre11</version>
        </dependency>
        <dependency>
            <groupId>org.xerial</groupId>
            <artifactId>sqlite-jdbc</artifactId>
            <version>3.46.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
            <version>1.11.0</version>
        </dependency>
        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>Saxon-HE</artifactId>
            <version>12.9</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>33.4.8-jre</version>
        </dependency>
        <dependency>
            <groupId>org.tukaani</groupId>
            <artifactId>xz</artifactId>
            <version>1.9</version>
        </dependency>
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4-runtime</artifactId>
            <version>${antlr.version}</version>
        </dependency>

        <!-- From JitPack -->
        <dependency>
            <groupId>com.github.candil-data-fabric</groupId>
            <artifactId>JNC</artifactId>
            <version>1.3.0</version>
        </dependency>

        <!-- ServiceLoader Annotations -->
        <dependency>
            <groupId>com.google.auto.service</groupId>
            <artifactId>auto-service-annotations</artifactId>
            <version>1.1.1</version>
            <scope>compile</scope>
        </dependency>

        <!-- DEPENDENCIES FOR TESTS -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.10.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.10.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>5.10.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers-junit-jupiter</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers-postgresql</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers-mysql</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers-mssqlserver</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-fuseki-main</artifactId>
            <version>${jena.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
