<?xml version="1.0" encoding="UTF-8"?>
<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>
  <groupId>com.kohlschutter</groupId>
  <artifactId>kohlschutter-parent</artifactId>
  <!-- NOTE: When updating the version number, also change the property "kohlschutter.parent.version" below -->
  <version>1.4.2</version>
  <packaging>pom</packaging>
  <name>kohlschutter-parent</name>
  <inceptionYear>2014</inceptionYear>
  <description>The parent POM for Kohlschütter projects.</description>
  <url>https://github.com/kohlschutter/kohlschutter-parent</url>
  <organization>
    <name>Kohlschütter Search Intelligence</name>
    <url>https://www.kohlschutter.com/</url>
  </organization>
  <developers>
    <developer>
      <name>Christian Kohlschütter</name>
      <email>christian@kohlschutter.com</email>
    </developer>
  </developers>
  <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>
  <scm>
    <url>https://github.com/kohlschutter/kohlschutter-parent</url>
    <connection>scm:git:https://github.com/kohlschutter/kohlschutter-parent.git</connection>
    <developerConnection>scm:git:https://github.com/kohlschutter/kohlschutter-parent.git</developerConnection>
    <tag>HEAD</tag>
  </scm>
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/kohlschutter/kohlschutter-parent/issues</url>
  </issueManagement>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
    <file.encoding>UTF-8</file.encoding>
    <maven.compile.encoding>UTF-8</maven.compile.encoding>

    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>

    <!-- Projects must define the following property -->
    <kohlschutter.project.base.directory>${project.basedir}</kohlschutter.project.base.directory>
    <kohlschutter.parent.directory>${project.basedir}</kohlschutter.parent.directory>

    <kohlschutter.project.notice.file>${kohlschutter.project.base.directory}/NOTICE</kohlschutter.project.notice.file>

    <!-- Please keep this version in lockstep with the version declared above -->
    <kohlschutter.parent.version>1.4.2</kohlschutter.parent.version>
    <kohlschutter.maven.version.min>3.6.0</kohlschutter.maven.version.min>

    <coding.style.version>1.2.5</coding.style.version>
    <coding.style.dirname>coding-style/${coding.style.version}</coding.style.dirname>
    <coding.style.eclipse.dir>${kohlschutter.project.base.directory}/${coding.style.dirname}/eclipse</coding.style.eclipse.dir>
    <eclipse.jdt.core.prefs>${coding.style.eclipse.dir}/java7-strict-org.eclipse.jdt.core.prefs</eclipse.jdt.core.prefs>
    <eclipse.formatter.config>${coding.style.eclipse.dir}/eclipse-formatter-config.xml</eclipse.formatter.config>
    <eclipse.checkstyle.config>${coding.style.eclipse.dir}/checkstyle-configuration.xml</eclipse.checkstyle.config>

    <checkstyle.version>8.41.1</checkstyle.version>
    <checkstyle.disabled>false</checkstyle.disabled>
    <checkstyle.strict>false</checkstyle.strict>

    <spotbugs.exclude.file>${coding.style.eclipse.dir}/spotbugs-exclude.xml</spotbugs.exclude.file>
    <spotbugs.disabled>false</spotbugs.disabled>
    <spotbugs.strict>false</spotbugs.strict>

    <forbiddenapis.version>3.1</forbiddenapis.version>
    <forbiddenapis.strict>false</forbiddenapis.strict>

    <jacoco.disabled>false</jacoco.disabled>
    <jacoco.strict>false</jacoco.strict>
    <jacoco.coverage.min>0.0</jacoco.coverage.min>

    <javadoc.strict>false</javadoc.strict>

    <license.strict>false</license.strict>

    <pmd.strict>false</pmd.strict>

    <!-- Only upgrade to the latest version you can have in Eclipse, no later
      versions; otherwise, you may not be able to run checks in Eclipse -->
    <pmdVersion>6.36.0</pmdVersion>
  </properties>
  <profiles>
    <profile>
      <id>strict</id>
      <properties>
        <checkstyle.strict>true</checkstyle.strict>
        <spotbugs.strict>true</spotbugs.strict>
        <forbiddenapis.strict>true</forbiddenapis.strict>
        <jacoco.strict>true</jacoco.strict>
        <pmd.strict>true</pmd.strict>
        <license.strict>true</license.strict>
        <javadoc.strict>true</javadoc.strict>
      </properties>
    </profile>
    <profile>
      <!-- Reuse the project's README.md as the site's index.html file -->
      <id>copy-README-to-site</id>
      <activation>
        <file>
          <exists>${basedir}/README.md</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.coderplus.maven.plugins</groupId>
            <artifactId>copy-rename-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>copy-readme</id>
                <phase>pre-site</phase>
                <goals>
                  <goal>copy</goal>
                </goals>
                <configuration>
                  <overWrite>true</overWrite>
                  <sourceFile>${basedir}/README.md</sourceFile>
                  <destinationFile>${project.build.directory}/generated-site/markdown/index.md</destinationFile>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>echoproperties</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <phase>validate</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target>
                    <echoproperties />
                  </target>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>eclipse</id>
      <activation>
        <property>
          <name>m2e.version</name>
        </property>
      </activation>
      <properties>
        <!-- Ignore Eclipse's nar-maven-plugin integration -->
        <nar.skip>true</nar.skip>
      </properties>
      <build>
        <directory>target-eclipse</directory>
      </build>
    </profile>
    <profile>
      <id>eclipse-m2e</id>
      <activation>
        <property>
          <name>m2e.version</name>
        </property>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <!--This plugin's configuration is used to store Eclipse m2e
                settings only. It has no influence on the Maven build itself. -->
              <groupId>org.eclipse.m2e</groupId>
              <artifactId>lifecycle-mapping</artifactId>
              <version>1.0.0</version>
              <configuration>
                <lifecycleMappingMetadata>
                  <pluginExecutions>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <versionRange>[2.9,)</versionRange>
                        <goals>
                          <goal>unpack</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <ignore />
                      </action>
                    </pluginExecution>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>de.thetaphi</groupId>
                        <artifactId>forbiddenapis</artifactId>
                        <versionRange>[1.7,)</versionRange>
                        <goals>
                          <goal>check</goal>
                          <goal>testCheck</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <ignore></ignore>
                      </action>
                    </pluginExecution>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <versionRange>[3.0.0,)</versionRange>
                        <goals>
                          <goal>check</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <ignore></ignore>
                      </action>
                    </pluginExecution>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <versionRange>[1.7,)</versionRange>
                        <goals>
                          <goal>run</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <ignore></ignore>
                      </action>
                    </pluginExecution>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <versionRange>[3.1.0,)</versionRange>
                        <goals>
                          <goal>install</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <ignore></ignore>
                      </action>
                    </pluginExecution>
                  </pluginExecutions>
                </lifecycleMappingMetadata>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>debug-info</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <phase>validate</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target>
                    <echoproperties />
                  </target>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>signed</id>
      <build>
        <plugins>
          <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>
                  <useAgent>true</useAgent>
                  <keyname>${gpgkeyname}</keyname>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- BEGIN: coding-style specific profiles -->
    <!-- Unless you have the "coding-style" project in your eclipse workspace,
      we will download and unpack that artifact's contents to the top-level
      project.
      All Eclipse-specific formatting files will be in the "eclipse" directory. -->
    <profile>
      <id>coding-style-unpack</id>
      <activation>
        <file>
          <missing>${kohlschutter.project.base.directory}/${coding.style.dirname}/eclipse/eclipse-formatter-config.xml</missing>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>unpack-coding-style</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>unpack</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>com.kohlschutter</groupId>
                      <artifactId>coding-style</artifactId>
                      <version>${coding.style.version}</version>
                      <classifier>files</classifier>
                      <type>zip</type>
                      <outputDirectory>${kohlschutter.project.base.directory}/${coding.style.dirname}/</outputDirectory>
                    </artifactItem>
                  </artifactItems>
                  <skip>${coding.style.skip.unpack}</skip>
                  <verbose>true</verbose>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>coding-style-in-project</id>
      <activation>
        <file>
          <exists>${basedir}/${coding.style.dirname}/eclipse/eclipse-formatter-config.xml</exists>
        </file>
      </activation>
      <properties>
        <coding.style.skip.unpack>true</coding.style.skip.unpack>
        <coding.style.eclipse.dir>${kohlschutter.project.base.directory}/${coding.style.dirname}/eclipse</coding.style.eclipse.dir>
        <eclipse.jdt.core.prefs>${coding.style.eclipse.dir}/java7-strict-org.eclipse.jdt.core.prefs</eclipse.jdt.core.prefs>
        <eclipse.formatter.config>${coding.style.eclipse.dir}/eclipse-formatter-config.xml</eclipse.formatter.config>
        <eclipse.checkstyle.config>${coding.style.eclipse.dir}/checkstyle-configuration.xml</eclipse.checkstyle.config>
      </properties>
    </profile>
    <profile>
      <id>coding-style-in-workspace-parent1</id>
      <activation>
        <file>
          <exists>${basedir}/../coding-style/eclipse/eclipse-formatter-config.xml</exists>
        </file>
      </activation>
      <properties>
        <coding.style.skip.unpack>true</coding.style.skip.unpack>
        <coding.style.eclipse.dir>${basedir}/../coding-style/eclipse</coding.style.eclipse.dir>
        <eclipse.jdt.core.prefs>${coding.style.eclipse.dir}/java7-strict-org.eclipse.jdt.core.prefs</eclipse.jdt.core.prefs>
        <eclipse.formatter.config>${coding.style.eclipse.dir}/eclipse-formatter-config.xml</eclipse.formatter.config>
        <eclipse.checkstyle.config>${coding.style.eclipse.dir}/checkstyle-configuration.xml</eclipse.checkstyle.config>
      </properties>
    </profile>
    <profile>
      <id>coding-style-in-workspace-parent2</id>
      <activation>
        <file>
          <exists>${basedir}/../../coding-style/eclipse/eclipse-formatter-config.xml</exists>
        </file>
      </activation>
      <properties>
        <coding.style.skip.unpack>true</coding.style.skip.unpack>
        <coding.style.eclipse.dir>${basedir}/../../coding-style/eclipse</coding.style.eclipse.dir>
        <eclipse.jdt.core.prefs>${coding.style.eclipse.dir}/java7-strict-org.eclipse.jdt.core.prefs</eclipse.jdt.core.prefs>
        <eclipse.formatter.config>${coding.style.eclipse.dir}/eclipse-formatter-config.xml</eclipse.formatter.config>
        <eclipse.checkstyle.config>${coding.style.eclipse.dir}/checkstyle-configuration.xml</eclipse.checkstyle.config>
      </properties>
    </profile>
    <profile>
      <id>eclipse-compiler-checks</id>
      <!-- invoke with: mvn clean integration-test -Peclipse-compiler-checks -->
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <compilerId>eclipse</compilerId>
              <compilerArguments>
                <!-- prefs should contain "org.eclipse.jdt.core.compiler.doc.comment.support=enabled" -->
                <properties>${eclipse.jdt.core.prefs}</properties>
              </compilerArguments>
              <fork>true</fork>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-compiler-eclipse</artifactId>
                <version>2.8.5</version>
                <exclusions>
                  <exclusion>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>org.eclipse.jdt.core</artifactId>
                  </exclusion>
                </exclusions>
              </dependency>
              <dependency>
                <groupId>org.eclipse.jdt</groupId>
                <artifactId>ecj</artifactId>
                <version>3.16.0</version>
              </dependency>
            </dependencies>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>enforce</id>
                <!-- Prevents installation of ECJ-compiled classes -->
                <goals>
                  <goal>enforce</goal>
                </goals>
                <phase>install</phase>
                <configuration>
                  <rules>
                    <AlwaysFail />
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- END: coding-style specific profiles -->

    <profile>
      <id>unit-tests</id>
      <activation>
        <property>
          <name>ignorant</name>
          <value>!true</value>
        </property>
        <file>
          <exists>src/test</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>default-prepare-agent</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
                <configuration>
                  <propertyName>surefireJacocoArgLine</propertyName>
                </configuration>
              </execution>
              <execution>
                <id>default-check</id>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <rules>
                    <rule>
                      <element>BUNDLE</element>
                      <limits>
                        <limit>
                          <counter>COMPLEXITY</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>${jacoco.coverage.min}</minimum>
                        </limit>
                      </limits>
                    </rule>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <argLine>${surefireJacocoArgLine} -Dfile.encoding=UTF-8
                -XX:+TieredCompilation -XX:TieredStopAtLevel=1</argLine>
            </configuration>
            <executions>
              <execution>
                <id>default-test</id>
                <phase>test</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <reporting>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <reportSets>
              <reportSet>
                <reports>
                  <report>report</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>
        </plugins>
      </reporting>
    </profile>

    <profile>
      <id>code-quality</id>
      <activation>
        <property>
          <name>ignorant</name>
          <value>!true</value>
        </property>
        <file>
          <exists>src/main/java</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-maven-plugin</artifactId>
            <configuration>
              <excludeFilterFile>${spotbugs.exclude.file}</excludeFilterFile>
            </configuration>
            <executions>
              <execution>
                <id>spotbugs-during-install</id>
                <phase>install</phase>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <skip>${spotbugs.disabled}</skip>
                  <failOnError>${spotbugs.strict}</failOnError>
                  <jvmArgs>-XX:+TieredCompilation
                    -XX:TieredStopAtLevel=1</jvmArgs>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>de.thetaphi</groupId>
            <artifactId>forbiddenapis</artifactId>
            <configuration>
              <!-- if the used Java version is too new, don't fail, just
                do nothing -->
              <failOnUnsupportedJava>false</failOnUnsupportedJava>
              <excludes>
                <exclude>**/module-info.class</exclude>
              </excludes>
              <bundledSignatures>
                <bundledSignature>jdk-unsafe</bundledSignature>
                <bundledSignature>jdk-deprecated</bundledSignature>
                <bundledSignature>jdk-non-portable</bundledSignature>
              </bundledSignatures>
              <!-- <signaturesFiles> <signaturesFile>./rel/path/to/signatures.txt</signaturesFile>
                </signaturesFiles> -->
            </configuration>
            <executions>
              <execution>
                <id>default</id>
                <goals>
                  <goal>check</goal>
                  <goal>testCheck</goal>
                </goals>
                <configuration>
                  <failOnViolation>${forbiddenapis.strict}</failOnViolation>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <executions>
              <execution>
                <id>checkstyle-during-compile</id>
                <phase>compile</phase>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <consoleOutput>true</consoleOutput>
                  <skip>${checkstyle.disabled}</skip>
                  <failOnViolation>${checkstyle.strict}</failOnViolation>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
            <configuration>
              <rulesets>
                <ruleset>${coding.style.eclipse.dir}/pmd-ruleset.xml</ruleset>
              </rulesets>
              <failOnViolation>${pmd.strict}</failOnViolation>
              <printFailingErrors>true</printFailingErrors>
            </configuration>
            <executions>
              <execution>
                <id>default-check</id>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
              <execution>
                <id>default-cpd-check</id>
                <goals>
                  <goal>cpd-check</goal>
                </goals>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>net.sourceforge.pmd</groupId>
                <artifactId>pmd-core</artifactId>
                <version>${pmdVersion}</version>
              </dependency>
              <dependency>
                <groupId>net.sourceforge.pmd</groupId>
                <artifactId>pmd-java</artifactId>
                <version>${pmdVersion}</version>
              </dependency>
              <dependency>
                <groupId>net.sourceforge.pmd</groupId>
                <artifactId>pmd-javascript</artifactId>
                <version>${pmdVersion}</version>
              </dependency>
              <dependency>
                <groupId>net.sourceforge.pmd</groupId>
                <artifactId>pmd-jsp</artifactId>
                <version>${pmdVersion}</version>
              </dependency>
            </dependencies>
          </plugin>
          <plugin>
            <!-- invoke with: mvn license:format -->
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <configuration>
              <header>${kohlschutter.project.notice.file}</header>
              <includes>
                <include>src/main/java/org/newsclub/**/*.java</include>
                <include>src/test/java/org/newsclub/**/*.java</include>
              </includes>
              <excludes>
                <exclude>**/package-info.java</exclude>
              </excludes>
              <failIfMissing>${license.strict}</failIfMissing>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <reporting>
        <plugins>
          <plugin>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-maven-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <reportSets>
              <reportSet>
                <reports>
                  <report>checkstyle</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>versions-maven-plugin</artifactId>
            <reportSets>
              <reportSet>
                <reports>
                  <report>dependency-updates-report</report>
                  <report>plugin-updates-report</report>
                  <report>property-updates-report</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>
        </plugins>
      </reporting>
    </profile>
    <profile>
      <id>documentation</id>
      <activation>
        <property>
          <name>ignorant</name>
          <value>!true</value>
        </property>
        <file>
          <exists>src/main/java</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <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>
        </plugins>
      </build>
      <reporting>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <reportSets>
              <reportSet>
                <id>aggregate</id>
                <inherited>false</inherited>
                <reports>
                  <report>aggregate</report>
                </reports>
              </reportSet>
              <reportSet>
                <id>default</id>
                <reports>
                  <report>javadoc</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>
        </plugins>
      </reporting>
    </profile>
    <profile>
      <id>sources</id>
      <activation>
        <property>
          <name>ignorant</name>
          <value>!true</value>
        </property>
        <file>
          <exists>src</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
            <inherited>true</inherited>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>false</autoReleaseAfterClose>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-scm-publish-plugin</artifactId>
            <configuration>
              <scmBranch>gh-pages</scmBranch>
              <pubScmUrl>${project.scm.developerConnection}</pubScmUrl>
              <checkinComment>Site checkin for ${project.version}</checkinComment>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <build>
    <plugins>
      <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>3.3.9</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
          <compilerArgs>
            <!-- Prevent recompilation due to "Stale source detected: .../package-info.java" -->
            <arg>-Xpkginfo:always</arg>
          </compilerArgs>
          <useIncrementalCompilation>false</useIncrementalCompilation>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <executions>
          <execution>
            <id>default-test</id>
            <phase>none</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- invoke with: mvn formatter:format -->
        <groupId>net.revelc.code.formatter</groupId>
        <artifactId>formatter-maven-plugin</artifactId>
        <version>2.8.1</version>
        <configuration>
          <compilerCompliance>${maven.compiler.target}</compilerCompliance>
          <compilerSource>${maven.compiler.source}</compilerSource>
          <compilerTargetPlatform>${maven.compiler.target}</compilerTargetPlatform>
          <lineEnding>LF</lineEnding>
          <configFile>${eclipse.formatter.config}</configFile>
          <overrideConfigCompilerVersion>true</overrideConfigCompilerVersion>
          <includes>
            <include>com/kohlschutter/**/*.java</include>
            <include>org/kohlschutter/**/*.java</include>
            <include>org/newsclub/**/*.java</include>
          </includes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <configuration>
          <generateBackupPoms>false</generateBackupPoms>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-scm-plugin</artifactId>
        <configuration>
          <tag>${project.artifactId}-${project.version}</tag>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>3.1.2</version>
          <dependencies>
            <dependency>
              <!-- We should use the same checkstyle version as in eclipse-cs -->
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>${checkstyle.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <configLocation>${eclipse.checkstyle.config}</configLocation>
            <violationSeverity>info</violationSeverity>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.9.1</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.skins</groupId>
              <artifactId>maven-fluido-skin</artifactId>
              <version>1.9</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>4.2.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.0.0-M3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.1.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.2.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.2.0</version>
          <configuration>
            <propertiesEncoding>UTF-8</propertiesEncoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>3.2.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <!-- https://bugs.openjdk.java.net/browse/JDK-8240169
            If you get an error like "The code being documented uses modules
            but the packages defined in ... are in the unnamed module", then
            update your Java SDK -->
          <version>3.2.0</version>
          <configuration>
            <detectOfflineLinks>false</detectOfflineLinks>
            <detectJavaApiLink>false</detectJavaApiLink>
            <quiet>true</quiet>
            <failOnWarnings>${javadoc.strict}</failOnWarnings>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.0.0-M5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.0.0-M1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.6</version>
        </plugin>
        <plugin>
          <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
          <artifactId>maven-java-formatter-plugin</artifactId>
          <version>0.4</version>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>4.0</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.8</version>
          <dependencies>
            <dependency>
              <groupId>org.sonatype.nexus</groupId>
              <artifactId>nexus-client-core</artifactId>
              <version>2.14.20-02</version>
            </dependency>
            <dependency>
              <groupId>com.thoughtworks.xstream</groupId>
              <artifactId>xstream</artifactId>
              <version>1.4.17</version>
            </dependency>
            <dependency><!-- needed by xstream 1.4.16 -->
              <groupId>xpp3</groupId>
              <artifactId>xpp3</artifactId>
              <version>1.1.4c</version>
            </dependency>
            <dependency>
              <groupId>org.apache.httpcomponents</groupId>
              <artifactId>httpclient</artifactId>
              <version>4.5.13</version>
            </dependency>
            <dependency>
              <groupId>org.apache.httpcomponents</groupId>
              <artifactId>httpcore</artifactId>
              <version>4.4.14</version>
            </dependency>
            <dependency>
              <groupId>ch.qos.logback</groupId>
              <artifactId>logback-classic</artifactId>
              <version>1.2.3</version>
            </dependency>
            <dependency>
              <groupId>ch.qos.logback</groupId>
              <artifactId>logback-core</artifactId>
              <version>1.2.3</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>2.8.1</version>
          <configuration>
            <generateBackupPoms>false</generateBackupPoms>
            <rulesUri>classpath:///com/kohlschutter/maven-version-rules.xml</rulesUri>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>com.kohlschutter</groupId>
              <artifactId>maven-plugin-config</artifactId>
              <version>${kohlschutter.parent.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.11.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.0.0-M1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>3.14.0</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.7</version>
          <configuration>
            <skip>${jacoco.disabled}</skip>
            <excludes>
              <!-- Do not instrument classes that are outside of our control -->
              <exclude>org/apache/maven/**</exclude>
              <exclude>org/junit/**</exclude>
              <exclude>org/apiguardian/**</exclude>
            </excludes>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.jacoco</groupId>
              <artifactId>org.jacoco.core</artifactId>
              <version>0.8.6</version>
            </dependency>
            <dependency><!-- Fix "Unsupported api 589824" error -->
              <groupId>org.apache.bcel</groupId>
              <artifactId>bcel</artifactId>
              <version>6.5.0</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>com.coderplus.maven.plugins</groupId>
          <artifactId>copy-rename-maven-plugin</artifactId>
          <version>1.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-publish-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.3.0</version>
        </plugin>
        <plugin>
          <groupId>de.thetaphi</groupId>
          <artifactId>forbiddenapis</artifactId>
          <version>${forbiddenapis.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.2.4</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.kohlschutter</groupId>
        <artifactId>compiler-annotations</artifactId>
        <version>${kohlschutter.parent.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.kohlschutter</groupId>
        <artifactId>kohlschutter-util</artifactId>
        <version>${kohlschutter.parent.version}</version>
      </dependency>
      <dependency>
        <groupId>com.kohlschutter</groupId>
        <artifactId>kohlschutter-test-util</artifactId>
        <version>${kohlschutter.parent.version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>5.7.1</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jdt</groupId>
        <artifactId>org.eclipse.jdt.annotation</artifactId>
        <version>2.2.600</version>
      </dependency>
    </dependencies>
  </dependencyManagement>


  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>3.1.1</version>
        <!--
          using "jxr-no-fork" prevents "module not found" errors:
          https://maven.apache.org/components/jxr-archives/jxr-LATEST/maven-jxr-plugin/examples/nofork.html

          Important: maxen-jxr-plugin 3.1.1 may not yet be in Maven Central;
          obtain from https://github.com/apache/maven-jxr
        -->
        <reportSets>
          <reportSet>
            <reports>
              <report>jxr-no-fork</report>
              <report>test-jxr-no-fork</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <modules>
    <module>maven-plugin-config</module>
    <module>kohlschutter-parent-multirelease</module>
    <module>compiler-annotations</module>
    <module>kohlschutter-util</module>
    <module>kohlschutter-test-util</module>
  </modules>
</project>
