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

  <modelVersion>4.0.0</modelVersion>

  <groupId>org.jenkins-ci</groupId>
  <artifactId>jenkins</artifactId>
  <version>1.131</version>
  <packaging>pom</packaging>

  <name>Jenkins Parent POM</name>
  <description>Standard Parent POM for non-plugin Jenkins components: core, libraries, etc.</description>
  <url>https://github.com/jenkinsci/pom</url>
  <inceptionYear>2004</inceptionYear>

  <mailingLists>
    <mailingList>
      <name>Jenkins advisories list</name>
      <subscribe>jenkinsci-advisories+subscribe@googlegroups.com</subscribe>
      <unsubscribe>jenkinsci-advisories+unsubscribe@googlegroups.com</unsubscribe>
      <archive>https://groups.google.com/g/jenkinsci-advisories</archive>
    </mailingList>
    <mailingList>
      <name>Jenkins developer discussion list</name>
      <subscribe>jenkinsci-dev+subscribe@googlegroups.com</subscribe>
      <unsubscribe>jenkinsci-dev+unsubscribe@googlegroups.com</unsubscribe>
      <post>jenkinsci-dev@googlegroups.com</post>
      <archive>https://groups.google.com/g/jenkinsci-dev</archive>
    </mailingList>
    <mailingList>
      <name>Jenkins user discussion list</name>
      <subscribe>jenkinsci-users+subscribe@googlegroups.com</subscribe>
      <unsubscribe>jenkinsci-users+unsubscribe@googlegroups.com</unsubscribe>
      <post>jenkinsci-users@googlegroups.com</post>
      <archive>https://groups.google.com/g/jenkinsci-users</archive>
    </mailingList>
  </mailingLists>

  <scm>
    <connection>scm:git:https://github.com/jenkinsci/pom.git</connection>
    <developerConnection>scm:git:git@github.com:jenkinsci/pom.git</developerConnection>
    <tag>jenkins-1.131</tag>
    <url>https://github.com/jenkinsci/pom</url>
  </scm>

  <issueManagement>
    <system>JIRA</system>
    <url>https://issues.jenkins.io</url>
  </issueManagement>

  <ciManagement>
    <system>Jenkins</system>
    <url>https://ci.jenkins.io</url>
  </ciManagement>

  <distributionManagement>
    <repository>
      <uniqueVersion>false</uniqueVersion>
      <id>maven.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/releases/</url>
    </repository>
    <snapshotRepository>
      <id>maven.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/snapshots/</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <maven.compiler.release>17</maven.compiler.release>
    <maven.compiler.testRelease>${maven.compiler.release}</maven.compiler.testRelease>
    <!-- Generate metadata for reflection on method parameters -->
    <maven.compiler.parameters>true</maven.compiler.parameters>

    <!--
      The following bug patterns are noisy and create little value; therefore, we suppress them
      globally.

      ConstructorThrow
        CT_CONSTRUCTOR_THROW
      FindReturnRef
        EI_EXPOSE_BUF2
        EI_EXPOSE_REP
        EI_EXPOSE_REP2
        EI_EXPOSE_STATIC_BUF2
        EI_EXPOSE_STATIC_REP2
        MS_EXPOSE_BUF
        MS_EXPOSE_REP
      MultipleInstantiationsOfSingletons
        SING_SINGLETON_GETTER_NOT_SYNCHRONIZED
        SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR
        SING_SINGLETON_IMPLEMENTS_CLONEABLE
        SING_SINGLETON_IMPLEMENTS_CLONE_METHOD
        SING_SINGLETON_IMPLEMENTS_SERIALIZABLE
        SING_SINGLETON_INDIRECTLY_IMPLEMENTS_CLONEABLE
      SharedVariableAtomicityDetector
        AT_NONATOMIC_64BIT_PRIMITIVE
        AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE
        AT_STALE_THREAD_WRITE_OF_PRIMITIVE
      ThrowingExceptions
        THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION
        THROWS_METHOD_THROWS_CLAUSE_THROWABLE
        THROWS_METHOD_THROWS_RUNTIMEEXCEPTION
    -->
    <spotbugs.omitVisitors>ConstructorThrow,FindReturnRef,MultipleInstantiationsOfSingletons,SharedVariableAtomicityDetector,ThrowingExceptions</spotbugs.omitVisitors>

    <!-- Set to false to enable Spotless -->
    <spotless.check.skip>true</spotless.check.skip>

    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <project.build.outputEncoding>UTF-8</project.build.outputEncoding>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <scmTag>HEAD</scmTag>

    <build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
    <buildnumber-maven-plugin.version>3.2.1</buildnumber-maven-plugin.version>
    <exec-maven-plugin.version>3.5.0</exec-maven-plugin.version>
    <hamcrest.version>3.0</hamcrest.version>
    <hpi-plugin.version>3.63</hpi-plugin.version>
    <incrementals-enforce-minimum.version>1.0-beta-4</incrementals-enforce-minimum.version>
    <incrementals-plugin.version>1.8</incrementals-plugin.version>
    <junit.version>5.12.1</junit.version>
    <license-maven-plugin.version>165.v7e11f4e4a_325</license-maven-plugin.version>
    <lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
    <localizer-maven-plugin.version>1.31</localizer-maven-plugin.version>
    <maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
    <maven-assembly-plugin.version>3.7.1</maven-assembly-plugin.version>
    <maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
    <maven-clean-plugin.version>3.4.1</maven-clean-plugin.version>
    <maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
    <maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
    <maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
    <maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
    <maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
    <maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
    <maven-help-plugin.version>3.5.1</maven-help-plugin.version>
    <maven-install-plugin.version>3.1.4</maven-install-plugin.version>
    <maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
    <maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
    <maven-project-info-reports-plugin.version>3.9.0</maven-project-info-reports-plugin.version>
    <maven-release-plugin.version>3.1.1</maven-release-plugin.version>
    <maven-remote-resources-plugin.version>3.3.0</maven-remote-resources-plugin.version>
    <maven-resources-plugin.version>3.3.1</maven-resources-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.3</maven-surefire-plugin.version>
    <maven-war-plugin.version>3.4.0</maven-war-plugin.version>
    <mockito.version>5.17.0</mockito.version>
    <spotbugs-annotations.version>4.9.3</spotbugs-annotations.version>
    <spotbugs-maven-plugin.version>4.9.3.0</spotbugs-maven-plugin.version>
    <spotless-maven-plugin.version>2.44.3</spotless-maven-plugin.version>
    <stapler-maven-plugin.version>233.v9579d1a_8ea_28</stapler-maven-plugin.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-bom</artifactId>
        <version>${mockito.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-annotations</artifactId>
        <version>${spotbugs-annotations.version}</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest</artifactId>
        <version>${hamcrest.version}</version>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-core</artifactId>
        <version>${hamcrest.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jenkins-ci</groupId>
        <artifactId>test-annotations</artifactId>
        <version>1.5</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <repositories>
    <repository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>repo.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/public/</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>repo.jenkins-ci.org</id>
      <url>https://repo.jenkins-ci.org/public/</url>
    </pluginRepository>
  </pluginRepositories>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>io.jenkins.tools.maven</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>${license-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>com.diffplug.spotless</groupId>
          <artifactId>spotless-maven-plugin</artifactId>
          <version>${spotless-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>${spotbugs-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>io.jenkins.tools.incrementals</groupId>
          <artifactId>incrementals-maven-plugin</artifactId>
          <version>${incrementals-plugin.version}</version>
          <configuration>
            <includes>
              <include>org.jenkins-ci.*</include>
              <include>io.jenkins.*</include>
            </includes>
            <generateBackupPoms>false</generateBackupPoms>
            <updateNonincremental>false</updateNonincremental>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>${maven-antrun-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${maven-assembly-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${maven-checkstyle-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${maven-clean-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${maven-dependency-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven-deploy-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-eclipse-plugin</artifactId>
          <version>${maven-eclipse-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${maven-enforcer-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${maven-gpg-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-help-plugin</artifactId>
          <version>${maven-help-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>${maven-install-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
          <configuration>
            <doclint>all,-missing</doclint>
            <locale>en_US</locale>
            <notimestamp>true</notimestamp>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>${maven-project-info-reports-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>${maven-release-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-remote-resources-plugin</artifactId>
          <version>${maven-remote-resources-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven-resources-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>${maven-site-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>${maven-war-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>${build-helper-maven-plugin.version}</version>
          <executions>
            <execution>
              <id>add-source</id>
              <goals>
                <goal>add-source</goal>
              </goals>
              <phase>generate-sources</phase>
              <configuration>
                <sources>
                  <source>${project.build.directory}/generated-sources/localizer</source>
                </sources>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>buildnumber-maven-plugin</artifactId>
          <version>${buildnumber-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>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>${lifecycle-mapping.version}</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <versionRange>${maven-enforcer-plugin.version}</versionRange>
                    <goals>
                      <goal>display-info</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <versionRange>${maven-enforcer-plugin.version}</versionRange>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-remote-resources-plugin</artifactId>
                    <versionRange>${maven-remote-resources-plugin.version}</versionRange>
                    <goals>
                      <goal>process</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <versionRange>${maven-war-plugin.version}</versionRange>
                    <goals>
                      <goal>exploded</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <versionRange>${build-helper-maven-plugin.version}</versionRange>
                    <goals>
                      <goal>regex-property</goal>
                      <goal>timestamp-property</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>com.infradna.tool</groupId>
                    <artifactId>bridge-method-injector</artifactId>
                    <versionRange>[1.4,)</versionRange>
                    <goals>
                      <goal>process</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <versionRange>[2.3,)</versionRange>
                    <goals>
                      <goal>copy</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.kohsuke</groupId>
                    <artifactId>access-modifier-checker</artifactId>
                    <versionRange>[1.0,)</versionRange>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.jvnet.hudson.tools</groupId>
                    <artifactId>maven-encoding-plugin</artifactId>
                    <versionRange>[1.1,)</versionRange>
                    <goals>
                      <goal>check-encoding</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.antlr</groupId>
                    <artifactId>antlr4-maven-plugin</artifactId>
                    <versionRange>[4.11,)</versionRange>
                    <goals>
                      <goal>antlr4</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.jvnet.localizer</groupId>
                    <artifactId>localizer-maven-plugin</artifactId>
                    <versionRange>[1.28,)</versionRange>
                    <goals>
                      <goal>generate</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.jenkins-ci.tools</groupId>
                    <artifactId>maven-hpi-plugin</artifactId>
                    <versionRange>[1.74,)</versionRange>
                    <goals>
                      <goal>generate-taglib-interface</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jenkins-ci.tools</groupId>
          <artifactId>maven-hpi-plugin</artifactId>
          <version>${hpi-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.jvnet.localizer</groupId>
          <artifactId>localizer-maven-plugin</artifactId>
          <version>${localizer-maven-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>io.jenkins.tools.maven</groupId>
          <artifactId>stapler-maven-plugin</artifactId>
          <version>${stapler-maven-plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <configuration>
          <doCheck>true</doCheck>
          <failTheBuild>false</failTheBuild>
          <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>create</goal>
            </goals>
            <phase>validate</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
            </manifest>
            <manifestEntries>
              <Implementation-Build>${buildNumber}</Implementation-Build>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
            <manifestEntries>
              <Implementation-Build>${buildNumber}</Implementation-Build>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <configuration>
          <plugins>
            <plugin>
              <groupId>com.h3xstream.findsecbugs</groupId>
              <artifactId>findsecbugs-plugin</artifactId>
              <version>1.13.0</version>
            </plugin>
          </plugins>
        </configuration>
        <executions>
          <execution>
            <id>spotbugs</id>
            <goals>
              <goal>check</goal>
            </goals>
            <phase>verify</phase>
            <!--
                Do not define "excludeFilterFile" here, as it will force consumers to provide a file.
                Instead, we configure this below in a profile conditionally activated based on the
                presence of this file.
            -->
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <configuration>
          <java>
            <endWithNewline />
            <importOrder />
            <indent>
              <spaces>true</spaces>
            </indent>
            <palantirJavaFormat />
            <removeUnusedImports />
            <trimTrailingWhitespace />
          </java>
          <pom>
            <sortPom>
              <expandEmptyElements>false</expandEmptyElements>
              <sortDependencies>scope,groupId,artifactId</sortDependencies>
              <sortDependencyExclusions>groupId,artifactId</sortDependencyExclusions>
              <spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
            </sortPom>
          </pom>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>extra-enforcer-rules</artifactId>
            <version>1.9.0</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>display-info</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>[3.9.6,)</version>
                  <message>3.9.6 to use Maven plugins using JDK17 bytecode.</message>
                </requireMavenVersion>
                <!-- TODO failing during incrementals deploy: MENFORCER-281
                <requirePluginVersions>
                  <banSnapshots>false</banSnapshots>
                </requirePluginVersions>
                -->
                <requireJavaVersion>
                  <version>[${maven.compiler.release},)</version>
                </requireJavaVersion>
                <bannedDependencies>
                  <excludes>
                    <exclude>javax.servlet:servlet-api</exclude>
                    <exclude>log4j:log4j</exclude>
                    <!-- CVE-2021-44228 -->
                    <exclude>org.apache.logging.log4j:*:(,2.15.0-rc1]</exclude>
                    <!-- The Jenkins test harness wreaks havoc in production, so ensure it is in test scope. -->
                    <exclude>org.jenkins-ci.main:jenkins-test-harness:*:jar:compile</exclude>
                    <!-- PowerMock has been abandoned and does not work on newer Java versions. -->
                    <exclude>org.powermock:powermock-api-easymock</exclude>
                    <exclude>org.powermock:powermock-api-mockito2</exclude>
                    <exclude>org.powermock:powermock-api-support</exclude>
                    <exclude>org.powermock:powermock-classloading-base</exclude>
                    <exclude>org.powermock:powermock-classloading-objenesis</exclude>
                    <exclude>org.powermock:powermock-classloading-xstream</exclude>
                    <exclude>org.powermock:powermock-core</exclude>
                    <exclude>org.powermock:powermock-module-javaagent</exclude>
                    <exclude>org.powermock:powermock-module-junit4</exclude>
                    <exclude>org.powermock:powermock-module-junit4-common</exclude>
                    <exclude>org.powermock:powermock-module-junit4-legacy</exclude>
                    <exclude>org.powermock:powermock-module-junit4-rule</exclude>
                    <exclude>org.powermock:powermock-module-junit4-rule-agent</exclude>
                    <exclude>org.powermock:powermock-module-testng</exclude>
                    <exclude>org.powermock:powermock-module-testng-agent</exclude>
                    <exclude>org.powermock:powermock-module-testng-common</exclude>
                  </excludes>
                </bannedDependencies>
                <requireUpperBoundDeps>
                  <excludes>
                    <exclude>com.google.code.findbugs:jsr305</exclude>
                  </excludes>
                </requireUpperBoundDeps>
                <enforceBytecodeVersion>
                  <maxJdkVersion>${maven.compiler.release}</maxJdkVersion>
                  <ignoredScopes>
                    <ignoredScope>test</ignoredScope>
                  </ignoredScopes>
                  <!-- To add exclusions in a child POM, use:
                  <plugin>
                      <artifactId>maven-enforcer-plugin</artifactId>
                      <executions>
                          <execution>
                              <id>display-info</id>
                              <configuration>
                                  <rules>
                                      <enforceBytecodeVersion>
                                          <excludes combine.children="append">
                                              <exclude>…</exclude>
                                          </excludes>
                                      </enforceBytecodeVersion>
                                  </rules>
                              </configuration>
                          </execution>
                      </executions>
                  </plugin>
                  -->
                </enforceBytecodeVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-eclipse-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <releaseProfiles>jenkins-release,!consume-incrementals</releaseProfiles>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>jenkins-release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>spotbugs-exclusion-file</id>
      <activation>
        <file>
          <exists>${basedir}/src/spotbugs/excludesFilter.xml</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>spotbugs</id>
                <configuration>
                  <excludeFilterFile>${project.basedir}/src/spotbugs/excludesFilter.xml</excludeFilterFile>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>all-tests</id>
      <activation>
        <property>
          <name>!test</name>
        </property>
      </activation>
      <properties>
        <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
      </properties>
    </profile>
    <profile>
      <id>specific-test</id>
      <activation>
        <property>
          <name>test</name>
        </property>
      </activation>
      <properties>
        <surefire.failIfNoSpecifiedTests>false</surefire.failIfNoSpecifiedTests>
      </properties>
    </profile>
    <profile>
      <id>always-check-remote-repositories</id>
      <properties>
        <maven.repository.update.freqency>always</maven.repository.update.freqency>
      </properties>
    </profile>
    <profile>
      <!-- JEP-305 -->
      <id>consume-incrementals</id>
      <repositories>
        <repository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>incrementals</id>
          <url>https://repo.jenkins-ci.org/incrementals/</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>incrementals</id>
          <url>https://repo.jenkins-ci.org/incrementals/</url>
        </pluginRepository>
      </pluginRepositories>
    </profile>
    <profile>
      <id>might-produce-incrementals</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>flatten-maven-plugin</artifactId>
            <version>1.7.0</version>
            <configuration>
              <updatePomFile>true</updatePomFile>
            </configuration>
            <executions>
              <execution>
                <id>flatten</id>
                <goals>
                  <goal>flatten</goal>
                </goals>
                <phase>process-resources</phase>
                <configuration>
                  <flattenMode>oss</flattenMode>
                  <outputDirectory>${project.build.directory}</outputDirectory>
                  <flattenedPomFilename>${project.artifactId}-${project.version}.pom</flattenedPomFilename>
                  <!-- TODO https://github.com/mojohaus/flatten-maven-plugin/issues/362 -->
                  <pomElements>
                    <repositories>flatten</repositories>
                  </pomElements>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <dependencies>
              <dependency>
                <groupId>io.jenkins.tools.incrementals</groupId>
                <artifactId>incrementals-enforcer-rules</artifactId>
                <version>${incrementals-plugin.version}</version>
              </dependency>
            </dependencies>
            <executions>
              <execution>
                <id>display-info</id>
                <configuration>
                  <rules>
                    <requireExtensionVersion>
                      <version>[${incrementals-enforce-minimum.version},)</version>
                    </requireExtensionVersion>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
              <completionGoals>incrementals:reincrementalify</completionGoals>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>produce-incrementals</id>
      <activation>
        <property>
          <name>set.changelist</name>
          <value>true</value>
        </property>
      </activation>
      <distributionManagement>
        <repository>
          <id>incrementals</id>
          <url>https://repo.jenkins-ci.org/incrementals/</url>
        </repository>
      </distributionManagement>
      <build>
        <plugins>
          <!-- Copied from jenkins-release: -->
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- JEP-229 -->
      <id>block-MRP</id>
      <activation>
        <property>
          <name>changelist.format</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
              <preparationGoals>not-set-up-for-MRP</preparationGoals>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>annotation-processors</id>
      <activation>
        <jdk>[21,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <compilerArgs>
                <arg>-proc:full</arg>
              </compilerArgs>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!--  a profile that disables as much testing as possible whilst still producing the artifacts -->
      <id>quick-build</id>
      <properties>
        <!-- we can not use maven.test.skip because we may be producing a test jar -->
        <skipTests>true</skipTests>
        <spotbugs.skip>true</spotbugs.skip>
        <spotless.skip>true</spotless.skip>
        <enforcer.skip>true</enforcer.skip>
        <access-modifier-checker.skip>true</access-modifier-checker.skip>
        <invoker.skip>true</invoker.skip>
        <checkstyle.skip>true</checkstyle.skip>
        <yarn.lint.skip>true</yarn.lint.skip>
      </properties>
    </profile>
    <profile>
      <id>may-spotless-apply</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.diffplug.spotless</groupId>
            <artifactId>spotless-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>spotless-apply</id>
                <goals>
                  <goal>apply</goal>
                </goals>
                <phase>validate</phase>
                <configuration>
                  <skip>${spotless.check.skip}</skip>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
