<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.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    
    <artifactId>languagetool-core</artifactId>
    <url>http://www.languagetool.org</url>
    <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>

    <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>
    
    <packaging>jar</packaging>

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

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jar.plugin}</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>

            <!--
             we use the maven plugin to generate sources that we also include in our source tree (+ git)
             this step otherwise doesn't play nice with IDEs,
             i.e. you need to run mvn package manually because the IDEs don't do the code generation step and get compilation errors
              -->
            <!-- START OF gRPC code generation -->
            <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.6.1</version>
                <configuration>
                    <protocArtifact>com.google.protobuf:protoc:3.11.0:exe:${os.detected.classifier}</protocArtifact>
                    <pluginId>grpc-java</pluginId>
                    <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.27.1: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>
            <!-- END OF gRPC code generation -->
        </plugins>

        <extensions>
            <!-- another dependency for gRPC code generation -->
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.6.2</version>
            </extension>
        </extensions>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.9</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
            <version>1.8</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>28.1-jre</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>0.8.1</version>
        </dependency>
        <dependency>
            <groupId>net.loomchild</groupId>
            <artifactId>segment</artifactId>
            <version>2.0.1</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>1.2.2</version>
        </dependency>
        <dependency>
            <groupId>com.optimaize.languagedetector</groupId>
            <artifactId>language-detector</artifactId>
            <version>0.6</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>
            <!-- also fetched via language-detector, but language-detector might be excluded in some projects: -->
            <groupId>com.intellij</groupId>
            <artifactId>annotations</artifactId>
            <version>12.0</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>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>tech.units</groupId>
            <artifactId>indriya</artifactId>
            <version>1.3</version>
        </dependency>

        <dependency>
            <!-- for JDK 9 -->
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <version>2.3.0</version>
        </dependency>
        <!-- JAXB needs javax.activation module (jdk9) -->
        <dependency>
            <groupId>javax.activation</groupId>
            <artifactId>javax.activation-api</artifactId>
            <version>1.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.25</version>
        </dependency>

        <dependency>
            <groupId>com.gitlab.dumonts</groupId>
            <artifactId>hunspell</artifactId>
            <version>1.1.1</version>
        </dependency>
        
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.2.3</version>
            <scope>test</scope>
        </dependency>

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

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>1.7</version>
        </dependency>

        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.2</version>
        </dependency>

        <!-- prometheus monitoring, further dependencies in languagetool-server -->
        <!-- The client -->
        <dependency>
            <groupId>io.prometheus</groupId>
            <artifactId>simpleclient</artifactId>
            <version>0.6.0</version>
        </dependency>
        <dependency>
            <groupId>io.prometheus</groupId>
            <artifactId>simpleclient_guava</artifactId>
            <version>0.6.0</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </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>1.3.2</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-netty-shaded</artifactId>
            <version>1.27.1</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>1.27.1</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>1.27.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-pool2</artifactId>
            <version>2.7.0</version>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>2.28.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jetbrains.intellij.deps</groupId>
            <artifactId>trove4j</artifactId>
            <version>1.0.20190514</version>
        </dependency>

    </dependencies>

</project>
