<?xml version="1.0"?>

<!--
  ~ Yet Another UserAgent Analyzer
  ~ Copyright (C) 2013-2025 Niels Basjes
  ~
  ~ 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
  ~
  ~ https://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>yauaa-parent</artifactId>
  <packaging>pom</packaging>
  <groupId>nl.basjes.parse.useragent</groupId>
  <version>7.32.0</version>

  <name>Yauaa : </name>
  <description>A parsing and analyzing library to get information from a useragent string.</description>
  <inceptionYear>2013</inceptionYear>

  <url>https://yauaa.basjes.nl</url>

  <properties>
    <target.java.version>8</target.java.version>
    <target.java.release>8</target.java.release>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.build.outputEncoding>UTF-8</project.build.outputEncoding>
    <maven.compiler.source>${target.java.version}</maven.compiler.source>
    <maven.compiler.target>${target.java.version}</maven.compiler.target>
    <maven.compiler.release>${target.java.release}</maven.compiler.release>

    <!-- In order for everything to work correctly we need at least this version of maven. -->
    <maven.minimal.version>3.5.2</maven.minimal.version>

    <antlr.version>4.13.2</antlr.version>
    <snakeyaml.version>2.5</snakeyaml.version>

    <!-- Needed to make the build reproducible https://reproducible-builds.org/ -->
    <project.build.outputTimestamp>2025-10-11T16:29:46Z</project.build.outputTimestamp>

    <!-- ============================================== -->
    <!-- ================ UDF Versions ================ -->
    <!-- ============================================== -->
    <!-- Apache Flink -->
    <flink.version>2.1.0</flink.version>
    <flink-connector-elasticsearch7.version>3.0.1-1.17</flink-connector-elasticsearch7.version>

    <!-- Apache Beam -->
    <beam.version>2.68.0</beam.version>
    <hamcrest-all.version>1.3</hamcrest-all.version>

    <!-- Apache Drill -->
    <drill.version>1.22.0</drill.version>
    <netty.version>4.1.75.Final</netty.version>

    <!-- Apache Hadoop -->
    <hadoop.version>3.4.2</hadoop.version>

    <!-- Apache Hive -->
    <hive.version>4.1.0</hive.version>

    <!-- Apache Nifi -->
    <nifi-api.version>2.3.0</nifi-api.version>
    <nifi.version>2.6.0</nifi.version>
    <nifi-nar-maven-plugin.version>2.1.0</nifi-nar-maven-plugin.version>

    <!-- LogParser -->
    <logparser.version>5.11.0</logparser.version>

    <!-- Elastic tools 7.x series -->
    <elasticsearch-7.version>7.17.29</elasticsearch-7.version>

    <!-- Elastic tools 8.x series -->
    <elasticsearch-8.version>8.19.5</elasticsearch-8.version>

    <!-- Elastic tools 9.x series -->
    <elasticsearch-9.version>9.1.5</elasticsearch-9.version>

    <!-- Trino (a.k.a. Presto SQL)-->
    <trino.version>476</trino.version>

    <!-- ============================================== -->

    <dependency-check-maven.version>12.1.6</dependency-check-maven.version>
    <dependency-convergence.phase>validate</dependency-convergence.phase>
    <maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
    <checkstyle.version>11.1.0</checkstyle.version>
    <spotbugs-maven-plugin.version>4.9.6.0</spotbugs-maven-plugin.version>
    <spotbugs.version>4.9.6</spotbugs.version>
    <slf4j1.version>1.7.36</slf4j1.version>
    <slf4j2.version>2.0.17</slf4j2.version>
    <log4j2.version>2.25.2</log4j2.version>
    <kryo4.version>4.0.2</kryo4.version>  <!--  DO NOT UPGRADE: We test with Kryo 4.x.x to ensure backwards compatibility. -->
    <kryo5.version>5.6.2</kryo5.version>
    <commons-collections4.version>4.5.0</commons-collections4.version>
    <apache-rat-plugin.version>0.16.1</apache-rat-plugin.version>
    <jacoco-maven-plugin.version>0.8.13</jacoco-maven-plugin.version>
    <junit5.version>5.14.0</junit5.version>
    <hamcrest-core.version>3.0</hamcrest-core.version>
    <lombok.version>1.18.42</lombok.version>

    <jackson.version>2.20.0</jackson.version>

    <!-- ============================================== -->

    <!-- This is to make the example code a bit easier to copy into your own project. -->
    <yauaa.version>${project.version}</yauaa.version>

    <kotlin.version>1.9.21</kotlin.version>
    <quarkus.platform.version>3.6.1</quarkus.platform.version>
    <quarkus-plugin.version>${quarkus.platform.version}</quarkus-plugin.version>

    <scala-library.version>2.13.12</scala-library.version>
    <scalatestplus-junit-4.version>3.2.2.0</scalatestplus-junit-4.version>
    <scalatest_2.13.version>3.2.17</scalatest_2.13.version>

    <!-- ============================================== -->

    <exec-maven-plugin.version>3.6.1</exec-maven-plugin.version>
    <maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
    <maven-artifact-plugin.version>3.6.1</maven-artifact-plugin.version>
    <maven-assembly-plugin.version>3.7.1</maven-assembly-plugin.version>
    <maven-clean-plugin.version>3.5.0</maven-clean-plugin.version>
    <maven-compiler-plugin.version>3.14.1</maven-compiler-plugin.version>
    <maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
    <maven-failsafe-plugin.version>3.5.4</maven-failsafe-plugin.version>
    <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
    <maven-install-plugin.version>3.1.4</maven-install-plugin.version>
    <maven-invoker-plugin.version>3.9.1</maven-invoker-plugin.version>
    <maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
    <maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
    <maven-release-plugin.version>3.1.1</maven-release-plugin.version>
    <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
    <maven-scm-plugin.version>2.2.1</maven-scm-plugin.version>
    <maven-shade-plugin.version>3.6.1</maven-shade-plugin.version>
    <maven-site-plugin.version>3.21.0</maven-site-plugin.version>
    <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
    <maven-surefire-plugin.version>3.5.4</maven-surefire-plugin.version>
    <maven-toolchains-plugin.version>3.2.0</maven-toolchains-plugin.version>
    <maven-war-plugin.version>3.4.0</maven-war-plugin.version>

    <script-maven-plugin.version>1.0.0</script-maven-plugin.version>

    <scalatest-maven-plugin.version>2.2.0</scalatest-maven-plugin.version>

    <build-helper-maven-plugin.version>3.6.1</build-helper-maven-plugin.version>
    <maven-replacer-plugin.version>1.4.1</maven-replacer-plugin.version>

    <cyclonedx-maven-plugin.version>2.9.1</cyclonedx-maven-plugin.version>

    <docker-maven-plugin.version>0.46.0</docker-maven-plugin.version>

    <spring-boot.version>3.5.6</spring-boot.version>
    <spring-boot-legacy.version>2.1.0.RELEASE</spring-boot-legacy.version>

    <springdoc.version>2.8.13</springdoc.version>

    <!-- See http://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html-->
    <jacoco.surefireArgLine />
    <argLine>@{jacoco.surefireArgLine} -Xmx2048m</argLine>

    <sonar-maven-plugin.version>5.2.0.4988</sonar-maven-plugin.version>
    <sonar.language>java</sonar.language>
    <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
    <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
    <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>

    <!-- For some parts the code coverage has been disabled because it is -->
    <!-- either debugging or demonstration code. -->
    <!-- Sonar does not look at the Jacoco configs so we need to duplicate these -->
    <!-- rules here a second time. -->
    <!-- This is NASTY! -->
    <sonar.exclusions>
      <!-- src/main/java/nl/basjes/parse/useragent/Version.*,-->
      <!-- src/main/java/nl/basjes/parse/useragent/parser/**,-->
      analyzer/src/main/java/nl/basjes/parse/useragent/debug/**,
      benchmarks/src/main/java/nl/basjes/parse/useragent/benchmarks/**,
      webapp/src/main/java/nl/basjes/parse/useragent/servlet/**,
      commandline/src/main/java/nl/basjes/parse/useragent/commandline/**,
      udfs/drill/function/src/main/java/nl/basjes/parse/useragent/drill/**,
    </sonar.exclusions>

    <!-- Disabled for now because it gives problems quite often while downloading the CVE databases. -->
    <dependency-check.skip>true</dependency-check.skip>

    <git-commit-id-maven-plugin.version>9.0.2</git-commit-id-maven-plugin.version>
    <version.copyright>Copyright (C) 2013-2025 Niels Basjes</version.copyright>
    <version.license>License Apache 2.0</version.license>
    <version.url>${project.url}</version.url>

    <!-- By default we disable anything requiring docker and reenable it if docker is present. -->
    <docker.skip>true</docker.skip>
    <docker-based-tests.skip>true</docker-based-tests.skip>

    <docker-based-package.phase>package</docker-based-package.phase>

    <WerrorFlag>-Werror</WerrorFlag>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit5.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${jackson.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-bom</artifactId>
        <version>${log4j2.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest-core</artifactId>
        </exclusion>
      </exclusions>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <version>${hamcrest-core.version}</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <profiles>

    <!-- From https://www.dontpanicblog.co.uk/2017/02/28/activate-the-maven-docker-plugin/ -->
    <profile>
      <id>Docker enabled for linux</id>
      <properties>
        <docker.skip>false</docker.skip>
        <docker-based-tests.skip>false</docker-based-tests.skip>
      </properties>
      <activation>
        <!-- Activate on Linux systems. Assume presence of docker.pid file indicates Docker is available -->
        <file>
          <exists>/var/run/docker.pid</exists>
        </file>
      </activation>
    </profile>

    <profile>
      <id>Docker enabled for Windows 10 native</id>
      <properties>
        <docker.skip>false</docker.skip>
        <docker-based-tests.skip>false</docker-based-tests.skip>
      </properties>
      <activation>
        <!-- Activate on Windows 10 systems with native Docker. Check for docker.exe in default install directory -->
        <file>
          <exists>C:\Program Files\Docker\Docker\resources\bin\docker.exe</exists>
        </file>
      </activation>
    </profile>

    <profile>
      <id>Docker enabled for Windows 10 toolbox</id>
      <properties>
        <docker.skip>false</docker.skip>
        <docker-based-tests.skip>false</docker-based-tests.skip>
      </properties>
      <activation>
        <!-- Activate on Windows (Docker Toolbox) systems. Assume presence of DOCKER_HOST indicates Docker is available -->
        <property>
          <name>env.DOCKER_HOST</name>
        </property>
      </activation>
    </profile>

    <!-- Some targets require something from the docker hub to complete.                -->
    <!-- In CI systems pulling from the docker hub randomly fails with                  -->
    <!--    Unable to pull 'openjdk:8-jdk-alpine' : toomanyrequests:                    -->
    <!--    You have reached your pull rate limit. You may increase the limit           -->
    <!--    by authenticating and upgrading: https://www.docker.com/increase-rate-limit -->
    <profile>
      <id>disableDockerHubUsages</id>
      <properties>
        <docker-based-package.phase>none</docker-based-package.phase>
        <docker-based-tests.skip>true</docker-based-tests.skip>
      </properties>
    </profile>

    <profile>
      <id>skipQuality</id>
      <properties>
        <skipTests>true</skipTests>
        <sonar.skip>true</sonar.skip>
        <rat.skip>true</rat.skip>
        <checkstyle.skip>true</checkstyle.skip>
        <jacoco.skip>true</jacoco.skip>
        <spotbugs.skip>true</spotbugs.skip>
        <dependency-check.skip>true</dependency-check.skip>
        <dependency-convergence.phase>none</dependency-convergence.phase>
        <docker-based-tests.skip>true</docker-based-tests.skip>
        <invoker.skip>true</invoker.skip>
        <cyclonedx.skip>true</cyclonedx.skip>
        <gpg.skip>true</gpg.skip>
        <maven.build.cache.skipCache>true</maven.build.cache.skipCache>
      </properties>
    </profile>

    <profile>
      <id>artifactCompare</id>
      <properties>
        <maven.build.cache.enabled>false</maven.build.cache.enabled>
      </properties>
      <build>
        <defaultGoal>clean verify</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-artifact-plugin</artifactId>
            <executions>
              <execution>
                <id>compare</id>
                <goals>
                  <goal>compare</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>prepareRelease</id>
      <properties>
        <maven.build.cache.enabled>false</maven.build.cache.enabled>
      </properties>
    </profile>

    <profile>
      <id>packageForRelease</id>
      <properties>
        <maven.build.cache.enabled>false</maven.build.cache.enabled>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-artifact-plugin</artifactId>
            <executions>
              <execution>
                <id>Ensure plugins are reproducible</id>
                <phase>validate</phase>
                <goals>
                  <goal>check-buildplan</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- https://central.sonatype.org/publish/publish-portal-maven/ -->
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.9.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>central</publishingServerId>
              <deploymentName>Yauaa ${project.version}</deploymentName>
<!--              <autoPublish>true</autoPublish>-->
<!--              <waitUntil>published</waitUntil>-->
              <waitUntil>validated</waitUntil>
              <excludeArtifacts>
                <!-- Testing and benchmarking -->
                <excludeArtifact>yauaa-devtools</excludeArtifact>
                <excludeArtifact>yauaa-devtools-es-loader</excludeArtifact>
                <excludeArtifact>yauaa-log2test</excludeArtifact>
                <excludeArtifact>yauaa-benchmark</excludeArtifact>
                <!-- Documentation -->
                <excludeArtifact>yauaa-documentation</excludeArtifact>
                <!-- Specific UDF parts -->
                <excludeArtifact>yauaa-nifi-processors</excludeArtifact>
                <excludeArtifact>yauaa-elastic-udfs-parent</excludeArtifact>
                <excludeArtifact>yauaa-elasticsearch</excludeArtifact>
                <excludeArtifact>yauaa-elasticsearch-8</excludeArtifact>
                <excludeArtifact>yauaa-elasticsearch-9</excludeArtifact>
              </excludeArtifacts>
            </configuration>
          </plugin>

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

    <profile>
      <id>SkipSonarBecauseItWasNotConfigured</id>
      <activation>
        <property>
          <name>!env.SONAR_TOKEN</name>
        </property>
      </activation>
      <properties>
        <sonar.skip>true</sonar.skip>
      </properties>
    </profile>

    <profile>
      <id>EnableThisWhenRunningInIntelliJIDEA</id>
      <!-- In Intellij IDEA I get consistent failures over                                   -->
      <!-- java: Field value processing of @ConfigurationProperty meta-data is not supported -->
      <!-- which fails the build because we do by default '-Werror'.                         -->
      <properties>
        <WerrorFlag />
      </properties>
    </profile>

  </profiles>

  <build>
    <defaultGoal>clean package</defaultGoal>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-toolchains-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>select-jdk-toolchain</goal>
            </goals>
            <configuration>
              <version>[21,22)</version>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>Check build environment requirements</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>[21,22)</version>
                  <message>To ensure the build being reproducible the code MUST be built with Java JDK 21 (detected: JDK ${java.version}).</message>
                </requireJavaVersion>
                <requireMavenVersion>
                  <version>[${maven.minimal.version},)</version>
                  <message>You must use Maven version ${maven.minimal.version} or newer to build this project.</message>
                  <!-- Reasons for this need:                            -->
                  <!-- https://issues.apache.org/jira/browse/MDEPLOY-221 -->
                  <!-- https://issues.apache.org/jira/browse/MNG-6581    -->
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>

          <execution>
            <id>dependency-convergence</id>
            <phase>${dependency-convergence.phase}</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <dependencyConvergence />
              </rules>
            </configuration>
          </execution>

        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <compilerArgs>
            <!-- Enable almost all warnings.                                                                      -->
            <!-- Ignore 'classfile' to allow leaving Kryo out.                                                    -->
            <!-- Ignore 'processing' to avoid "No processor claimed any of these annotations" in several places.  -->
            <!-- Ignore 'serial' warnings about not having a serialVersionUID                                     -->
            <!-- Ignore 'path' warnings (some dependencies have a bad classpath in their MANIFEST.MF)             -->
            <!--   [WARNING] [path] bad path element                                                              -->
            <!--     "/home/nbasjes/.m2/repository/org/scala-lang/scala-compiler/2.12.7/scala-reflect.jar":       -->
            <!--     no such file or directory                                                                    -->
            <!--   https://stackoverflow.com/questions/41944939/maven-build-failure-involving-manifest-mf-classpath-in-dependency-jars  -->
            <!--   https://stackoverflow.com/questions/1344202/bad-path-warning-where-is-it-coming-from                                 -->
            <!-- Ignore 'options' warnings about "[options] source/target value 8 is obsolete and will be removed in a future release"  -->
            <arg>-Xlint:all,-classfile,-processing,-serial,-path,-options</arg>
            <arg>${WerrorFlag}</arg>
            <arg>-implicit:class</arg>
          </compilerArgs>
          <showWarnings>true</showWarnings>
          <showDeprecation>true</showDeprecation>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
      </plugin>

      <plugin>
        <!-- Description: https://github.com/git-commit-id/git-commit-id-maven-plugin -->
        <groupId>io.github.git-commit-id</groupId>
        <artifactId>git-commit-id-maven-plugin</artifactId>
        <version>${git-commit-id-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>get-the-git-infos</id>
            <phase>validate</phase>
            <goals>
              <goal>revision</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <dateFormat>yyyy-MM-dd '@' HH:mm:ss z</dateFormat>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>${apache-rat-plugin.version}</version>
        <inherited>false</inherited>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <consoleOutput>true</consoleOutput>
          <excludeSubProjects>false</excludeSubProjects>
          <excludes>
            <!-- Build config files -->
            <exclude>.mvn/jvm.config</exclude>
            <!-- Version control files -->
            <exclude>**/.git/**</exclude>
            <exclude>**/.gitignore</exclude>
            <exclude>**/.gitmodules</exclude>
            <exclude>devtools/git-hooks/commit-msg.d/sailr.sh</exclude>
            <!-- IDE settings and files -->
            <exclude>**/.classpath</exclude>
            <exclude>**/.project</exclude>
            <exclude>**/.settings/**</exclude>
            <exclude>**/.idea/**</exclude>
            <exclude>**/*.iml</exclude>
            <exclude>**/.run/**</exclude>
            <exclude>**/*.patch</exclude>
            <exclude>**/*.diff</exclude>
            <!-- Documentation -->
            <exclude>documentation/**</exclude>
            <!-- Raw benchmark results -->
            <exclude>benchmarks/results/*.txt</exclude>
            <!-- Files that cannot be 'polluted' -->
            <exclude>.github/**</exclude>
            <exclude>**/*.json</exclude>
            <exclude>**/*.ndjson</exclude>
            <exclude>udfs/drill/src/main/resources/drill-module.conf</exclude>
            <exclude>devtools/analysis/.env</exclude>
            <exclude>**/testcases.txt</exclude>
            <exclude>analyzer/src/test/resources/YamlParsingTests/Empty.yaml</exclude>
            <!-- Files from external sources -->
            <exclude>**/analyzer/src/main/code-gen/UserAgents/AppleTypes/*.tmp</exclude>
            <exclude>**/analyzer/src/main/code-gen/UserAgents/ISOLanguageCode/*.tab</exclude>
            <exclude>**/analyzer/src/main/code-gen/UserAgents/ISOLanguageCode/*.csv</exclude>
            <exclude>**/analyzer/src/main/code-gen/UserAgents/ISOLanguageCode/*.md</exclude>
            <exclude>**/analyzer/src/main/code-gen/Antlr/PublicSuffix/public_suffix_list.dat</exclude>
            <exclude>**/analyzer/src/main/code-gen/Antlr/PublicSuffix/PublicSuffix.g4.fragment</exclude>
            <exclude>analyzer/src/main/code-gen/Antlr/PublicSuffix/tmp/*-public-suffix-list.txt</exclude>
            <exclude>analyzer/src/main/resources/mozilla-public-suffix-list.txt</exclude>
            <!-- Test and demo input files -->
            <exclude>**/testfiles/**</exclude>
            <exclude>**/*.log</exclude>
            <exclude>**/examples/**/*.jar</exclude>
            <!-- Files generated during build and/or development -->
            <exclude>**/target/**</exclude>
            <exclude>**/dependency-reduced-pom.xml</exclude>
            <exclude>**/gen/**</exclude> <!-- Generated by Antlr4 plugin -->
            <!-- Other files -->
            <exclude>ReleaseProcedure.txt</exclude>
            <exclude>benchmarks/*.txt</exclude>
            <exclude>benchmarks/*.csv</exclude>
            <exclude>analyzer/run-pitest.sh</exclude>
            <exclude>analyzer/pitest/</exclude>
            <exclude>**/.~lock.*</exclude>
            <exclude>docker/_m2/**</exclude>
            <exclude>docker/_gnupg/**</exclude>
            <!-- Test scripts -->
            <exclude>*.sh</exclude>
            <exclude>**/_*/**</exclude>
            <!-- Icon stuff in the demo webapp -->
            <exclude>webapp/src/main/**/*.json</exclude>
            <exclude>webapp/src/main/**/*.xml</exclude>
            <exclude>webapp/src/main/**/*.svg</exclude>
            <exclude>webapp/src/main/**/robots.txt</exclude>
            <exclude>webapp/README.md</exclude>
            <exclude>webapp/icon/**</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.owasp</groupId>
        <artifactId>dependency-check-maven</artifactId>
        <version>${dependency-check-maven.version}</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <failBuildOnCVSS>1</failBuildOnCVSS>
              <skipProvidedScope>true</skipProvidedScope>
              <skipRuntimeScope>true</skipRuntimeScope>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>nl.basjes.maven.release</groupId>
            <artifactId>conventional-commits-version-policy</artifactId>
            <version>1.0.8</version>
          </dependency>
        </dependencies>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>

          <scmCommentPrefix>Release:</scmCommentPrefix>
          <scmReleaseCommitComment>Release: Version @{releaseLabel}</scmReleaseCommitComment>
          <scmDevelopmentCommitComment>Release: Start development of next version</scmDevelopmentCommitComment>
          <scmRollbackCommitComment>Release: Rollback the release of @{releaseLabel}</scmRollbackCommitComment>

          <tagNameFormat>v@{project.version}</tagNameFormat>
          <projectVersionPolicyId>ConventionalCommitsVersionPolicy</projectVersionPolicyId>
          <projectVersionPolicyConfig>
            <versionTag>^v([0-9]+\.[0-9]+\.[0-9]+)$</versionTag>
          </projectVersionPolicyConfig>

          <preparationProfiles>Java24,prepareRelease,packageForRelease</preparationProfiles>
          <preparationGoals>clean verify</preparationGoals>
          <releaseProfiles>Java24,packageForRelease</releaseProfiles>
          <pushChanges>false</pushChanges>
          <remoteTagging>false</remoteTagging>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.cyclonedx</groupId>
        <artifactId>cyclonedx-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>makeAggregateBom</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${maven-checkstyle-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>nl.basjes.parse.useragent</groupId>
              <artifactId>yauaa-devtools</artifactId>
              <version>${project.version}</version>
            </dependency>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>${checkstyle.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <consoleOutput>true</consoleOutput>
            <configLocation>checkstyle/checkstyle.xml</configLocation>
            <suppressionsLocation>checkstyle/suppressions.xml</suppressionsLocation>
            <includeTestSourceDirectory>true</includeTestSourceDirectory>
          </configuration>
          <!-- Runs by default in the verify phase  (mvn verify or later in the build cycle)
               the 'check' goal will fail the build if it does not pass.  "mvn checkstyle:check"
               will do this alone, or "mvn checkstyle:checkstyle" will report but not break  -->
          <executions>
            <execution>
              <id>checkstyle-check</id>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <!-- Coverage analysis for tests -->
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco-maven-plugin.version}</version>
          <executions>
            <!--
                Prepares the property pointing to the JaCoCo runtime agent which
                is passed as VM argument when Maven the Surefire plugin is executed.
            -->
            <execution>
              <id>pre-unit-test</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
              <configuration>
                <!--
                    Sets the name of the property containing the settings
                    for JaCoCo runtime agent.
                -->
                <propertyName>jacoco.surefireArgLine</propertyName>
              </configuration>
            </execution>
            <!--
                Ensures that the code coverage report for unit tests is created after
                unit tests have been run.
            -->
            <execution>
              <id>post-unit-test</id>
              <phase>test</phase>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>${spotbugs-maven-plugin.version}</version>
          <configuration>
            <!-- FIXME: Spotbugs disabled because of inconsistent reports. -->
            <!--        Build from root: pass, Build from module: fail.    -->
            <skip>true</skip>
            <excludeFilterFile>spotbugs/spotbugs-exclude.xml</excludeFilterFile>
          </configuration>
          <dependencies>
            <!-- overwrite dependency on spotbugs if you want to specify the version of spotbugs -->
            <dependency>
              <groupId>com.github.spotbugs</groupId>
              <artifactId>spotbugs</artifactId>
              <version>${spotbugs.version}</version>
            </dependency>
            <dependency>
              <groupId>nl.basjes.parse.useragent</groupId>
              <artifactId>yauaa-devtools</artifactId>
              <version>${project.version}</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>validate bugs</id>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.sonarsource.scanner.maven</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>${sonar-maven-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.cyclonedx</groupId>
          <artifactId>cyclonedx-maven-plugin</artifactId>
          <version>${cyclonedx-maven-plugin.version}</version>
        </plugin>

        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-antrun-plugin</artifactId><version>${maven-antrun-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-assembly-plugin</artifactId><version>${maven-assembly-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-clean-plugin</artifactId><version>${maven-clean-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>${maven-compiler-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-enforcer-plugin</artifactId><version>${maven-enforcer-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-failsafe-plugin</artifactId><version>${maven-failsafe-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-gpg-plugin</artifactId><version>${maven-gpg-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-install-plugin</artifactId><version>${maven-install-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-invoker-plugin</artifactId><version>${maven-invoker-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-jar-plugin</artifactId><version>${maven-jar-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-javadoc-plugin</artifactId><version>${maven-javadoc-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-release-plugin</artifactId><version>${maven-release-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-resources-plugin</artifactId><version>${maven-resources-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-scm-plugin</artifactId><version>${maven-scm-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-shade-plugin</artifactId><version>${maven-shade-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-site-plugin</artifactId><version>${maven-site-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-source-plugin</artifactId><version>${maven-source-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-toolchains-plugin</artifactId><version>${maven-toolchains-plugin.version}</version></plugin>
        <plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-war-plugin</artifactId><version>${maven-war-plugin.version}</version></plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
          <configuration>
            <failIfNoTests>true</failIfNoTests>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-artifact-plugin</artifactId>
          <version>${maven-artifact-plugin.version}</version>
          <configuration>
            <skipModules>
              <!-- Testing and benchmarking -->
              <skipModule>nl.basjes.parse.useragent/yauaa-devtools</skipModule>
              <skipModule>nl.basjes.parse.useragent/yauaa-devtools-es-loader</skipModule>
              <skipModule>nl.basjes.parse.useragent/yauaa-log2test</skipModule>
              <skipModule>nl.basjes.parse.useragent/yauaa-benchmark</skipModule>
              <!-- Documentation -->
              <skipModule>nl.basjes.parse.useragent/yauaa-documentation</skipModule>
              <!-- Specific UDF parts -->
              <skipModule>nl.basjes.parse.useragent/yauaa-nifi-processors</skipModule>
              <skipModule>nl.basjes.parse.useragent/yauaa-elastic-udfs-parent</skipModule>
              <skipModule>nl.basjes.parse.useragent/yauaa-elasticsearch</skipModule>
              <skipModule>nl.basjes.parse.useragent/yauaa-elasticsearch-8</skipModule>
              <skipModule>nl.basjes.parse.useragent/yauaa-elasticsearch-9</skipModule>
            </skipModules>
          </configuration>
        </plugin>

        <plugin><groupId>org.codehaus.mojo</groupId><artifactId>build-helper-maven-plugin</artifactId><version>${build-helper-maven-plugin.version}</version></plugin>
        <plugin><groupId>org.codehaus.mojo</groupId><artifactId>exec-maven-plugin</artifactId><version>${exec-maven-plugin.version}</version></plugin>
        <plugin><groupId>com.google.code.maven-replacer-plugin</groupId><artifactId>maven-replacer-plugin</artifactId><version>${maven-replacer-plugin.version}</version></plugin>
        <plugin><groupId>com.alexecollins.maven.plugin</groupId><artifactId>script-maven-plugin</artifactId><version>${script-maven-plugin.version}</version></plugin>

        <plugin>
          <groupId>org.scalatest</groupId>
          <artifactId>scalatest-maven-plugin</artifactId>
          <version>${scalatest-maven-plugin.version}</version>
        </plugin>

      </plugins>
    </pluginManagement>
  </build>

  <modules>
    <module>devtools</module>
    <module>analyzer</module>
    <module>udfs</module>
    <module>webapp</module>
    <module>benchmarks</module>
    <module>documentation</module>

    <!-- Development only tools -->
    <module>devtools/log2test</module>
    <module>devtools/analysis/loader/</module>
  </modules>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Niels Basjes</name>
      <email>niels@basjes.nl</email>
      <roles>
        <role>Architect</role>
        <role>Developer</role>
      </roles>
      <timezone>Europe/Amsterdam</timezone>
    </developer>
  </developers>

  <scm>
    <url>https://github.com/nielsbasjes/yauaa</url>
    <connection>scm:git:https://github.com/nielsbasjes/yauaa.git</connection>
    <developerConnection>scm:git:file:///${project.basedir}</developerConnection>
    <tag>v7.32.0</tag>
  </scm>

</project>
