pom.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. The MIT License
  4. Copyright (c) 2004-2018, Sun Microsystems, Inc., Kohsuke Kawaguchi, CloudBees, Inc.
  5. Permission is hereby granted, free of charge, to any person obtaining a copy
  6. of this software and associated documentation files (the "Software"), to deal
  7. in the Software without restriction, including without limitation the rights
  8. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. copies of the Software, and to permit persons to whom the Software is
  10. furnished to do so, subject to the following conditions:
  11. The above copyright notice and this permission notice shall be included in
  12. all copies or substantial portions of the Software.
  13. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. THE SOFTWARE.
  20. -->
  21. <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">
  22. <modelVersion>4.0.0</modelVersion>
  23. <parent>
  24. <groupId>org.jenkins-ci.main</groupId>
  25. <artifactId>jenkins-parent</artifactId>
  26. <version>${revision}${changelist}</version>
  27. </parent>
  28. <artifactId>jenkins-test</artifactId>
  29. <name>Tests for Jenkins core</name>
  30. <description>Functional tests for Jenkins core</description>
  31. <properties>
  32. <mavenDebug>false</mavenDebug>
  33. <!-- Minimum Remoting version, which is tested for API compatibility, duplicated so that renovate only updates the latest remoting version property -->
  34. <remoting.minimum.supported.version>3256.3258.v858f3c9a_f69d</remoting.minimum.supported.version>
  35. <!-- Filled in by jacoco-maven-plugin -->
  36. <jacocoSurefireArgs />
  37. <!--
  38. Filled in by maven-hpi-plugin from the MANIFEST.MF entry in jenkins.war, but we provide a default value for the benefit of IDEs.
  39. Make sure to keep the directives in core/pom.xml and war/pom.xml in sync with these.
  40. -->
  41. <jenkins.addOpens>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</jenkins.addOpens>
  42. <!-- Filled in by maven-hpi-plugin with the path to org-netbeans-insane-hook.jar extracted from jenkins-test-harness -->
  43. <jenkins.insaneHook />
  44. <!-- Filled in by maven-hpi-plugin with "-javaagent:/path/to/mockito-core-<version>.jar" -->
  45. <jenkins.javaAgent />
  46. </properties>
  47. <dependencyManagement>
  48. <dependencies>
  49. <dependency>
  50. <groupId>org.jenkins-ci.main</groupId>
  51. <artifactId>jenkins-bom</artifactId>
  52. <version>${project.version}</version>
  53. <type>pom</type>
  54. <scope>import</scope>
  55. </dependency>
  56. <dependency>
  57. <!-- Required by workflow-support -->
  58. <groupId>io.jenkins.plugins</groupId>
  59. <artifactId>caffeine-api</artifactId>
  60. <version>3.3.0-210.v71b_2985ce530</version>
  61. </dependency>
  62. <dependency>
  63. <groupId>io.jenkins.plugins</groupId>
  64. <artifactId>commons-lang3-api</artifactId>
  65. <version>3.21.0-122.v6a_ea_4fd34049</version>
  66. </dependency>
  67. <dependency>
  68. <!-- RequireUpperBoundDeps between checks-api, plugin-util-api, and font-awesome-api -->
  69. <groupId>io.jenkins.plugins</groupId>
  70. <artifactId>commons-text-api</artifactId>
  71. <version>1.15.0-218.va_61573470393</version>
  72. </dependency>
  73. <dependency>
  74. <!-- RequireUpperBoundDeps between bootstrap5-api and echarts-api -->
  75. <groupId>io.jenkins.plugins</groupId>
  76. <artifactId>font-awesome-api</artifactId>
  77. <version>7.3.1-1013.v0835a_879ec6d</version>
  78. </dependency>
  79. <dependency>
  80. <groupId>io.jenkins.plugins</groupId>
  81. <artifactId>ionicons-api</artifactId>
  82. <version>94.vcc3065403257</version>
  83. </dependency>
  84. <dependency>
  85. <groupId>io.jenkins.plugins</groupId>
  86. <artifactId>javax-activation-api</artifactId>
  87. <version>1.2.0-8</version>
  88. </dependency>
  89. <dependency>
  90. <groupId>io.jenkins.plugins</groupId>
  91. <artifactId>plugin-util-api</artifactId>
  92. <version>7.1403.vd380b_c42e90c</version>
  93. </dependency>
  94. <dependency>
  95. <groupId>org.jenkins-ci.plugins</groupId>
  96. <artifactId>ant</artifactId>
  97. <version>520.vd082ecfb_16a_9</version>
  98. </dependency>
  99. <dependency>
  100. <groupId>org.jenkins-ci.plugins</groupId>
  101. <artifactId>bouncycastle-api</artifactId>
  102. <version>2.30.1.86.2-310.v4655f6742752</version>
  103. </dependency>
  104. <dependency>
  105. <!-- RequireUpperBoundDeps via mailer and junit -->
  106. <groupId>org.jenkins-ci.plugins</groupId>
  107. <artifactId>display-url-api</artifactId>
  108. <version>2.217.va_6b_de84cc74b_</version>
  109. </dependency>
  110. <dependency>
  111. <!-- Required by workflow-support -->
  112. <groupId>org.jenkins-ci.plugins</groupId>
  113. <artifactId>scm-api</artifactId>
  114. <version>728.vc30dcf7a_0df5</version>
  115. </dependency>
  116. <dependency>
  117. <!-- requireUpperBoundDeps via matrix-project and junit -->
  118. <groupId>org.jenkins-ci.plugins</groupId>
  119. <artifactId>script-security</artifactId>
  120. <version>1436.v1082791135e4</version>
  121. </dependency>
  122. <dependency>
  123. <groupId>org.jenkins-ci.plugins.workflow</groupId>
  124. <artifactId>workflow-api</artifactId>
  125. <version>1413.v2ff1a_5e720fa_</version>
  126. </dependency>
  127. <dependency>
  128. <groupId>org.jenkins-ci.plugins.workflow</groupId>
  129. <artifactId>workflow-step-api</artifactId>
  130. <version>724.v538c2362b_dfb_</version>
  131. </dependency>
  132. <dependency>
  133. <!-- Required by plugin-util-api -->
  134. <groupId>org.jenkins-ci.plugins.workflow</groupId>
  135. <artifactId>workflow-support</artifactId>
  136. <version>1015.v785e5a_b_b_8b_22</version>
  137. </dependency>
  138. </dependencies>
  139. </dependencyManagement>
  140. <dependencies>
  141. <!-- For maven-hpi-plugin -->
  142. <dependency>
  143. <groupId>${project.groupId}</groupId>
  144. <artifactId>jenkins-core</artifactId>
  145. <version>${project.version}</version>
  146. <scope>provided</scope>
  147. </dependency>
  148. <dependency>
  149. <groupId>jakarta.servlet</groupId>
  150. <artifactId>jakarta.servlet-api</artifactId>
  151. <scope>provided</scope>
  152. </dependency>
  153. <dependency>
  154. <groupId>${project.groupId}</groupId>
  155. <artifactId>jenkins-war</artifactId>
  156. <version>${project.version}</version>
  157. <type>executable-war</type>
  158. <scope>test</scope>
  159. </dependency>
  160. <dependency>
  161. <groupId>io.jenkins.plugins</groupId>
  162. <artifactId>javax-mail-api</artifactId>
  163. <version>1.6.2-11</version>
  164. <scope>test</scope>
  165. </dependency>
  166. <dependency>
  167. <groupId>org.awaitility</groupId>
  168. <artifactId>awaitility</artifactId>
  169. <version>4.3.0</version>
  170. <scope>test</scope>
  171. </dependency>
  172. <dependency>
  173. <groupId>org.hamcrest</groupId>
  174. <artifactId>hamcrest</artifactId>
  175. <scope>test</scope>
  176. </dependency>
  177. <dependency>
  178. <groupId>org.jenkins-ci</groupId>
  179. <artifactId>test-annotations</artifactId>
  180. <scope>test</scope>
  181. </dependency>
  182. <dependency>
  183. <groupId>org.jenkins-ci.main</groupId>
  184. <artifactId>jenkins-test-harness</artifactId>
  185. <version>2587.v9791b_4544b_b_2</version>
  186. <scope>test</scope>
  187. <exclusions>
  188. <exclusion>
  189. <groupId>${project.groupId}</groupId>
  190. <artifactId>jenkins-war</artifactId>
  191. </exclusion>
  192. <exclusion>
  193. <groupId>org.hamcrest</groupId>
  194. <artifactId>hamcrest-core</artifactId>
  195. </exclusion>
  196. </exclusions>
  197. </dependency>
  198. <dependency>
  199. <groupId>org.jenkins-ci.main</groupId>
  200. <artifactId>jenkins-test-harness-tools</artifactId>
  201. <version>2.2</version>
  202. <scope>test</scope>
  203. <exclusions>
  204. <exclusion>
  205. <groupId>org.jenkins-ci.main</groupId>
  206. <artifactId>jenkins-test-harness</artifactId>
  207. </exclusion>
  208. </exclusions>
  209. </dependency>
  210. <dependency>
  211. <groupId>org.jenkins-ci.modules</groupId>
  212. <artifactId>instance-identity</artifactId>
  213. <version>203.v15e81a_1b_7a_38</version>
  214. <scope>test</scope>
  215. </dependency>
  216. <dependency>
  217. <groupId>org.jenkins-ci.plugins</groupId>
  218. <artifactId>antisamy-markup-formatter</artifactId>
  219. <version>173.v680e3a_b_69ff3</version>
  220. <scope>test</scope>
  221. </dependency>
  222. <dependency>
  223. <groupId>org.jenkins-ci.plugins</groupId>
  224. <artifactId>cloudbees-folder</artifactId>
  225. <version>6.1106.v3a_d9a_6d2465e</version>
  226. <scope>test</scope>
  227. </dependency>
  228. <dependency>
  229. <groupId>org.jenkins-ci.plugins</groupId>
  230. <artifactId>credentials</artifactId>
  231. <version>1514.vb_01eb_014e7d4</version>
  232. <scope>test</scope>
  233. </dependency>
  234. <dependency>
  235. <groupId>org.jenkins-ci.plugins</groupId>
  236. <artifactId>junit</artifactId>
  237. <version>1442.vb_b_a_467df2767</version>
  238. <scope>test</scope>
  239. </dependency>
  240. <dependency>
  241. <groupId>org.jenkins-ci.plugins</groupId>
  242. <artifactId>mailer</artifactId>
  243. <version>534.v1b_36f5864073</version>
  244. <scope>test</scope>
  245. </dependency>
  246. <dependency>
  247. <groupId>org.jenkins-ci.plugins</groupId>
  248. <artifactId>matrix-auth</artifactId>
  249. <version>3.3</version>
  250. <scope>test</scope>
  251. </dependency>
  252. <dependency>
  253. <groupId>org.jenkins-ci.plugins</groupId>
  254. <artifactId>matrix-project</artifactId>
  255. <version>928.v1effc3f3a_236</version>
  256. <scope>test</scope>
  257. </dependency>
  258. <dependency>
  259. <groupId>org.jenkins-ci.plugins</groupId>
  260. <artifactId>structs</artifactId>
  261. <version>362.va_b_695ef4fdf9</version>
  262. <scope>test</scope>
  263. </dependency>
  264. <dependency>
  265. <groupId>org.jenkins-ci.plugins</groupId>
  266. <artifactId>variant</artifactId>
  267. <version>70.va_d9f17f859e0</version>
  268. <scope>test</scope>
  269. </dependency>
  270. <dependency>
  271. <groupId>org.junit.jupiter</groupId>
  272. <artifactId>junit-jupiter</artifactId>
  273. <scope>test</scope>
  274. </dependency>
  275. <dependency>
  276. <groupId>org.mockito</groupId>
  277. <artifactId>mockito-junit-jupiter</artifactId>
  278. <scope>test</scope>
  279. </dependency>
  280. </dependencies>
  281. <build>
  282. <plugins>
  283. <plugin>
  284. <groupId>org.apache.maven.plugins</groupId>
  285. <artifactId>maven-compiler-plugin</artifactId>
  286. <configuration>
  287. <annotationProcessorPaths>
  288. <!-- Indexes @Extension, @TestExtension, @OptionalExtension, @Symbol, @Restricted,
  289. @Initializer, @ExportedBean and @JmhBenchmark under META-INF -->
  290. <path>
  291. <groupId>org.jenkins-ci</groupId>
  292. <artifactId>annotation-indexer</artifactId>
  293. </path>
  294. <!-- Writes the binary META-INF/annotations indexes -->
  295. <path>
  296. <groupId>net.java.sezpoz</groupId>
  297. <artifactId>sezpoz</artifactId>
  298. </path>
  299. <!-- Emits the *.stapler constructor-parameter files -->
  300. <path>
  301. <groupId>org.kohsuke.stapler</groupId>
  302. <artifactId>stapler</artifactId>
  303. </path>
  304. <!--
  305. Generates META-INF/BenchmarkList and META-INF/CompilerHints for the JMH benchmarks.
  306. -->
  307. <path>
  308. <groupId>org.openjdk.jmh</groupId>
  309. <artifactId>jmh-generator-annprocess</artifactId>
  310. </path>
  311. </annotationProcessorPaths>
  312. </configuration>
  313. </plugin>
  314. <plugin>
  315. <groupId>org.jenkins-ci.tools</groupId>
  316. <artifactId>maven-hpi-plugin</artifactId>
  317. <!-- Version specified in grandparent POM -->
  318. <extensions>true</extensions>
  319. <executions>
  320. <execution>
  321. <id>prepare-test-plugins</id>
  322. <goals>
  323. <goal>resolve-test-dependencies</goal>
  324. </goals>
  325. <phase>test-compile</phase>
  326. </execution>
  327. <execution>
  328. <id>test-runtime</id>
  329. <goals>
  330. <goal>test-runtime</goal>
  331. </goals>
  332. <phase>test</phase>
  333. </execution>
  334. </executions>
  335. </plugin>
  336. <plugin>
  337. <artifactId>maven-dependency-plugin</artifactId>
  338. <!-- Version specified in grandparent POM -->
  339. <executions>
  340. <execution>
  341. <id>old-remoting-for-test</id>
  342. <goals>
  343. <!-- we use copy as this is a dependency from outside the reactor -->
  344. <goal>copy</goal>
  345. </goals>
  346. <phase>generate-test-resources</phase>
  347. <configuration>
  348. <artifactItems>
  349. <artifactItem>
  350. <groupId>org.jenkins-ci.main</groupId>
  351. <artifactId>remoting</artifactId>
  352. <version>${remoting.minimum.supported.version}</version>
  353. <type>jar</type>
  354. <outputDirectory>${project.build.outputDirectory}/old-remoting</outputDirectory>
  355. <destFileName>remoting-minimum-supported.jar</destFileName>
  356. </artifactItem>
  357. <artifactItem>
  358. <groupId>org.jenkins-ci.main</groupId>
  359. <artifactId>remoting</artifactId>
  360. <version>3256.v88a_f6e922152</version>
  361. <type>jar</type>
  362. <outputDirectory>${project.build.outputDirectory}/old-remoting</outputDirectory>
  363. <destFileName>remoting-unsupported.jar</destFileName>
  364. </artifactItem>
  365. <artifactItem>
  366. <groupId>io.jenkins.plugins</groupId>
  367. <artifactId>design-library</artifactId>
  368. <version>483.v401c307fdd1b_</version>
  369. <type>hpi</type>
  370. <outputDirectory>${project.build.outputDirectory}/plugins</outputDirectory>
  371. <destFileName>design-library.jpi</destFileName>
  372. </artifactItem>
  373. <artifactItem>
  374. <groupId>io.jenkins.plugins</groupId>
  375. <artifactId>prism-api</artifactId>
  376. <version>1.30.0-741.v034eb_0b_0a_a_fa_</version>
  377. <type>hpi</type>
  378. <outputDirectory>${project.build.outputDirectory}/plugins</outputDirectory>
  379. <destFileName>prism-api.jpi</destFileName>
  380. </artifactItem>
  381. <artifactItem>
  382. <groupId>io.jenkins.plugins</groupId>
  383. <artifactId>bootstrap5-api</artifactId>
  384. <version>5.3.8-1048.va_c299057e35c</version>
  385. <type>hpi</type>
  386. <outputDirectory>${project.build.outputDirectory}/plugins</outputDirectory>
  387. <destFileName>bootstrap5-api.jpi</destFileName>
  388. </artifactItem>
  389. </artifactItems>
  390. </configuration>
  391. </execution>
  392. </executions>
  393. </plugin>
  394. <plugin>
  395. <groupId>org.apache.maven.plugins</groupId>
  396. <artifactId>maven-surefire-plugin</artifactId>
  397. <!-- version specified in grandparent pom -->
  398. <configuration>
  399. <argLine>@{jacocoSurefireArgs} -Xmx1g @{jenkins.addOpens} @{jenkins.insaneHook} @{jenkins.javaAgent}</argLine>
  400. <systemPropertyVariables>
  401. <hudson.maven.debug>${mavenDebug}</hudson.maven.debug>
  402. <buildDirectory>${project.build.directory}</buildDirectory>
  403. </systemPropertyVariables>
  404. <reuseForks>false</reuseForks>
  405. </configuration>
  406. <executions>
  407. <!-- Unbind the default execution so that it does not run before test-runtime. -->
  408. <execution>
  409. <id>default-test</id>
  410. <goals>
  411. <goal>test</goal>
  412. </goals>
  413. <phase>none</phase>
  414. </execution>
  415. <!-- Bind a new execution which, by virtue of being declared after test-runtime, will also run after it. -->
  416. <execution>
  417. <id>functional-test</id>
  418. <goals>
  419. <goal>test</goal>
  420. </goals>
  421. <phase>test</phase>
  422. </execution>
  423. </executions>
  424. </plugin>
  425. <plugin>
  426. <artifactId>maven-deploy-plugin</artifactId>
  427. <!-- Version specified in grandparent POM -->
  428. <configuration>
  429. <skip>true</skip>
  430. </configuration>
  431. </plugin>
  432. </plugins>
  433. </build>
  434. <profiles>
  435. <profile>
  436. <!-- Profile, which allows skipping all integration tests -->
  437. <id>light-test</id>
  438. <properties>
  439. <skipTests>true</skipTests>
  440. </properties>
  441. </profile>
  442. <profile>
  443. <!-- Profile, which runs only a number of quick integration tests so that the build takes less than 5 minutes -->
  444. <id>smoke-test</id>
  445. <build>
  446. <plugins>
  447. <plugin>
  448. <artifactId>maven-surefire-plugin</artifactId>
  449. <!-- Version specified in grandparent POM -->
  450. <configuration>
  451. <groups>SmokeTest</groups>
  452. </configuration>
  453. </plugin>
  454. </plugins>
  455. </build>
  456. </profile>
  457. <profile>
  458. <id>all-tests</id>
  459. <activation>
  460. <property>
  461. <name>!test</name>
  462. </property>
  463. </activation>
  464. <properties>
  465. <surefire.skipAfterFailureCount>100</surefire.skipAfterFailureCount>
  466. </properties>
  467. </profile>
  468. <profile>
  469. <id>enable-jacoco</id>
  470. <build>
  471. <plugins>
  472. <plugin>
  473. <groupId>org.jacoco</groupId>
  474. <artifactId>jacoco-maven-plugin</artifactId>
  475. <!-- Version specified in parent POM -->
  476. <executions>
  477. <execution>
  478. <goals>
  479. <goal>prepare-agent</goal>
  480. </goals>
  481. <configuration>
  482. <propertyName>jacocoSurefireArgs</propertyName>
  483. <includes>
  484. <include>hudson/*</include>
  485. <include>hudson/**/*</include>
  486. <include>jenkins/*</include>
  487. <include>jenkins/**/*</include>
  488. <include>org/jenkins/**/*</include>
  489. </includes>
  490. <excludes>
  491. <exclude>**/Messages.class</exclude>
  492. </excludes>
  493. </configuration>
  494. </execution>
  495. </executions>
  496. </plugin>
  497. </plugins>
  498. </build>
  499. </profile>
  500. <profile>
  501. <id>release</id>
  502. <properties>
  503. <surefire.rerunFailingTestsCount>1</surefire.rerunFailingTestsCount>
  504. </properties>
  505. </profile>
  506. </profiles>
  507. </project>