jenkins/pom.xml

842 lines
37 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License
Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi, id:sorokh
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<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>
<parent>
<groupId>org.jenkins-ci</groupId>
<artifactId>jenkins</artifactId>
<version>1.71</version>
<relativePath />
</parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-parent</artifactId>
<version>${revision}${changelist}</version>
<packaging>pom</packaging>
<name>Jenkins main module</name>
<description>The module that constitutes the main jenkins.war</description>
<url>https://github.com/jenkinsci/jenkins</url>
<licenses>
<license>
<name>The MIT license</name>
<url>https://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
<modules>
<module>bom</module>
<module>core</module>
<module>war</module>
<module>test</module>
<module>cli</module>
</modules>
<scm>
<connection>scm:git:git://github.com/jenkinsci/jenkins.git</connection>
<developerConnection>scm:git:ssh://git@github.com/jenkinsci/jenkins.git</developerConnection>
<tag>${scmTag}</tag>
<url>https://github.com/jenkinsci/jenkins</url>
</scm>
<issueManagement>
<system>jira</system>
<url>https://issues.jenkins.io/browse/JENKINS/component/15593</url>
</issueManagement>
<properties>
<revision>2.338</revision>
<changelist>-SNAPSHOT</changelist>
<!-- *.html files are in UTF-8, and *.properties are in iso-8859-1, so this configuration is actually incorrect,
but this suppresses a warning from Maven, and as long as we don't do filtering we should be OK. -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- configuration for patch tracker plugin -->
<project.patchManagement.system>github</project.patchManagement.system>
<patch.request.organisation>jenkinsci</patch.request.organisation>
<patch.request.repository>jenkins</patch.request.repository>
<project.patchManagement.url>https://api.github.com</project.patchManagement.url>
<patch.tracker.serverId>jenkins-jira</patch.tracker.serverId>
<animal.sniffer.skip>${skipTests}</animal.sniffer.skip>
<java.level>8</java.level>
<changelog.url>https://www.jenkins.io/changelog</changelog.url>
<!-- Bundled Remoting version -->
<remoting.version>4.12</remoting.version>
<!-- Minimum Remoting version, which is tested for API compatibility -->
<remoting.minimum.supported.version>3.14</remoting.minimum.supported.version>
<spotbugs.effort>Max</spotbugs.effort>
<spotbugs.threshold>Medium</spotbugs.threshold>
<spotbugs.excludeFilterFile>${project.basedir}/../src/spotbugs/spotbugs-excludes.xml</spotbugs.excludeFilterFile>
<access-modifier.version>1.27</access-modifier.version>
<bridge-method-injector.version>1.23</bridge-method-injector.version>
<junit.jupiter.version>5.8.2</junit.jupiter.version>
<mockito.version>4.3.1</mockito.version>
<spotless.version>2.21.0</spotless.version>
</properties>
<dependencyManagement>
<!-- any dependencies that can be used by plugins must be defined in the bom and not here -->
<dependencies>
<dependency>
<!-- make sure these old servlet versions are never used by us or by any plugins which end up depending on this version -->
<!-- plugin-pom tries to fudge servlet support to be compatible with cores < 2.0 and JTH which needs 3.x for jetty, and ends up causing issues with some IDEs -->
<groupId>javax.servlet</groupId>
<!-- the old artifactID for the servlet API -->
<artifactId>servlet-api</artifactId>
<version>[0]</version>
<!--
"[0]" is a range that must be exactly 0
this is different to "0" which is hint to use version 0.
therefore unless anyone else uses ranges (they should not) this version will always win
We have deployed a version 0 to jenkins repo which has an empty jar
This prevents conflicts between the old Servet API and the new Servlet API as the groupIDs have changed
see https://github.com/jenkinsci/jenkins/pull/3033/files#r141325857 for a fuller description
-->
<scope>provided</scope>
<optional>true</optional>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<!-- make sure our dependency tree and all others are clean of the legacy servlet api. -->
<groupId>javax.servlet</groupId>
<!-- the old artifactID for the servlet API -->
<artifactId>servlet-api</artifactId>
</dependency>
</dependencies>
<!--
Note that the 'repositories' and 'pluginRepositories' blocks below are actually copy-pasted
from the Jenkins org pom. This is on purpose to keep Jenkins core buildable even if one has
*not* defined the specific details in the settings.xml file.
-->
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
<!-- allow snapshots -->
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
<build>
<defaultGoal>install</defaultGoal>
<resources>
<resource>
<filtering>false</filtering>
<directory>${basedir}/src/main/resources</directory>
</resource>
<resource>
<filtering>true</filtering>
<directory>${basedir}/src/filter/resources</directory>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<!-- Version specified in parent POM -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<!-- Version specified in parent POM -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<!-- Version specified in parent POM -->
<configuration>
<fork>true</fork>
<compilerReuseStrategy>alwaysNew</compilerReuseStrategy>
<compilerArgs>
<!--
always compile package-info.java for useIncrementalCompilation
ref: https://stackoverflow.com/questions/6770455/maven-compiling-package-info-java-to-package-info-class
-->
<compilerArg>-Xpkginfo:always</compilerArg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<!-- Version specified in parent POM -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<!-- Version specified in parent POM -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<!-- Version specified in parent POM -->
<configuration>
<quiet>true</quiet>
<doclint>all,-missing</doclint>
<splitindex>true</splitindex>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<!-- Version specified in parent POM -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<!-- Version specified in parent POM -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<!-- Version specified in parent POM -->
<configuration>
<systemPropertyVariables>
<java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
<forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
<java.awt.headless>true</java.awt.headless>
</systemPropertyVariables>
<!-- SUREFIRE-1226 workaround -->
<trimStackTrace>false</trimStackTrace>
<runOrder>alphabetical</runOrder>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<!-- Version specified in parent POM -->
</plugin>
<plugin>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<!--
during the development, debug profile will cause
the jars to be signed by a self-certified dummy public key.
For release, you should define the real values in ~/.m2/settings.xml
-->
<alias>${hudson.sign.alias}</alias>
<storepass>${hudson.sign.storepass}</storepass>
<keystore>${hudson.sign.keystore}</keystore>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<!-- Version specified in parent POM -->
</plugin>
<plugin>
<!--
Both test harness and core uses stapler as an extension,
and apparently without having extension preloaded at the parent, the main artifact of the 'test' module
ends up installed with 'stapler-jar' extension (which normally is an indication that the ArtifactTypeHandler
defined in this extension is not getting picked up.)
To avoid this problem, I'm defining an extension here. Not sure if the nested <dependencies> is necessary.
It's also possible that I misdiagnosed the problem and the root cause is something entirely different.
To test if you can remove this work around, do a rebuild from main and see if the test harness
is installed with the right extension into the local repository.
-->
<groupId>org.kohsuke.stapler</groupId>
<artifactId>maven-stapler-plugin</artifactId>
<!-- version specified in parent pom -->
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>org.jvnet.maven-jellydoc-plugin</groupId>
<artifactId>maven-jellydoc-plugin</artifactId>
<version>1.5</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.kohsuke</groupId>
<artifactId>access-modifier-checker</artifactId>
<version>${access-modifier.version}</version>
</plugin>
<plugin>
<groupId>com.cloudbees</groupId>
<artifactId>maven-license-plugin</artifactId>
<!-- Version specified in parent POM -->
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<phase>compile</phase>
<configuration>
<requireCompleteLicenseInfo>true</requireCompleteLicenseInfo>
<script>../licenseCompleter.groovy</script>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jvnet.localizer</groupId>
<artifactId>localizer-maven-plugin</artifactId>
<!-- Version specified in parent POM -->
<configuration>
<outputEncoding>UTF-8</outputEncoding>
</configuration>
</plugin>
<plugin>
<groupId>org.jvnet.hudson.tools</groupId>
<artifactId>maven-encoding-plugin</artifactId>
<version>1.1</version>
</plugin>
<plugin>
<groupId>com.infradna.tool</groupId>
<artifactId>bridge-method-injector</artifactId>
<version>${bridge-method-injector.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>antlr-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<!-- Version specified in parent POM -->
</plugin>
<plugin>
<groupId>org.jvnet.updatecenter2</groupId>
<artifactId>maven-makepkgs-plugin</artifactId>
<version>0.6.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<!-- Version specified in parent POM -->
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<!-- Version specified in parent POM -->
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<!-- Version specified in parent POM -->
<versionRange>[2.3,)</versionRange>
<goals>
<goal>list</goal>
<goal>unpack-dependencies</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<!-- Version specified in parent POM -->
<configuration>
<maxHeap>768</maxHeap>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<!-- Version specified in parent POM -->
<configuration>
<consoleOutput>true</consoleOutput>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<!-- define here because checkstyle and multi module is a PITA -->
<checkstyleRules>
<module name="Checker">
<module name="UniqueProperties" />
<module name="FileTabCharacter">
<property name="eachLine" value="true" />
</module>
<module name="LineLength">
<property name="fileExtensions" value="java" />
<property name="max" value="240" />
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://" />
</module>
<module name="TreeWalker">
<!--
Annotations: https://checkstyle.sourceforge.io/config_annotation.html
-->
<module name="AnnotationUseStyle" />
<module name="MissingDeprecated" />
<module name="MissingOverride" />
<!--
Class Design: https://checkstyle.sourceforge.io/config_design.html
-->
<module name="OneTopLevelClass" />
<!--
Coding: https://checkstyle.sourceforge.io/config_coding.html
-->
<module name="ArrayTrailingComma" />
<module name="AvoidNoArgumentSuperConstructorCall" />
<module name="CovariantEquals" />
<module name="DefaultComesLast" />
<module name="EqualsHashCode" />
<module name="MissingSwitchDefault" />
<module name="NoEnumTrailingComma" />
<module name="OneStatementPerLine" />
<module name="PackageDeclaration" />
<module name="RequireThis" />
<module name="SimplifyBooleanExpression" />
<module name="StringLiteralEquality" />
<module name="SuperClone" />
<module name="SuperFinalize" />
<module name="UnnecessarySemicolonAfterOuterTypeDeclaration" />
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration" />
<module name="UnnecessarySemicolonInEnumeration" />
<module name="UnnecessarySemicolonInTryWithResources" />
<module name="VariableDeclarationUsageDistance">
<property name="allowedDistance" value="10" />
</module>
<!--
Imports: https://checkstyle.sourceforge.io/config_imports.html
-->
<module name="AvoidStarImport" />
<module name="CustomImportOrder">
<property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE" />
<property name="sortImportsInGroupAlphabetically" value="true" />
<property name="separateLineBetweenGroups" value="true" />
</module>
<module name="IllegalImport">
<!-- prevent the use of jsr-305 annotations and Spring utilities -->
<property name="illegalClasses" value="javax.annotation.MatchesPattern.Checker, javax.annotation.Nonnegative.Checker, javax.annotation.Nonnull.Checker, javax.annotation.RegEx.Checker, javax.annotation.CheckForNull, javax.annotation.CheckForSigned, javax.annotation.CheckReturnValue, javax.annotation.Detainted, javax.annotation.MatchesPattern, javax.annotation.Nonnegative, javax.annotation.Nonnull, javax.annotation.Nullable, javax.annotation.OverridingMethodsMustInvokeSuper, javax.annotation.ParametersAreNonnullByDefault, javax.annotation.ParametersAreNullableByDefault, javax.annotation.PropertyKey, javax.annotation.RegEx, javax.annotation.Signed, javax.annotation.Syntax, javax.annotation.Tainted, javax.annotation.Untainted, javax.annotation.WillClose, javax.annotation.WillCloseWhenClosed, javax.annotation.WillNotClose, javax.annotation.concurrent.GuardedBy, javax.annotation.concurrent.Immutable, javax.annotation.concurrent.NotThreadSafe, javax.annotation.concurrent.ThreadSafe, javax.annotation.meta.TypeQualifierValidator, javax.annotation.meta.When, javax.annotation.meta.Exclusive, javax.annotation.meta.Exhaustive, javax.annotation.meta.TypeQualifier, javax.annotation.meta.TypeQualifierDefault, javax.annotation.meta.TypeQualifierNickname, org.springframework.util.Assert, org.springframework.util.StringUtils" />
<!-- Prevent the expansion of Guava usages and ban internal library packages -->
<property name="illegalPkgs" value="com.google.common.base, com.google.common.escape, com.google.common.eventbus, com.google.common.graph, com.google.common.hash, com.google.common.html, com.google.common.io, com.google.common.math, com.google.common.net, com.google.common.primitives, com.google.common.reflect, com.google.common.xml, com.google.thirdparty, jline.internal" />
</module>
<module name="RedundantImport" />
<module name="UnusedImports" />
<!--
Javadoc Comments: https://checkstyle.sourceforge.io/config_javadoc.html
-->
<module name="AtclauseOrder">
<property name="tagOrder" value="@param, @return, @throws, @deprecated" />
</module>
<module name="InvalidJavadocPosition" />
<module name="JavadocMethod">
<property name="allowedAnnotations" value="Override, Test" />
<property name="allowMissingParamTags" value="true" />
<property name="allowMissingReturnTag" value="true" />
</module>
<module name="JavadocMissingWhitespaceAfterAsterisk" />
<module name="NonEmptyAtclauseDescription" />
<!--
Miscellaneous: https://checkstyle.sourceforge.io/config_misc.html
-->
<module name="ArrayTypeStyle" />
<module name="OuterTypeFilename" />
<module name="UpperEll" />
<!--
Modifiers: https://checkstyle.sourceforge.io/config_modifier.html
-->
<module name="ModifierOrder" />
<module name="RedundantModifier" />
<!--
Regexp: https://checkstyle.sourceforge.io/config_regexp.html
-->
<module name="Regexp">
<property name="format" value="[ \t]+$" />
<property name="illegalPattern" value="true" />
<property name="message" value="Trailing whitespace" />
</module>
<!--
Whitespace: https://checkstyle.sourceforge.io/config_whitespace.html
-->
<module name="EmptyLineSeparator">
<property name="tokens" value="PACKAGE_DEF, IMPORT, STATIC_IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF, STATIC_INIT, INSTANCE_INIT, METHOD_DEF, CTOR_DEF, VARIABLE_DEF, RECORD_DEF, COMPACT_CTOR_DEF" />
<property name="allowNoEmptyLineBetweenFields" value="true" />
</module>
<module name="GenericWhitespace">
<message key="ws.followed" value="GenericWhitespace ''{0}'' is followed by whitespace." />
<message key="ws.preceded" value="GenericWhitespace ''{0}'' is preceded with whitespace." />
<message key="ws.illegalFollow" value="GenericWhitespace ''{0}'' should followed by whitespace." />
<message key="ws.notPreceded" value="GenericWhitespace ''{0}'' is not preceded with whitespace." />
</module>
<module name="MethodParamPad">
<property name="tokens" value="CTOR_DEF, LITERAL_NEW, METHOD_CALL, METHOD_DEF, SUPER_CTOR_CALL, ENUM_CONSTANT_DEF, RECORD_DEF" />
</module>
<module name="NoLineWrap">
<property name="tokens" value="PACKAGE_DEF, IMPORT, STATIC_IMPORT" />
</module>
<module name="NoWhitespaceBefore">
<property name="tokens" value="COMMA, SEMI, POST_INC, POST_DEC, DOT, LABELED_STAT, METHOD_REF" />
<property name="allowLineBreaks" value="true" />
</module>
<module name="NoWhitespaceBeforeCaseDefaultColon" />
<module name="ParenPad">
<property name="tokens" value="ANNOTATION, ANNOTATION_FIELD_DEF, CTOR_CALL, CTOR_DEF, DOT, ENUM_CONSTANT_DEF, EXPR, LITERAL_CATCH, LITERAL_DO, LITERAL_FOR, LITERAL_IF, LITERAL_NEW, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_WHILE, METHOD_CALL, METHOD_DEF, QUESTION, RESOURCE_SPECIFICATION, SUPER_CTOR_CALL, LAMBDA, RECORD_DEF" />
</module>
<module name="SeparatorWrap">
<property name="id" value="SeparatorWrapComma" />
<property name="tokens" value="COMMA" />
<property name="option" value="EOL" />
</module>
<module name="SeparatorWrap">
<property name="id" value="SeparatorWrapMethodRef" />
<property name="tokens" value="METHOD_REF" />
<property name="option" value="nl" />
</module>
<module name="WhitespaceAfter">
<property name="tokens" value="COMMA, SEMI, TYPECAST, LITERAL_IF, LITERAL_ELSE, LITERAL_WHILE, LITERAL_DO, LITERAL_FOR, DO_WHILE" />
</module>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true" />
<property name="allowEmptyLambdas" value="true" />
<property name="allowEmptyMethods" value="true" />
<property name="allowEmptyTypes" value="true" />
<property name="allowEmptyLoops" value="true" />
<property name="ignoreEnhancedForColon" value="false" />
<property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAMBDA, LAND, LCURLY, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND" />
<message key="ws.notFollowed" value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)" />
<message key="ws.notPreceded" value="WhitespaceAround: ''{0}'' is not preceded with whitespace." />
</module>
</module>
</module>
</checkstyleRules>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>9.3</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>validate</id>
<goals>
<goal>check</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<configuration>
<java>
<endWithNewline />
<importOrder />
<indent>
<spaces>true</spaces>
</indent>
<removeUnusedImports />
<trimTrailingWhitespace />
</java>
<pom>
<sortPom>
<encoding>${project.build.sourceEncoding}</encoding>
<lineSeparator>\n</lineSeparator>
<expandEmptyElements>false</expandEmptyElements>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
</sortPom>
</pom>
</configuration>
<executions>
<execution>
<!-- Runs in verify phase by default -->
<goals>
<!-- Can be disabled using -Dspotless.check.skip -->
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<!-- Version specified in parent POM -->
<configuration>
<!-- enable release profile during the release, create IPS package, and sign bits. -->
<arguments>-P release,sign</arguments>
<!-- work around for a bug in javadoc plugin that causes the release to fail. see MRELEASE-271 -->
<preparationGoals>clean install</preparationGoals>
<goals>-DskipTests -Danimal.sniffer.skip=false javadoc:javadoc deploy</goals>
<pushChanges>false</pushChanges>
<localCheckout>true</localCheckout>
<tagNameFormat>jenkins-@{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<!-- Version specified in parent POM -->
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<resourceBundles>
<resourceBundle>org.jvnet.hudson:license:1.0</resourceBundle>
</resourceBundles>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java1${java.level}</artifactId>
<version>1.0</version>
</signature>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<!-- Version specified in parent POM -->
<configuration>
<source>1.${java.level}</source>
<target>1.${java.level}</target>
<!-- default reuseCreated is more performant
feel free to uncomment if you have any issues on your platform
<compilerReuseStrategy>alwaysNew</compilerReuseStrategy>
-->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<!-- Version specified in parent POM -->
<executions>
<execution>
<id>enforce-banned-dependencies</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>org.sonatype.sisu:sisu-guice</exclude>
<exclude>log4j:log4j:*:jar:compile</exclude>
<exclude>log4j:log4j:*:jar:runtime</exclude>
<exclude>commons-logging:commons-logging:*:jar:compile</exclude>
<exclude>commons-logging:commons-logging:*:jar:runtime</exclude>
</excludes>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<!-- Version specified in parent POM -->
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>metrics</id>
<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<!-- Version specified in parent POM -->
<configuration>
<threshold>High</threshold>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>debug</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<hudson.sign.alias>jenkins</hudson.sign.alias>
<hudson.sign.keystore>../dummy.keystore</hudson.sign.keystore>
<hudson.sign.storepass>jenkins</hudson.sign.storepass>
</properties>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<!-- Version specified in parent POM -->
<inherited>false</inherited>
<executions>
<execution>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<finalName>jenkins-${project.version}</finalName>
<descriptors>
<descriptor>assembly-src.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<!-- Version specified in parent POM -->
<executions>
<execution>
<id>sign-artifacts</id>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>lts-release</id>
<properties>
<changelog.url>https://www.jenkins.io/changelog-stable</changelog.url>
</properties>
</profile>
<profile>
<id>m2e</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<properties>
<m2BuildDirectory>target</m2BuildDirectory>
</properties>
<build>
<directory>${m2BuildDirectory}</directory>
<plugins>
<plugin>
<groupId>org.maven.ide.eclipse</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>0.12.0</version>
<configuration>
<mappingId>customizable</mappingId>
<configurators>
<configurator id="org.maven.ide.eclipse.jdt.javaConfigurator" />
<configurator id="org.maven.ide.eclipse.plexus.annotations.plexusConfigurator" />
</configurators>
<mojoExecutions>
<mojoExecution>org.apache.maven.plugins:maven-resources-plugin::</mojoExecution>
</mojoExecutions>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>specific-test</id>
<activation>
<property>
<name>test</name>
</property>
</activation>
<properties>
<failIfNoTests>false</failIfNoTests>
</properties>
</profile>
<profile>
<id>jdk11</id>
<activation>
<jdk>11</jdk>
</activation>
<properties>
<!-- TODO: https://issues.jenkins.io/browse/JENKINS-53788 (JDK11 issue on CI) -->
<doclint>none</doclint>
<maven.javadoc.skip>true</maven.javadoc.skip>
<!-- release is needed for reliable cross compilation. It is supported
starting JDK 9, but as the only earlier version we support is 8, it would
be either compiled by javac from 8 or one from a newer compiler that
correctly handle the release flag. This will replace both source and target
once we drop support for JDK 8 that only recognize source and target. -->
<maven.compiler.release>${java.level}</maven.compiler.release>
</properties>
</profile>
</profiles>
</project>