<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2019 teamapps.org (see code comments for author's name)
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <artifactId>universal-db</artifactId>
    <groupId>org.teamapps</groupId>
    <version>0.7.4</version>

    <name>UniversalDB</name>
    <description>Ultra fast TeamApps database</description>
    <url>https://github.com/teamapps-org/universal-db</url>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Matthias Bernstein</name>
            <email>matthias.bernstein@teamapps.org</email>
            <id>matthias-bernstein</id>
        </developer>
    </developers>

    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven-assembly-plugin-version>3.0.0</maven-assembly-plugin-version>
        <junit.version>4.13.2</junit.version>
        <tika-version>3.1.0</tika-version>
        <lucene-version>10.1.0</lucene-version>
    </properties>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <scm>
        <url>https://github.com/teamapps-org/universal-db</url>
        <connection>scm:git:git@github.com:teamapps-org/universal-db.git</connection>
        <developerConnection>scm:git:git@github.com:teamapps-org/universal-db.git</developerConnection>
        <tag>v0.7.4</tag>
    </scm>


    <dependencies>

        <dependency>
            <groupId>org.teamapps</groupId>
            <artifactId>teamapps-message-protocol</artifactId>
            <version>0.16</version>
        </dependency>

        <dependency>
            <groupId>org.teamapps</groupId>
            <artifactId>teamapps-commons</artifactId>
            <version>0.1.2</version>
        </dependency>


        <dependency>
            <groupId>org.agrona</groupId>
            <artifactId>agrona</artifactId>
            <version>1.21.2</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.17.0</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>4.4</version>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.18.0</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>2.0.16</version>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.5.16</version>
        </dependency>

        <dependency>
            <groupId>org.apache.tika</groupId>
            <artifactId>tika-core</artifactId>
            <version>${tika-version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>commons-io</artifactId>
                    <groupId>commons-io</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>slf4j-api</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.tika</groupId>
            <artifactId>tika-parsers-standard-package</artifactId>
            <version>${tika-version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>commons-io</artifactId>
                    <groupId>commons-io</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>slf4j-api</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-backward-codecs</artifactId>
            <version>${lucene-version}</version>
        </dependency>


        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
            <version>${lucene-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-queries</artifactId>
            <version>${lucene-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-queryparser</artifactId>
            <version>${lucene-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-codecs</artifactId>
            <version>${lucene-version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-memory</artifactId>
            <version>${lucene-version}</version>
        </dependency>

        <dependency>
            <groupId>com.ibm.icu</groupId>
            <artifactId>icu4j</artifactId>
            <version>76.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
            <version>1.13.0</version>
        </dependency>

        <dependency>
            <groupId>com.github.pemistahl</groupId>
            <artifactId>lingua</artifactId>
            <version>1.2.2</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>

            <plugin>
                <groupId>org.teamapps</groupId>
                <artifactId>teamapps-message-protocol-maven-plugin</artifactId>
                <version>0.4</version>
                <executions>
                    <execution>
                        <id>source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate-message-protocol-api</goal>
                        </goals>
                    </execution>
                    <execution>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>generate-test-message-protocol-api</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.teamapps</groupId>
                <artifactId>universal-db-maven-plugin</artifactId>
                <version>1.2</version>
                <executions>
                    <execution>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>generate-test-model</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <modelClasses>
                        <modelClass>Model</modelClass>
                        <modelClass>Model2</modelClass>
                    </modelClasses>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
                <configuration>
                    <argLine>
                        --add-exports=java.base/sun.nio.ch=ALL-UNNAMED
                        --add-opens=java.base/java.lang=ALL-UNNAMED
                        --add-opens=java.base/java.lang.reflect=ALL-UNNAMED
                        --add-opens=java.base/java.io=ALL-UNNAMED
                        --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
                    </argLine>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5.3</version>
                        <configuration>
                            <mavenExecutorId>forked-path</mavenExecutorId>
                            <useReleaseProfile>false</useReleaseProfile>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <tagNameFormat>v@{version}</tagNameFormat>
                            <releaseProfiles>javadoc-jar,sources-jar,license-handling</releaseProfiles>
                        </configuration>
                    </plugin>
                    <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://s01.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>javadoc-jar</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>generate-javadoc-jar</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>sources-jar</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>generate-sources-jar</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>license-handling</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <version>1.19</version>
                        <executions>
                            <execution>
                                <id>download-licenses</id>
                                <goals>
                                    <goal>download-licenses</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>update-project-license</id>
                                <goals>
                                    <goal>update-project-license</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>update-file-header</id>
                                <phase>process-sources</phase>
                                <goals>
                                    <goal>update-file-header</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <projectName>UniversalDB</projectName>
                            <organizationName>TeamApps.org</organizationName>
                            <inceptionYear>2014</inceptionYear>
                            <licenseName>apache_v2</licenseName>
                            <processStartTag>========================LICENSE_START=================================</processStartTag>
                            <processEndTag>=========================LICENSE_END==================================</processEndTag>
                            <sectionDelimiter>---</sectionDelimiter>
                            <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                            <canUpdateCopyright>true</canUpdateCopyright>
                            <canUpdateDescription>true</canUpdateDescription>
                            <canUpdateLicense>true</canUpdateLicense>
                            <roots>
                                <root>src/main</root>
                                <root>src/test</root>
                                <root>target/generated-sources</root>
                                <root>target/generated-resources</root>
                            </roots>
                            <excludes>
                                <exclude>**/*.json</exclude>
                                <exclude>**/*.svg</exclude>
                                <exclude>**/*.txt</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>