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

    <!--
       Do not add a <parent>..</parent> here as we want to release querqy-core and querqy-for lucene
       separately. The pom.xml in the parent directory only serves as a help to run a multi-module build when
       developing new core and lucene/solr features at the same time.
    -->

    <groupId>org.querqy</groupId>
    <artifactId>querqy-for-lucene</artifactId>
    <version>5.2.lucene810.0</version>
    <packaging>pom</packaging>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>Querqy library for query rewriting: Lucene parent</description>
    <url>https://querqy.org</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <repositories>
        <!--
            Trying to avoiding Maven @ GitHub Build error

            Failed to collect dependencies at org.apache.solr:solr-test-framework:jar:8.1.0 ->
            org.restlet.jee:org.restlet:jar:2.3.0: Failed to read artifact descriptor for
            org.restlet.jee:org.restlet:jar:2.3.0: Could not transfer artifact org.restlet.jee:org.restlet:pom:2.3.0
            from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories:
            [maven-restlet (http://maven.restlet.org, default, releases+snapshots)
        -->
        <repository>
            <id>maven-restlet</id>
            <name>Public online Restlet repository</name>
            <url>https://maven.restlet.com</url>
        </repository>
    </repositories>

    <developers>
        <developer>
            <id>renekrie</id>
            <name>René Kriegler</name>
            <email>post@rene-kriegler.com</email>
            <url>https://github.com/renekrie</url>
        </developer>
        <developer>
            <id>mkr</id>
            <name>Matthias Krüger</name>
            <url>https://github.com/mkr</url>
        </developer>
        <developer>
            <id>JohannesDaniel</id>
            <name>Johannes Peter</name>
            <email>johannesdaniel.peter@gmx.de</email>
            <url>https://github.com/JohannesDaniel</url>
        </developer>
    </developers>


    <scm>
        <url>git@github.com:querqy/querqy.git</url>
        <connection>scm:git:git@github.com:querqy/querqy.git</connection>
        <developerConnection>scm:git:git@github.com:querqy/querqy.git</developerConnection>
        <tag>querqy-for-lucene-5.2.lucene810.0</tag>
    </scm>

    <prerequisites>
        <maven>3.3.0</maven>
    </prerequisites>

    <properties>

        <maven-assembly-plugin.version>3.1.1</maven-assembly-plugin.version>
        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
        <maven-jar-plugin.version>3.1.2</maven-jar-plugin.version>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
        <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
        <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
        <maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>
        <cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
        <junit.version>4.13.1</junit.version>
        <hamcrest.version>2.1</hamcrest.version>
        <mockito.version>3.7.7</mockito.version>
        <skipITs>true</skipITs>

        <querqy.core.version>3.12.0</querqy.core.version>
        <lucene.version>8.1.0</lucene.version>
        <minidev.json-smart.version>2.3</minidev.json-smart.version>
        <commons.io.version>2.5</commons.io.version>
        <slf4j.version>1.7.26</slf4j.version>
        <testcontainers.version>1.15.1</testcontainers.version>

    </properties>

    <modules>
        <module>querqy-lucene</module>
        <module>querqy-solr</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.15.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <systemPropertyVariables>
                        <tests.codec>Lucene80</tests.codec>
                        <java.security.egd>file:/dev/./urandom</java.security.egd>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                        <showDeprecation>true</showDeprecation>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <version>${cobertura-maven-plugin.version}</version>
                    <configuration>
                        <instrumentation>
                            <excludes>
                                <exclude>**/*Test.class</exclude>
                            </excludes>
                        </instrumentation>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>clean</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <configuration>
                            <source>8</source>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </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>
                                <configuration>
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphraseServerId>${gpg.keyname}</passphraseServerId>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>${maven-release-plugin.version}</version>
                        <configuration>
                            <useReleaseProfile>false</useReleaseProfile>
                            <releaseProfiles>release</releaseProfiles>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>


    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>${cobertura-maven-plugin.version}</version>
            </plugin>
        </plugins>
    </reporting>

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

</project>
