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

    <groupId>nl.inl.blacklab</groupId>
    <artifactId>blacklab-all</artifactId>
    <packaging>pom</packaging>
    <version>4.0.0</version>
    <name>BlackLab Corpus Search</name>
    <description>The parent project for BlackLab Core and BlackLab Server.</description>
    <url>https://github.com/instituutnederlandsetaal/BlackLab</url>

    <modules>

        <!-- Contains config for checkstyle, PMD and findbugs.
        <module>build-tools</module> -->

        <!-- Smaller modules used by Java lib and webservice -->
        <module>util</module>
        <module>common</module>
        <module>content-store</module>
        <module>engine</module>
        <module>query-parser</module>
        <module>tools</module>
        <module>mocks</module>
        <module>convert-and-tag</module>
        <module>wslib</module>

        <!-- Java lib and webservice -->
        <module>core</module>
        <module>server</module>

        <!-- Optional instrumentation modules -->
        <module>instrumentation/instrumentation</module>
        <module>instrumentation/instrumentation-impl</module>

        <!-- Solr integration (experimental) -->
        <module>solr</module>

        <!-- BlackLab Proxy (experimental)
        <module>proxy</module> -->

        <!-- Older DocIndexers -->
        <module>contrib/legacy-docindexers</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <doclint>none</doclint>

        <blacklab.version>${project.version}</blacklab.version>

        <!-- Library versions -->
        <servlet.version>4.0.1</servlet.version>
        <blacklab.luceneVersion>8.11.1</blacklab.luceneVersion>
        <solr.version>8.11.1</solr.version>
        <log4j.version>2.24.3</log4j.version>
        <eclipse.collections.version>12.0.0.M3</eclipse.collections.version>

        <!-- servlet, rest, json, xml, yaml -->
        <jackson.version>2.13.4</jackson.version>
        <jersey.version>2.35</jersey.version>
        <jaxb.version>2.3.1</jaxb.version>

        <!-- Java version -->
        <maven.compiler.release>17</maven.compiler.release>

        <!-- Plugin versions -->
        <checkstyle.version>3.1.2</checkstyle.version>
        <pmd.version>3.16.0</pmd.version>
        <findbugs.version>3.0.5</findbugs.version>
        <javadoc.version>3.5.0</javadoc.version>


    </properties>

    <licenses>
        <license>
            <name>The 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>

    <organization>
        <name>Instituut voor Nederlandse Taal (INT)</name>
        <url>https://www.ivdnt.org/</url>
    </organization>

    <scm>
        <url>https://github.com/instituutnederlandsetaal/BlackLab</url>
        <connection>scm:git:git://github.com/instituutnederlandsetaal/BlackLab.git</connection>
        <developerConnection>scm:git:git@github.com:INL/BlackLab.git</developerConnection>
      <tag>v4.0.0</tag>
  </scm>

    <issueManagement>
        <url>https://github.com/instituutnederlandsetaal/BlackLab/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <!-- Where releases are deployed (OSSRH, for publishing to Maven Central) -->
    <distributionManagement>
        <repository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://central.sonatype.com/api/v1/publisher/upload</url>
        </repository>
        <snapshotRepository>
            <id>central-snap</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <developers>
        <developer>
            <id>jan-niestadt</id>
            <name>Jan Niestadt</name>
            <email>jan.niestadt@ivdnt.org</email>
            <url>https://github.com/jan-niestadt</url>
            <organization>INT</organization>
            <organizationUrl>https://www.ivdnt.org</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>Europe/Amsterdam</timezone>
        </developer>
        
        <developer>
            <id>KCMertens</id>
            <name>Koen Mertens</name>
            <email>koen.mertens@ivdnt.org</email>
            <url>https://github.com/KCMertens</url>
            <organization>INL</organization>
            <organizationUrl>https://www.ivdnt.org/</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>Europe/Amsterdam</timezone>
        </developer>
    </developers>

    <contributors>
        <contributor>
            <name>Jesse de Does</name>
            <email>jesse.dedoes@ivdnt.org</email>
            <organization>INT</organization>
            <organizationUrl>https://www.ivdnt.org/</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>Europe/Amsterdam</timezone>
        </contributor>
        
        <contributor>
            <name>Eduard Drenth</name>
            <email>edrenth@fryske-akademy.nl</email>
            <organization>Fryske Akademy</organization>
            <organizationUrl>https://www.fryske-akademy.nl/</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>Europe/Amsterdam</timezone>
        </contributor>
    </contributors>

    <build>

        <plugins>

            <!-- Java compiler -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.14.0</version>
            </plugin>

            <!-- Enforces minimum Maven version -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.2.5</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Copies dependencies to target/lib, so we can run programs
                from blacklab.jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Creates the JAR and the included manifest file -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                        </manifest>
                        <manifestEntries>
                            <Build-Time>${maven.build.timestamp}</Build-Time>
                            <Build-Scm-Revision>${buildNumber}</Build-Scm-Revision>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.3.2</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                        <manifestEntries>
                            <Build-Time>${maven.build.timestamp}</Build-Time>
                            <Build-Scm-Revision>${buildNumber}</Build-Scm-Revision>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <!--<version>3.0.0-M1</version>-->
                <version>3.0.0-M7</version>
            </plugin>

            <!-- Generates a "build number" (just a timestamp in our case)
                to put in the manifest -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>
                    <shortRevisionLength>7</shortRevisionLength>
                </configuration>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Generates project site -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.12.1</version>
                <dependencies>

                    <!-- SSH/SCP (copy to local server) -->
                    <dependency>
                        <groupId>org.apache.maven.wagon</groupId>
                        <artifactId>wagon-ssh</artifactId>
                        <version>3.5.3</version>
                    </dependency>
                    <dependency><!-- use external ssh (ssh or putty/pageant on windows) -->
                        <groupId>org.apache.maven.wagon</groupId>
                        <artifactId>wagon-ssh-external</artifactId>
                        <version>3.5.3</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <!-- Skip all except core, see there -->
                    <skip>true</skip>
                    <skipDeploy>true</skipDeploy>
                </configuration>
            </plugin>

            <!-- Linkable source code -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>3.3.0</version>
            </plugin>

            <!-- Report on (possible) bugs
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>${findbugs.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>nl.inl.blacklab</groupId>
                        <artifactId>build-tools</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
            </plugin> -->

            <!-- Report on possible bugs/style problems
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${pmd.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>nl.inl.blacklab</groupId>
                        <artifactId>build-tools</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
            </plugin> -->

            <!-- Report on style problems
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${checkstyle.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>nl.inl.blacklab</groupId>
                        <artifactId>build-tools</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
            </plugin> -->

            <!-- Javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${javadoc.version}</version>
                <configuration>
                    <notimestamp>true</notimestamp>
                </configuration>
            </plugin>

            <!-- Unit test reports -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>3.0.0-M7</version>
            </plugin>

            <!-- Creates a release version -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.0.0-M6</version>
                <configuration>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                    <localCheckout>true</localCheckout>
                    <pushChanges>false</pushChanges>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.8.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <!--
                        <autoPublish>true</autoPublish>
                        <waitUntil>published</waitUntil>
                    -->
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.2.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>3.0.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>3.0.1</version>
            </plugin>

        </plugins>
    </build>

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

                    <!-- Create a source jar -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Create a javadoc jar -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${javadoc.version}</version>
                        <configuration>
                            <notimestamp>true</notimestamp>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <!-- Generate before package, not deploy (otherwise deploy will produce
                                     package/class not found errors) -->
                                <phase>prepare-package</phase>
                            </execution>
                        </executions>
                    </plugin>

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

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

    <dependencies>

        <!-- Testing (JUnit and Mockito) -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>5.16.0</version>
            <scope>test</scope>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${log4j.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.sun.jmx</groupId>
                    <artifactId>jmxri</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jdmk</groupId>
                    <artifactId>jmxtools</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.jms</groupId>
                    <artifactId>jms</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>mail</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.activation</groupId>
                    <artifactId>activation</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Apache Commons libs -->
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.18.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>1.27.1</version>
        </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-text</artifactId>
            <version>1.13.0</version>
        </dependency>

        <!-- For indexing from tabular files: csv, tsv -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>1.13.0</version>
        </dependency>

        <!-- JCIP annotations (@ThreadSafe, @NotThreadSafe) -->
        <dependency>
            <groupId>net.jcip</groupId>
            <artifactId>jcip-annotations</artifactId>
            <version>1.0</version>
        </dependency>

    </dependencies>

    <reporting>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.3.0</version>
            </plugin>

            <!-- Project info section of the project site
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.2.2</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>dependencies</report>
                            <report>dependency-info</report>
                            <report>issue-management</report>
                            <report>licenses</report>
                            <report>plugin-management</report>
                            <report>plugins</report>
                            <report>team</report>
                            <report>scm</report>
                            <report>summary</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin> -->

            <!-- Javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${javadoc.version}</version>
                <configuration>
                    <notimestamp>true</notimestamp>
                </configuration>
                <reportSets>
                    <reportSet>
                        <id>html</id>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <!-- Report on (possible) bugs
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>${findbugs.version}</version>
                <configuration>
                    <excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
                </configuration>
            </plugin> -->

            <!-- Report on possible bugs/style problems
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${pmd.version}</version>
                <configuration>
                    <rulesets>
                        <ruleset>pmd-rules.xml</ruleset>
                    </rulesets>
                    <sourceEncoding>utf-8</sourceEncoding>
                    <minimumTokens>100</minimumTokens>
                    <targetJdk>1.8</targetJdk>
                    <excludes>
                        <exclude>**/queryParser/**/*</exclude>
                    </excludes>
                </configuration>
            </plugin> -->

            <!-- Report on style problems
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${checkstyle.version}</version>
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                    <excludes>**/queryParser/**/*,**/util/json/**/*</excludes>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>checkstyle</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin> -->

            <!-- Report on tags like TODO, etc.
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <tagListOptions>
                        <tagClasses>
                            <tagClass>
                                <displayName>Bug or serious issue</displayName>
                                <tags>
                                    <tag>
                                        <matchString>FIXME</matchString>
                                        <matchType>exact</matchType>
                                    </tag>
                                    <tag>
                                        <matchString>hack</matchString>
                                        <matchType>ignoreCase</matchType>
                                    </tag>
                                </tags>
                            </tagClass>
                            <tagClass>
                                <displayName>Todo Work</displayName>
                                <tags>
                                    <tag>
                                        <matchString>todo</matchString>
                                        <matchType>ignoreCase</matchType>
                                    </tag>
                                    <tag>
                                        <matchString>TO DO</matchString>
                                        <matchType>exact</matchType>
                                    </tag>
                                </tags>
                            </tagClass>
                            <tagClass>
                                <displayName>Possible optimization</displayName>
                                <tags>
                                    <tag>
                                        <matchString>OPT</matchString>
                                        <matchType>exact</matchType>
                                    </tag>
                                </tags>
                            </tagClass>
                        </tagClasses>
                    </tagListOptions>
                </configuration>
            </plugin> -->

            <!-- Report on dependency versions
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.12.0</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>dependency-updates-report</report>
                            <report>plugin-updates-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin> -->

        </plugins>

    </reporting>

</project>
