pom.xml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. The MIT License
  4. Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi,
  5. Daniel Dyer, Erik Ramfelt, Stephen Connolly, Tom Huybrechts, Alan Harder
  6. Permission is hereby granted, free of charge, to any person obtaining a copy
  7. of this software and associated documentation files (the "Software"), to deal
  8. in the Software without restriction, including without limitation the rights
  9. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. copies of the Software, and to permit persons to whom the Software is
  11. furnished to do so, subject to the following conditions:
  12. The above copyright notice and this permission notice shall be included in
  13. all copies or substantial portions of the Software.
  14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. THE SOFTWARE.
  21. -->
  22. <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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  23. <modelVersion>4.0.0</modelVersion>
  24. <parent>
  25. <groupId>org.jenkins-ci.main</groupId>
  26. <artifactId>jenkins-parent</artifactId>
  27. <version>${revision}${changelist}</version>
  28. </parent>
  29. <artifactId>jenkins-core</artifactId>
  30. <name>Jenkins core</name>
  31. <description>Jenkins core code and view files to render HTML.</description>
  32. <url>https://github.com/jenkinsci/jenkins</url>
  33. <properties>
  34. <!-- Minimum Remoting version, which is tested for API compatibility, duplicated so that renovate only updates the latest remoting version property -->
  35. <remoting.minimum.supported.version>3256.3258.v858f3c9a_f69d</remoting.minimum.supported.version>
  36. <!-- Filled in by jacoco-maven-plugin -->
  37. <jacocoSurefireArgs />
  38. <!-- Not managed by jenkins-bom, so referenced from annotationProcessorPaths via this property -->
  39. <core-annotation-processors.version>59.ve181f58722c6</core-annotation-processors.version>
  40. </properties>
  41. <dependencyManagement>
  42. <dependencies>
  43. <dependency>
  44. <groupId>org.jenkins-ci.main</groupId>
  45. <artifactId>jenkins-bom</artifactId>
  46. <version>${project.version}</version>
  47. <type>pom</type>
  48. <scope>import</scope>
  49. </dependency>
  50. <dependency>
  51. <groupId>org.xmlunit</groupId>
  52. <artifactId>xmlunit-bom</artifactId>
  53. <version>2.14.0</version>
  54. <type>pom</type>
  55. <scope>import</scope>
  56. </dependency>
  57. </dependencies>
  58. </dependencyManagement>
  59. <dependencies>
  60. <dependency>
  61. <groupId>${project.groupId}</groupId>
  62. <artifactId>cli</artifactId>
  63. <version>${project.version}</version>
  64. </dependency>
  65. <dependency>
  66. <groupId>${project.groupId}</groupId>
  67. <artifactId>remoting</artifactId>
  68. </dependency>
  69. <dependency>
  70. <groupId>args4j</groupId>
  71. <artifactId>args4j</artifactId>
  72. </dependency>
  73. <dependency>
  74. <groupId>com.github.spotbugs</groupId>
  75. <artifactId>spotbugs-annotations</artifactId>
  76. <exclusions>
  77. <exclusion>
  78. <groupId>com.google.code.findbugs</groupId>
  79. <artifactId>jsr305</artifactId>
  80. </exclusion>
  81. </exclusions>
  82. </dependency>
  83. <dependency>
  84. <groupId>com.google.guava</groupId>
  85. <artifactId>guava</artifactId>
  86. <exclusions>
  87. <exclusion>
  88. <groupId>com.google.errorprone</groupId>
  89. <artifactId>error_prone_annotations</artifactId>
  90. </exclusion>
  91. <exclusion>
  92. <groupId>com.google.j2objc</groupId>
  93. <artifactId>j2objc-annotations</artifactId>
  94. </exclusion>
  95. <exclusion>
  96. <groupId>org.checkerframework</groupId>
  97. <artifactId>checker-qual</artifactId>
  98. </exclusion>
  99. </exclusions>
  100. </dependency>
  101. <dependency>
  102. <groupId>com.google.inject</groupId>
  103. <artifactId>guice</artifactId>
  104. <exclusions>
  105. <exclusion>
  106. <!-- Provided by spring-aop via spring-security-web -->
  107. <groupId>aopalliance</groupId>
  108. <artifactId>aopalliance</artifactId>
  109. </exclusion>
  110. </exclusions>
  111. </dependency>
  112. <dependency>
  113. <groupId>com.sun.xml.txw2</groupId>
  114. <artifactId>txw2</artifactId>
  115. <exclusions>
  116. <!-- StAX is now bundled in the JRE -->
  117. <exclusion>
  118. <groupId>javax.xml.stream</groupId>
  119. <artifactId>stax-api</artifactId>
  120. </exclusion>
  121. </exclusions>
  122. </dependency>
  123. <dependency>
  124. <groupId>com.thoughtworks.xstream</groupId>
  125. <artifactId>xstream</artifactId>
  126. <exclusions>
  127. <exclusion>
  128. <groupId>xmlpull</groupId>
  129. <artifactId>xmlpull</artifactId>
  130. </exclusion>
  131. <exclusion>
  132. <groupId>xpp3</groupId>
  133. <artifactId>xpp3_min</artifactId>
  134. </exclusion>
  135. </exclusions>
  136. </dependency>
  137. <dependency>
  138. <groupId>commons-beanutils</groupId>
  139. <artifactId>commons-beanutils</artifactId>
  140. </dependency>
  141. <dependency>
  142. <groupId>commons-codec</groupId>
  143. <artifactId>commons-codec</artifactId>
  144. </dependency>
  145. <dependency>
  146. <!-- Jenkins core does not use this directly, but it remains a transitive dependency through BeanUtils, Jelly, and JSON-lib, and plugins rely on core providing it. -->
  147. <groupId>commons-collections</groupId>
  148. <artifactId>commons-collections</artifactId>
  149. </dependency>
  150. <dependency>
  151. <groupId>commons-io</groupId>
  152. <artifactId>commons-io</artifactId>
  153. </dependency>
  154. <dependency>
  155. <groupId>io.jenkins.tools</groupId>
  156. <artifactId>bridge-method-annotation</artifactId>
  157. <version>${bridge-method-injector.version}</version>
  158. </dependency>
  159. <dependency>
  160. <!-- needed by Jelly -->
  161. <groupId>jakarta.servlet.jsp.jstl</groupId>
  162. <artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
  163. <exclusions>
  164. <exclusion>
  165. <groupId>jakarta.el</groupId>
  166. <artifactId>jakarta.el-api</artifactId>
  167. </exclusion>
  168. <exclusion>
  169. <groupId>jakarta.servlet</groupId>
  170. <artifactId>jakarta.servlet-api</artifactId>
  171. </exclusion>
  172. <exclusion>
  173. <groupId>jakarta.xml.bind</groupId>
  174. <artifactId>jakarta.xml.bind-api</artifactId>
  175. </exclusion>
  176. </exclusions>
  177. </dependency>
  178. <dependency>
  179. <groupId>jaxen</groupId>
  180. <artifactId>jaxen</artifactId>
  181. <exclusions>
  182. <exclusion>
  183. <groupId>dom4j</groupId>
  184. <artifactId>dom4j</artifactId>
  185. </exclusion>
  186. <exclusion>
  187. <groupId>jdom</groupId>
  188. <artifactId>jdom</artifactId>
  189. </exclusion>
  190. <exclusion>
  191. <groupId>xerces</groupId>
  192. <artifactId>xercesImpl</artifactId>
  193. </exclusion>
  194. <exclusion>
  195. <groupId>xml-apis</groupId>
  196. <artifactId>xml-apis</artifactId>
  197. </exclusion>
  198. <exclusion>
  199. <groupId>xom</groupId>
  200. <artifactId>xom</artifactId>
  201. </exclusion>
  202. </exclusions>
  203. </dependency>
  204. <dependency>
  205. <!-- Groovy shell uses this, but it uses an optional dependency. Not included into BOM. -->
  206. <groupId>jline</groupId>
  207. <artifactId>jline</artifactId>
  208. <version>2.14.6</version>
  209. <scope>compile</scope>
  210. </dependency>
  211. <dependency>
  212. <groupId>net.java.dev.jna</groupId>
  213. <artifactId>jna</artifactId>
  214. </dependency>
  215. <dependency>
  216. <groupId>net.java.sezpoz</groupId>
  217. <artifactId>sezpoz</artifactId>
  218. </dependency>
  219. <dependency>
  220. <groupId>net.jcip</groupId>
  221. <artifactId>jcip-annotations</artifactId>
  222. </dependency>
  223. <dependency>
  224. <groupId>org.antlr</groupId>
  225. <artifactId>antlr4-runtime</artifactId>
  226. </dependency>
  227. <dependency>
  228. <groupId>org.apache.ant</groupId>
  229. <artifactId>ant</artifactId>
  230. </dependency>
  231. <dependency>
  232. <groupId>org.apache.commons</groupId>
  233. <artifactId>commons-fileupload2-core</artifactId>
  234. </dependency>
  235. <dependency>
  236. <groupId>org.apache.commons</groupId>
  237. <artifactId>commons-fileupload2-jakarta-servlet5</artifactId>
  238. </dependency>
  239. <dependency>
  240. <groupId>org.codehaus.groovy</groupId>
  241. <artifactId>groovy-all</artifactId>
  242. </dependency>
  243. <dependency>
  244. <!-- Groovy shell uses this, but it doesn't declare the dependency -->
  245. <groupId>org.fusesource.jansi</groupId>
  246. <artifactId>jansi</artifactId>
  247. </dependency>
  248. <dependency>
  249. <groupId>org.jenkins-ci</groupId>
  250. <artifactId>annotation-indexer</artifactId>
  251. </dependency>
  252. <dependency>
  253. <groupId>org.jenkins-ci</groupId>
  254. <artifactId>commons-jelly-tags-fmt</artifactId>
  255. </dependency>
  256. <dependency>
  257. <groupId>org.jenkins-ci</groupId>
  258. <artifactId>commons-jelly-tags-xml</artifactId>
  259. <exclusions>
  260. <exclusion>
  261. <groupId>jaxen</groupId>
  262. <artifactId>jaxen</artifactId>
  263. </exclusion>
  264. <exclusion>
  265. <groupId>org.dom4j</groupId>
  266. <artifactId>dom4j</artifactId>
  267. </exclusion>
  268. </exclusions>
  269. </dependency>
  270. <dependency>
  271. <groupId>org.jenkins-ci</groupId>
  272. <artifactId>commons-jexl</artifactId>
  273. </dependency>
  274. <dependency>
  275. <groupId>org.jenkins-ci</groupId>
  276. <artifactId>crypto-util</artifactId>
  277. </dependency>
  278. <dependency>
  279. <groupId>org.jenkins-ci</groupId>
  280. <artifactId>memory-monitor</artifactId>
  281. </dependency>
  282. <dependency>
  283. <groupId>org.jenkins-ci</groupId>
  284. <artifactId>symbol-annotation</artifactId>
  285. </dependency>
  286. <dependency>
  287. <groupId>org.jenkins-ci</groupId>
  288. <artifactId>task-reactor</artifactId>
  289. </dependency>
  290. <dependency>
  291. <groupId>org.jenkins-ci</groupId>
  292. <artifactId>version-number</artifactId>
  293. </dependency>
  294. <dependency>
  295. <groupId>org.jenkins-ci.main</groupId>
  296. <artifactId>websocket-spi</artifactId>
  297. <version>${project.version}</version>
  298. <exclusions>
  299. <!-- Provided by Jetty/Winstone -->
  300. <exclusion>
  301. <groupId>jakarta.servlet</groupId>
  302. <artifactId>jakarta.servlet-api</artifactId>
  303. </exclusion>
  304. </exclusions>
  305. </dependency>
  306. <dependency>
  307. <groupId>org.jfree</groupId>
  308. <artifactId>jfreechart</artifactId>
  309. </dependency>
  310. <dependency>
  311. <groupId>org.jvnet.hudson</groupId>
  312. <artifactId>commons-jelly-tags-define</artifactId>
  313. </dependency>
  314. <dependency>
  315. <groupId>org.jvnet.localizer</groupId>
  316. <artifactId>localizer</artifactId>
  317. </dependency>
  318. <dependency>
  319. <groupId>org.jvnet.winp</groupId>
  320. <artifactId>winp</artifactId>
  321. </dependency>
  322. <dependency>
  323. <groupId>org.kohsuke</groupId>
  324. <artifactId>access-modifier-annotation</artifactId>
  325. </dependency>
  326. <dependency>
  327. <groupId>org.kohsuke</groupId>
  328. <artifactId>windows-package-checker</artifactId>
  329. </dependency>
  330. <dependency>
  331. <groupId>org.kohsuke.metainf-services</groupId>
  332. <artifactId>metainf-services</artifactId>
  333. <optional>true</optional>
  334. </dependency>
  335. <dependency>
  336. <groupId>org.kohsuke.stapler</groupId>
  337. <artifactId>json-lib</artifactId>
  338. </dependency>
  339. <dependency>
  340. <groupId>org.kohsuke.stapler</groupId>
  341. <artifactId>stapler</artifactId>
  342. </dependency>
  343. <dependency>
  344. <groupId>org.kohsuke.stapler</groupId>
  345. <artifactId>stapler-adjunct-codemirror</artifactId>
  346. </dependency>
  347. <dependency>
  348. <groupId>org.kohsuke.stapler</groupId>
  349. <artifactId>stapler-groovy</artifactId>
  350. <exclusions>
  351. <exclusion>
  352. <groupId>commons-jelly</groupId>
  353. <artifactId>commons-jelly</artifactId>
  354. </exclusion>
  355. <exclusion>
  356. <groupId>commons-jexl</groupId>
  357. <artifactId>commons-jexl</artifactId>
  358. </exclusion>
  359. <exclusion>
  360. <!-- we bundle groovy-all -->
  361. <groupId>org.codehaus.groovy</groupId>
  362. <artifactId>groovy</artifactId>
  363. </exclusion>
  364. <exclusion>
  365. <groupId>org.jvnet.hudson</groupId>
  366. <artifactId>commons-jexl</artifactId>
  367. </exclusion>
  368. </exclusions>
  369. </dependency>
  370. <dependency>
  371. <groupId>org.slf4j</groupId>
  372. <artifactId>jcl-over-slf4j</artifactId>
  373. </dependency>
  374. <dependency>
  375. <groupId>org.slf4j</groupId>
  376. <artifactId>log4j-over-slf4j</artifactId>
  377. </dependency>
  378. <dependency>
  379. <groupId>org.springframework.security</groupId>
  380. <artifactId>spring-security-web</artifactId>
  381. <exclusions>
  382. <exclusion>
  383. <groupId>io.micrometer</groupId>
  384. <artifactId>micrometer-observation</artifactId>
  385. </exclusion>
  386. <exclusion>
  387. <groupId>org.springframework</groupId>
  388. <artifactId>spring-jcl</artifactId>
  389. </exclusion>
  390. </exclusions>
  391. </dependency>
  392. <dependency>
  393. <!--
  394. still including the xpp3 driver to ensure backwards compatibilty
  395. for other plugins that may be depending on it. Not included into BOM
  396. -->
  397. <groupId>xpp3</groupId>
  398. <artifactId>xpp3</artifactId>
  399. <version>1.1.4c</version>
  400. </dependency>
  401. <dependency>
  402. <groupId>jakarta.servlet</groupId>
  403. <artifactId>jakarta.servlet-api</artifactId>
  404. <scope>provided</scope>
  405. </dependency>
  406. <dependency>
  407. <!-- Also listed in annotationProcessorPaths above; kept as a dependency so that
  408. jenkins-core continues to ship META-INF/services/javax.annotation.processing.Processor
  409. for plugin builds. -->
  410. <groupId>org.jenkins-ci</groupId>
  411. <artifactId>core-annotation-processors</artifactId>
  412. <version>${core-annotation-processors.version}</version>
  413. <scope>provided</scope>
  414. <optional>true</optional>
  415. </dependency>
  416. <!-- offline profiler API to put in the classpath if we need it -->
  417. <!--dependency>
  418. <groupId>com.yourkit.api</groupId>
  419. <artifactId>yjp</artifactId>
  420. <version>dontcare</version>
  421. <scope>system</scope>
  422. <systemPath>/usr/local/yjp/lib/yjp.jar</systemPath>
  423. </dependency-->
  424. <dependency>
  425. <groupId>org.hamcrest</groupId>
  426. <artifactId>hamcrest</artifactId>
  427. <scope>test</scope>
  428. </dependency>
  429. <dependency>
  430. <groupId>org.jenkins-ci</groupId>
  431. <artifactId>test-annotations</artifactId>
  432. <scope>test</scope>
  433. </dependency>
  434. <dependency>
  435. <groupId>org.junit.jupiter</groupId>
  436. <artifactId>junit-jupiter</artifactId>
  437. <scope>test</scope>
  438. </dependency>
  439. <dependency>
  440. <groupId>org.mockito</groupId>
  441. <artifactId>mockito-junit-jupiter</artifactId>
  442. <scope>test</scope>
  443. </dependency>
  444. <dependency>
  445. <groupId>org.slf4j</groupId>
  446. <artifactId>slf4j-jdk14</artifactId>
  447. <scope>test</scope>
  448. </dependency>
  449. <dependency>
  450. <groupId>org.xmlunit</groupId>
  451. <artifactId>xmlunit-core</artifactId>
  452. <scope>test</scope>
  453. </dependency>
  454. <dependency>
  455. <groupId>org.xmlunit</groupId>
  456. <artifactId>xmlunit-matchers</artifactId>
  457. <scope>test</scope>
  458. </dependency>
  459. </dependencies>
  460. <build>
  461. <plugins>
  462. <plugin>
  463. <groupId>org.apache.maven.plugins</groupId>
  464. <artifactId>maven-compiler-plugin</artifactId>
  465. <configuration>
  466. <!--
  467. Declare the annotation processors explicitly rather than letting javac discover them by
  468. scanning the whole compile classpath.
  469. -->
  470. <annotationProcessorPaths>
  471. <path>
  472. <groupId>net.java.sezpoz</groupId>
  473. <artifactId>sezpoz</artifactId>
  474. </path>
  475. <path>
  476. <groupId>org.jenkins-ci</groupId>
  477. <artifactId>annotation-indexer</artifactId>
  478. </path>
  479. <path>
  480. <groupId>org.jenkins-ci</groupId>
  481. <artifactId>core-annotation-processors</artifactId>
  482. <version>${core-annotation-processors.version}</version>
  483. </path>
  484. <path>
  485. <groupId>org.kohsuke</groupId>
  486. <artifactId>windows-package-checker</artifactId>
  487. </path>
  488. <path>
  489. <groupId>org.kohsuke.metainf-services</groupId>
  490. <artifactId>metainf-services</artifactId>
  491. </path>
  492. <path>
  493. <groupId>org.kohsuke.stapler</groupId>
  494. <artifactId>stapler</artifactId>
  495. </path>
  496. </annotationProcessorPaths>
  497. </configuration>
  498. </plugin>
  499. <plugin>
  500. <groupId>org.apache.maven.plugins</groupId>
  501. <artifactId>maven-enforcer-plugin</artifactId>
  502. <!-- Version specified in parent POM -->
  503. <executions>
  504. <execution>
  505. <id>enforce-banned-dependencies</id>
  506. <goals>
  507. <goal>enforce</goal>
  508. </goals>
  509. <configuration>
  510. <rules>
  511. <bannedDependencies>
  512. <excludes combine.children="append">
  513. <!-- Library plugins -->
  514. <exclude>com.fasterxml.jackson.*</exclude>
  515. <exclude>com.github.ben-manes.caffeine:caffeine</exclude>
  516. <exclude>com.github.jnr:jnr-posix</exclude>
  517. <exclude>com.github.mwiede:jsch</exclude>
  518. <exclude>com.google.code.gson:gson</exclude>
  519. <exclude>com.jayway.jsonpath:json-path</exclude>
  520. <exclude>commons-httpclient:commons-httpclient</exclude>
  521. <exclude>com.sun.activation:javax.activation</exclude>
  522. <exclude>com.sun.mail:javax.mail</exclude>
  523. <exclude>com.sun.xml.bind:jaxb-impl</exclude>
  524. <exclude>io.jsonwebtoken</exclude>
  525. <!-- Used in unit tests, so exclude from compile and runtime scope only -->
  526. <exclude>jakarta.activation:jakarta.activation-api:*:jar:compile</exclude>
  527. <exclude>jakarta.activation:jakarta.activation-api:*:jar:runtime</exclude>
  528. <exclude>jakarta.mail:jakarta.mail-api</exclude>
  529. <exclude>javax.activation:javax.activation-api</exclude>
  530. <exclude>javax.mail:javax.mail-api</exclude>
  531. <exclude>javax.xml.bind:jaxb-api</exclude>
  532. <exclude>joda-time:joda-time</exclude>
  533. <!-- Used in unit tests, so exclude from compile and runtime scope only -->
  534. <exclude>net.bytebuddy:byte-buddy:*:jar:compile</exclude>
  535. <exclude>net.bytebuddy:byte-buddy:*:jar:runtime</exclude>
  536. <exclude>net.i2p.crypto:eddsa</exclude>
  537. <exclude>net.minidev</exclude>
  538. <exclude>org.apache.commons:commons-lang3</exclude>
  539. <exclude>org.apache.commons:commons-text</exclude>
  540. <exclude>org.apache.httpcomponents</exclude>
  541. <exclude>org.bouncycastle</exclude>
  542. <exclude>org.eclipse.angus:angus-activation</exclude>
  543. <exclude>org.eclipse.angus:angus-mail</exclude>
  544. <exclude>org.glassfish.jersey.*</exclude>
  545. <exclude>org.json:json</exclude>
  546. <exclude>org.ow2.asm</exclude>
  547. <exclude>org.yaml:snakeyaml</exclude>
  548. </excludes>
  549. </bannedDependencies>
  550. </rules>
  551. </configuration>
  552. </execution>
  553. </executions>
  554. </plugin>
  555. <plugin>
  556. <groupId>org.codehaus.mojo</groupId>
  557. <artifactId>build-helper-maven-plugin</artifactId>
  558. <!-- Version specified in grandparent POM -->
  559. <executions>
  560. <execution>
  561. <id>add-source</id>
  562. <goals>
  563. <goal>add-source</goal>
  564. </goals>
  565. <phase>generate-sources</phase>
  566. <configuration>
  567. <sources>
  568. <!-- The antlr4 sources are found automatically by the maven compiler,
  569. but listing them explicitly avoids a missing classpath entry when importing the maven project in eclipse. -->
  570. <source>${project.build.directory}/generated-sources/antlr4</source>
  571. <source>${project.build.directory}/generated-sources/localizer</source>
  572. <source>${project.build.directory}/generated-sources/taglib-interface</source>
  573. </sources>
  574. </configuration>
  575. </execution>
  576. </executions>
  577. </plugin>
  578. <plugin>
  579. <groupId>org.jenkins-ci.tools</groupId>
  580. <artifactId>maven-hpi-plugin</artifactId>
  581. <!-- Version specified in grandparent POM -->
  582. <executions>
  583. <execution>
  584. <goals>
  585. <goal>generate-taglib-interface</goal>
  586. <goal>record-core-location</goal>
  587. </goals>
  588. </execution>
  589. </executions>
  590. </plugin>
  591. <plugin>
  592. <groupId>io.jenkins.tools</groupId>
  593. <artifactId>bridge-method-injector</artifactId>
  594. <executions>
  595. <execution>
  596. <goals>
  597. <goal>process</goal>
  598. </goals>
  599. </execution>
  600. </executions>
  601. </plugin>
  602. <plugin>
  603. <groupId>org.jvnet.localizer</groupId>
  604. <artifactId>localizer-maven-plugin</artifactId>
  605. <!-- version specified in grandparent pom -->
  606. <executions>
  607. <execution>
  608. <goals>
  609. <goal>generate</goal>
  610. </goals>
  611. <configuration>
  612. <fileMask>Messages.properties</fileMask>
  613. <outputDirectory>target/generated-sources/localizer</outputDirectory>
  614. <accessModifierAnnotations>true</accessModifierAnnotations>
  615. </configuration>
  616. </execution>
  617. </executions>
  618. </plugin>
  619. <plugin>
  620. <groupId>org.kohsuke</groupId>
  621. <artifactId>access-modifier-checker</artifactId>
  622. <executions>
  623. <execution>
  624. <goals>
  625. <goal>enforce</goal>
  626. </goals>
  627. </execution>
  628. </executions>
  629. </plugin>
  630. <plugin>
  631. <groupId>org.antlr</groupId>
  632. <artifactId>antlr4-maven-plugin</artifactId>
  633. <!-- version specified in grandparent pom -->
  634. <executions>
  635. <execution>
  636. <id>antlr</id>
  637. <goals>
  638. <goal>antlr4</goal>
  639. </goals>
  640. </execution>
  641. </executions>
  642. </plugin>
  643. <plugin>
  644. <artifactId>maven-dependency-plugin</artifactId>
  645. <!-- Version specified in grandparent POM -->
  646. <executions>
  647. <execution>
  648. <goals>
  649. <goal>properties</goal>
  650. </goals>
  651. </execution>
  652. <execution>
  653. <id>winsw</id>
  654. <goals>
  655. <!-- we use copy as this is a dependency from outside the reactor -->
  656. <goal>copy</goal>
  657. </goals>
  658. <phase>generate-resources</phase>
  659. <configuration>
  660. <artifactItems>
  661. <artifactItem>
  662. <groupId>com.sun.winsw</groupId>
  663. <artifactId>winsw</artifactId>
  664. <version>2.9.0</version>
  665. <classifier>net4</classifier>
  666. <type>exe</type>
  667. <outputDirectory>${project.build.outputDirectory}/windows-service</outputDirectory>
  668. <destFileName>jenkins.exe</destFileName>
  669. </artifactItem>
  670. </artifactItems>
  671. </configuration>
  672. </execution>
  673. </executions>
  674. </plugin>
  675. <plugin>
  676. <artifactId>maven-antrun-plugin</artifactId>
  677. <!-- Version specified in grandparent POM -->
  678. <executions>
  679. <execution>
  680. <!--
  681. License headers make up the majority of the bytes of the localization and Jelly view files
  682. (the license is retained in the source files and in the LICENSE.txt shipped in the war, just
  683. as it is not retained in compiled class files), so strip comments from the packaged jar.
  684. -->
  685. <id>strip-license-comments</id>
  686. <goals>
  687. <goal>run</goal>
  688. </goals>
  689. <phase>prepare-package</phase>
  690. <configuration>
  691. <skip>${strip.license.comments.skip}</skip>
  692. <target>
  693. <!-- Only the leading comment block, to leave any semantically interesting comments elsewhere in the file untouched -->
  694. <replaceregexp encoding="UTF-8" match="\A(?:[ \t]*(?:[#!].*)?\r?\n)+" replace="">
  695. <fileset dir="${project.build.outputDirectory}" includes="**/*.properties" />
  696. </replaceregexp>
  697. <!-- Only license comments, to leave any semantically interesting comments untouched -->
  698. <replaceregexp encoding="UTF-8" flags="g" match="&lt;!--(?:(?!--&gt;)[\s\S])*?The MIT License[\s\S]*?--&gt;" replace="">
  699. <fileset dir="${project.build.outputDirectory}" includes="**/*.jelly" />
  700. </replaceregexp>
  701. </target>
  702. </configuration>
  703. </execution>
  704. </executions>
  705. </plugin>
  706. <plugin>
  707. <artifactId>maven-surefire-plugin</artifactId>
  708. <!-- Version specified in grandparent POM -->
  709. <configuration>
  710. <!-- Make sure to keep the directives in test/pom.xml and war/pom.xml in sync with these. -->
  711. <argLine>@{jacocoSurefireArgs} --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED -javaagent:"${org.mockito:mockito-core:jar}"</argLine>
  712. <reuseForks>false</reuseForks>
  713. </configuration>
  714. </plugin>
  715. <plugin>
  716. <!-- set main class -->
  717. <artifactId>maven-jar-plugin</artifactId>
  718. <!-- version specified in grandparent pom -->
  719. <configuration>
  720. <archive>
  721. <manifest>
  722. <mainClass>hudson.Main</mainClass>
  723. <addClasspath>true</addClasspath>
  724. <classpathPrefix />
  725. </manifest>
  726. </archive>
  727. </configuration>
  728. </plugin>
  729. </plugins>
  730. </build>
  731. <reporting>
  732. <plugins>
  733. <plugin>
  734. <!-- generate Jelly tag lib documentation -->
  735. <groupId>io.jenkins.tools.maven</groupId>
  736. <artifactId>stapler-maven-plugin</artifactId>
  737. <!-- Version specified in grandparent POM -->
  738. <configuration>
  739. <patterns>
  740. <pattern>/lib/.*</pattern>
  741. </patterns>
  742. </configuration>
  743. </plugin>
  744. <plugin>
  745. <!-- skip slow dependency analysis -->
  746. <artifactId>maven-project-info-reports-plugin</artifactId>
  747. <!-- Version specified in grandparent POM -->
  748. <configuration>
  749. <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
  750. </configuration>
  751. </plugin>
  752. </plugins>
  753. </reporting>
  754. <profiles>
  755. <profile>
  756. <id>debug</id>
  757. <activation>
  758. <activeByDefault>true</activeByDefault>
  759. </activation>
  760. </profile>
  761. <profile>
  762. <id>enable-jacoco</id>
  763. <build>
  764. <plugins>
  765. <plugin>
  766. <groupId>org.jacoco</groupId>
  767. <artifactId>jacoco-maven-plugin</artifactId>
  768. <!-- Version specified in parent POM -->
  769. <executions>
  770. <execution>
  771. <goals>
  772. <goal>prepare-agent</goal>
  773. </goals>
  774. <configuration>
  775. <propertyName>jacocoSurefireArgs</propertyName>
  776. <includes>
  777. <include>hudson/*</include>
  778. <include>hudson/**/*</include>
  779. <include>jenkins/*</include>
  780. <include>jenkins/**/*</include>
  781. <include>org/jenkins/**/*</include>
  782. </includes>
  783. <excludes>
  784. <exclude>**/Messages.class</exclude>
  785. </excludes>
  786. </configuration>
  787. </execution>
  788. </executions>
  789. </plugin>
  790. </plugins>
  791. </build>
  792. </profile>
  793. </profiles>
  794. </project>