<?xml version="1.0"?>

<!--
  ~ Yet Another UserAgent Analyzer
  ~ Copyright (C) 2013-2021 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
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>

  <artifactId>yauaa-parent</artifactId>
  <packaging>pom</packaging>
  <groupId>nl.basjes.parse.useragent</groupId>
  <version>5.23</version>

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

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

  <properties>
    <target.java.version>1.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>

    <!-- 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.9.1</antlr.version>
    <snakeyaml.version>1.28</snakeyaml.version>

    <!-- ============================================== -->
    <!-- ================ UDF Versions ================ -->
    <!-- ============================================== -->
    <!-- Apache Flink -->
    <flink.version>1.12.1</flink.version>
    <flink.scala.version>2.12</flink.scala.version>

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

    <!-- Apache Drill -->
    <drill.version>1.18.0</drill.version>
    <netty.version>4.1.59.Final</netty.version>

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

    <!-- Apache Pig-->
    <pig.version>0.17.0</pig.version>

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

    <!-- Apache Nifi -->
    <nifi.version>1.13.0</nifi.version>
    <nifi-nar-maven-plugin.version>1.3.2</nifi-nar-maven-plugin.version>

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

    <!-- Elastic tools -->
    <elastic.version>7.11.1</elastic.version>
    <logstash.version>${elastic.version}</logstash.version>
    <elasticsearch.version>${elastic.version}</elasticsearch.version>

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

    <depencency-convergence.phase>validate</depencency-convergence.phase>
    <checkstyle-plugin.version>3.1.1</checkstyle-plugin.version>
    <checkstyle.version>8.40</checkstyle.version>
    <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
    <spotbugs.version>4.2.1</spotbugs.version>
    <slf4j.version>1.7.30</slf4j.version>
    <log4j2.version>2.14.0</log4j2.version>
    <kryo4.version>4.0.2</kryo4.version>  <!--  DO NOT UPGRADE: We test with Kryo 4.0.2 to ensure backwards compatibility. -->
    <kryo5.version>5.0.3</kryo5.version>
    <rat.version>0.13</rat.version>
    <jacoco.version>0.8.6</jacoco.version>
    <junit5.version>5.7.1</junit5.version>
    <hamcrest-core.version>2.2</hamcrest-core.version>

    <spring.version>5.3.4</spring.version>
    <spring-boot.version>2.4.3</spring-boot.version>
    <spring-boot-legacy.version>2.1.0.RELEASE</spring-boot-legacy.version>

    <springfox-swagger.version>3.0.0</springfox-swagger.version>

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

    <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-plugin.version>4.0.2</git-commit-id-plugin.version>
    <version.copyright>Copyright (C) 2013-2021 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>

  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit5.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </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>

    <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>
        <depencency-convergence.phase>none</depencency-convergence.phase>
        <docker-based-tests.skip>true</docker-based-tests.skip>
      </properties>
    </profile>

    <profile>
      <id>packageForRelease</id>
      <build>
        <plugins>

          <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>
              </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-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <!-- explicitly define maven-deploy-plugin after other to force exec order -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <executions>
              <execution>
                <id>default-deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <!-- Description: https://github.com/ktoso/maven-git-commit-id-plugin -->
            <groupId>pl.project13.maven</groupId>
            <artifactId>git-commit-id-plugin</artifactId>
            <version>${git-commit-id-plugin.version}</version>
            <executions>
              <execution>
                <id>Validate-Revision-Information</id>
                <phase>validate</phase>
                <goals>
                  <goal>validateRevision</goal>
                </goals>
                <configuration>
                  <validationProperties>
                    <!-- verify that the current repository is not dirty -->
                    <validationProperty>
                      <name>Don't try to release if something has not yet been committed.</name>
                      <value>${git.dirty}</value>
                      <shouldMatchTo>false</shouldMatchTo>
                    </validationProperty>
                  </validationProperties>
                  <validationShouldFailIfNoMatch>true</validationShouldFailIfNoMatch>
                </configuration>
              </execution>
            </executions>
          </plugin>

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

    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <!-- Description: https://github.com/ktoso/maven-git-commit-id-plugin -->
            <groupId>pl.project13.maven</groupId>
            <artifactId>git-commit-id-plugin</artifactId>
            <version>${git-commit-id-plugin.version}</version>
            <executions>
              <execution>
                <id>Validate-Revision-Information</id>
                <phase>validate</phase>
                <goals>
                  <goal>validateRevision</goal>
                </goals>
                <configuration>
                  <validationProperties>
                    <!-- verify that the current repository is not dirty -->
                    <validationProperty>
                      <name>Don't try to release if something has not yet been committed.</name>
                      <value>${git.dirty}</value>
                      <shouldMatchTo>false</shouldMatchTo>
                    </validationProperty>
                    <!-- verify that the current commit has a tag -->
                    <validationProperty>
                      <name>validating current commit has a tag</name>
                      <value>${git.closest.tag.commit.count}</value>
                      <shouldMatchTo>0</shouldMatchTo>
                    </validationProperty>
                  </validationProperties>
                  <validationShouldFailIfNoMatch>true</validationShouldFailIfNoMatch>
                </configuration>
              </execution>
            </executions>
          </plugin>

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

    <profile>
      <id>deployToSonatype</id>
      <properties>
        <altReleaseDeploymentRepository>sonatype::https://oss.sonatype.org/service/local/staging/deploy/maven2/</altReleaseDeploymentRepository>
        <altSnapshotDeploymentRepository>sonatype::https://oss.sonatype.org/content/repositories/snapshots</altSnapshotDeploymentRepository>
      </properties>
    </profile>

    <profile>
      <id>EnableReportPlugins</id>
      <activation>
        <property>
          <name>EnableReportPlugins</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.eluder.coveralls</groupId>
            <artifactId>coveralls-maven-plugin</artifactId>
            <version>4.3.0</version>
            <configuration>
              <timestampFormat>EpochMillis</timestampFormat>
            </configuration>
            <dependencies>
              <!-- Explicit dep on jaxb-api to avoid problems with
                JDK9 and later, until a new version of
                coveralls-maven-plugin is released.
                See also https://github.com/trautonen/coveralls-maven-plugin/issues/112 -->
              <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>2.3.1</version>
              </dependency>
            </dependencies>
          </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>Build with JDK 8</id>
      <activation>
        <jdk>1.8</jdk>
      </activation>
      <properties>
        <!-- Sonar is no longer supported on Java 8                                -->
        <!-- https://sonarcloud.io/documentation/user-guide/move-analysis-java-11/ -->
        <sonar.skip>true</sonar.skip>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <compilerVersion>${target.java.version}</compilerVersion>
              <source>${target.java.version}</source>
              <target>${target.java.version}</target>
              <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 -->
                <arg>-Xlint:all,-classfile,-processing,-serial</arg>
                <arg>-Werror</arg>
              </compilerArgs>
              <showWarnings>true</showWarnings>
              <showDeprecation>true</showDeprecation>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>Build with JDK 11+</id>
      <activation>
        <jdk>[1.11,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <release>${target.java.release}</release>
              <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 -->
                <arg>-Xlint:all,-classfile,-processing,-serial</arg>
                <arg>-Werror</arg>
                <arg>-implicit:class</arg>
              </compilerArgs>
              <showWarnings>true</showWarnings>
              <showDeprecation>true</showDeprecation>
            </configuration>
          </plugin>

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

  </profiles>

  <build>
    <defaultGoal>clean package</defaultGoal>
    <plugins>
      <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>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
      </plugin>

      <plugin>
        <!-- Description: https://github.com/ktoso/maven-git-commit-id-plugin -->
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
        <version>${git-commit-id-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.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <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>${depencency-convergence.phase}</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <dependencyConvergence/>
              </rules>
            </configuration>
          </execution>

        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>${rat.version}</version>
        <inherited>false</inherited>
        <!-- https://issues.apache.org/jira/browse/RAT-158 -->
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-core</artifactId>
            <version>1.9.1</version>
            <exclusions>
              <exclusion>
                <groupId>xerces</groupId>
                <artifactId>xercesImpl</artifactId>
              </exclusion>
            </exclusions>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <consoleOutput>true</consoleOutput>
          <excludeSubProjects>false</excludeSubProjects>
          <excludes>
            <!-- Version control files -->
            <exclude>**/.git/**</exclude>
            <exclude>**/.gitignore</exclude>
            <!-- IDE settings and files -->
            <exclude>**/.classpath</exclude>
            <exclude>**/.project</exclude>
            <exclude>**/.settings/**</exclude>
            <exclude>**/.idea/**</exclude>
            <exclude>**/*.iml</exclude>
            <exclude>*.patch</exclude>
            <exclude>*.diff</exclude>
            <!-- Documentation -->
            <exclude>src/**</exclude>
            <exclude>docs/**</exclude>
            <!-- Raw benchmark results -->
            <exclude>benchmarks/results/*.txt</exclude>
            <!-- Files that cannot be 'polluted' -->
            <exclude>.github/**</exclude>
            <exclude>**/*.json</exclude>
            <exclude>udfs/drill/function/src/main/resources/drill-module.conf</exclude>
            <exclude>examples/pig/testcases.txt</exclude>
            <exclude>**/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor</exclude>
            <exclude>analyzer/src/test/resources/YamlParsingTests/Empty.yaml</exclude>
            <!-- Files from external sources -->
            <exclude>**/analyzer/src/main/code-gen/UserAgents/AppleTypes/*.csv</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>
            <!-- Test and demo input files -->
            <exclude>**/testfiles/**</exclude>
            <exclude>**/*.log</exclude>
            <exclude>**/examples/**/*.jar</exclude>
            <exclude>**/udfs/logstash/manualtest/__testrun/**</exclude>
            <!-- File generated during build -->
            <exclude>**/target/**</exclude>
            <exclude>**/dependency-reduced-pom.xml</exclude>
            <!-- 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>6.0.2</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>

    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${checkstyle-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>nl.basjes.parse.useragent</groupId>
              <artifactId>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.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>
            <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>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>3.7.0.1746</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>

        <plugin><artifactId>maven-antrun-plugin</artifactId><version>3.0.0</version></plugin>
        <plugin><artifactId>maven-assembly-plugin</artifactId><version>3.3.0</version></plugin>
        <plugin><artifactId>maven-clean-plugin</artifactId><version>3.1.0</version></plugin>
        <plugin><artifactId>maven-compiler-plugin</artifactId><version>3.8.1</version></plugin>
        <plugin><artifactId>maven-deploy-plugin</artifactId><version>3.0.0-M1</version></plugin>
        <plugin><artifactId>maven-enforcer-plugin</artifactId><version>3.0.0-M3</version></plugin>
        <plugin><artifactId>maven-install-plugin</artifactId><version>3.0.0-M1</version></plugin>
        <plugin><artifactId>maven-jar-plugin</artifactId><version>3.2.0</version></plugin>
        <plugin><artifactId>maven-javadoc-plugin</artifactId><version>3.2.0</version></plugin>
        <plugin><artifactId>maven-resources-plugin</artifactId><version>3.2.0</version></plugin>
        <plugin><artifactId>maven-shade-plugin</artifactId><version>3.2.4</version></plugin>
        <plugin><artifactId>maven-site-plugin</artifactId><version>3.9.1</version></plugin>
        <plugin><artifactId>maven-source-plugin</artifactId><version>3.2.1</version></plugin>
        <plugin><artifactId>maven-surefire-plugin</artifactId><version>3.0.0-M4</version></plugin>
        <plugin><artifactId>maven-failsafe-plugin</artifactId><version>3.0.0-M4</version></plugin>
        <plugin><artifactId>maven-war-plugin</artifactId><version>3.3.1</version></plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>2.8.1</version>
          <configuration>
            <rulesUri>classpath:///maven-version-rules.xml</rulesUri>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>nl.basjes.parse.useragent</groupId>
              <artifactId>devtools</artifactId>
              <version>${project.version}</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <modules>
    <module>devtools</module>
    <module>analyzer</module>
    <module>serialization</module>
    <module>udfs</module>
    <module>webapp</module>
    <module>commandline</module>
    <module>examples</module>
    <module>benchmarks</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://yauaa.basjes.nl</url>
    <connection>scm:git:https://github.com/nielsbasjes/yauaa.git</connection>
    <developerConnection>scm:git:.</developerConnection>
  </scm>

</project>
