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

    <parent>
        <groupId>org.languagetool</groupId>
        <artifactId>languagetool-parent</artifactId>
        <version>5.9</version>
    </parent>

    <artifactId>languagetool-core</artifactId>
    <packaging>jar</packaging>
    <name>LanguageTool Style and Grammar Checker Core</name>
    <description>LanguageTool is an Open Source proofreading software for English, French, German, Polish, Romanian, and
        more than 20 other languages. It finds many errors that a simple spell checker cannot detect like mixing up
        there/their and it detects some grammar problems.
    </description>
    <url>https://www.languagetool.org</url>

    <licenses>
        <license>
            <name>GNU Lesser General Public License</name>
            <url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Daniel Naber</name>
            <roles>
                <role>Maintainer</role>
            </roles>
        </developer>
        <developer>
            <name>Marcin Miłkowski</name>
            <roles>
                <role>Maintainer</role>
            </roles>
        </developer>
    </developers>

    <dependencies>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${org.apache.commons.lang3.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
            <version>${org.apache.commons.text.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
        </dependency>
        <dependency>
            <groupId>org.carrot2</groupId>
            <artifactId>morfologik-fsa</artifactId>
            <version>${morfologik.version}</version>
        </dependency>
        <dependency>
            <groupId>org.carrot2</groupId>
            <artifactId>morfologik-fsa-builders</artifactId>
            <version>${morfologik.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.carrotsearch</groupId>
                    <artifactId>hppc</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.carrot2</groupId>
            <artifactId>morfologik-speller</artifactId>
            <version>${morfologik.version}</version>
        </dependency>
        <dependency>
            <groupId>org.carrot2</groupId>
            <artifactId>morfologik-stemming</artifactId>
            <version>${morfologik.version}</version>
        </dependency>
        <dependency>
            <!-- needed for building the Morfologik dict at runtime (for ignore.txt) -->
            <groupId>com.carrotsearch</groupId>
            <artifactId>hppc</artifactId>
            <version>${com.carrotsearch.hppc.version}</version>
        </dependency>
        <dependency>
            <groupId>net.loomchild</groupId>
            <artifactId>segment</artifactId>
            <version>${net.loomchild.segment.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.hankcs</groupId>
            <artifactId>aho-corasick-double-array-trie</artifactId>
            <version>${com.hankcs.aho-corasick-double-array-trie.version}</version>
        </dependency>
        <dependency>
            <groupId>com.optimaize.languagedetector</groupId>
            <artifactId>language-detector</artifactId>
            <version>${optimaize.languagedetector.language-detector.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>${org.jetbrains.annotations.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
            <version>${lucene.version}</version>
        </dependency>
        <dependency>
            <!-- so we can open indexed created with older versions of Lucene -->
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-backward-codecs</artifactId>
            <version>${lucene.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.measure</groupId>
            <artifactId>unit-api</artifactId>
            <!-- see https://github.com/languagetool-org/languagetool/issues/4088 before you upgrade this -->
            <version>${javax.measure.unit-api.version}</version>
        </dependency>
        <dependency>
            <groupId>tech.units</groupId>
            <artifactId>indriya</artifactId>
            <!-- see https://github.com/languagetool-org/languagetool/issues/4088 before you upgrade this -->
            <version>${tech.units.indriya.version}</version>
        </dependency>
        <dependency>
            <!-- for JDK 9 -->
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>${javax.xml.bind.jaxb-api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <version>${org.glassfish.jaxb.jaxb-runtime.version}</version>
        </dependency>
        <!-- JAXB needs javax.activation module (jdk9) -->
        <dependency>
            <groupId>javax.activation</groupId>
            <artifactId>javax.activation-api</artifactId>
            <version>${javax.activation.javax.activation-api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${org.slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>com.gitlab.dumonts</groupId>
            <artifactId>hunspell</artifactId>
            <version>${com.gitlab.dumonts.hunspell.version}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${ch.qos.logback.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>${commons-logging.version}</version>
        </dependency>
        <!-- prometheus monitoring, further dependencies in languagetool-server -->
        <!-- The client -->
        <dependency>
            <groupId>io.prometheus</groupId>
            <artifactId>simpleclient</artifactId>
            <version>${io.prometheus.simpleclient.version}</version>
        </dependency>
        <dependency>
            <groupId>io.prometheus</groupId>
            <artifactId>simpleclient_guava</artifactId>
            <version>${io.prometheus.simpleclient.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.github.resilience4j</groupId>
            <artifactId>resilience4j-circuitbreaker</artifactId>
            <version>${io.github.resilience4j.version}</version>
        </dependency>
        <!-- monitoring for resilience4j -->
        <dependency>
            <groupId>io.github.resilience4j</groupId>
            <artifactId>resilience4j-micrometer</artifactId>
            <version>${io.github.resilience4j.version}</version>
        </dependency>
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-registry-prometheus</artifactId>
            <version>${io.micrometer.micrometer-prometheus.version}</version>
        </dependency>
        <!-- grpc, used in BERT service -->
        <dependency>
            <!-- fix compilation error:
                cannot find symbol
                [ERROR]   symbol:   class Generated
                [ERROR]   location: package javax.annotation
            see https://github.com/grpc/grpc-java/issues/3633, https://github.com/grpc/grpc-java/issues/4725 -->
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <version>${javax.annotation.javax.annotation-api.version}</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-netty-shaded</artifactId>
            <version>${io.grpc.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.errorprone</groupId>
                    <artifactId>error_prone_annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-protobuf</artifactId>
            <version>${io.grpc.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.errorprone</groupId>
                    <artifactId>error_prone_annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-stub</artifactId>
            <version>${io.grpc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-pool2</artifactId>
            <version>${org.apache.commons.commons-pool2.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <version>${org.awaitility.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.intellij.deps</groupId>
            <artifactId>trove4j</artifactId>
            <version>${org.jetbrains.intellij.deps.trove4j.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-validator</groupId>
            <artifactId>commons-validator</artifactId>
            <version>${commons-validator}</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-collections</groupId>
                    <artifactId>commons-collections</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.vdurmont</groupId>
            <artifactId>emoji-java</artifactId>
            <version>${com.vdurmont.emoji-java.version}</version>
            <exclusions>
                <!-- The package `JSON-java` before 20180130 is vulnerable to Denial of service. -->
                <exclusion>
                    <groupId>org.json</groupId>
                    <artifactId>json</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- The package `JSON-java` before 20180130 is vulnerable to Denial of service. -->
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20200518</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin.version}</version>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <ComponentVersion>${project.version}</ComponentVersion>
                            <Implementation-Date>${maven.build.timestamp}</Implementation-Date>
                        </manifestEntries>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>${kr.motd.maven.os-maven-plugin.version}</version>
            </extension>
        </extensions>
    </build>
    <profiles>
        <profile>
            <id>jdk17</id>
            <activation>
                <jdk>[11,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>io.github.git-commit-id</groupId>
                        <artifactId>git-commit-id-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jdk8</id>
            <activation>
                <jdk>(,8)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>pl.project13.maven</groupId>
                        <artifactId>git-commit-id-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>protoc</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.xolstice.maven.plugins</groupId>
                        <artifactId>protobuf-maven-plugin</artifactId>
                        <version>${protobuf-maven-plugin.version}</version>
                        <configuration>
                            <protocArtifact>com.google.protobuf:protoc:${protoc.version}:exe:${os.detected.classifier}
                            </protocArtifact>
                            <pluginId>grpc-java</pluginId>
                            <pluginArtifact>io.grpc:protoc-gen-grpc-java:${io.grpc.version}:exe:${os.detected.classifier}
                            </pluginArtifact>
                            <!-- output into src/main/java, but don't ever clear it (would delete all regular source files) -->
                            <outputDirectory>${project.build.sourceDirectory}/</outputDirectory>
                            <clearOutputDirectory>false</clearOutputDirectory>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>compile</goal>
                                    <goal>compile-custom</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
