pom.xml 13.9 KB
Newer Older
J
Jesse Glick 已提交
1
<?xml version="1.0" encoding="UTF-8"?>
K
kohsuke 已提交
2 3 4
<!--
The MIT License

5
Copyright (c) 2004-2018, Sun Microsystems, Inc., Kohsuke Kawaguchi, CloudBees, Inc.
K
kohsuke 已提交
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

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.
-->
25
<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">
26 27
  <modelVersion>4.0.0</modelVersion>

28
  <parent>
29
    <groupId>org.jenkins-ci.main</groupId>
30
    <artifactId>jenkins-parent</artifactId>
31
    <version>${revision}${changelist}</version>
32
  </parent>
33

34
  <artifactId>jenkins-test</artifactId>
35

36 37
  <name>Tests for Jenkins core</name>
  <description>Functional tests for Jenkins core</description>
38

39 40
  <properties>
    <mavenDebug>false</mavenDebug>
B
Basil Crow 已提交
41
    <!-- Filled in by jacoco-maven-plugin -->
B
Basil Crow 已提交
42
    <jacocoSurefireArgs />
43 44 45 46 47
    <!--
      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.
      Make sure to keep the directives in core/pom.xml and war/pom.xml in sync with these.
    -->
    <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 --add-opens java.desktop/com.sun.beans.introspect=ALL-UNNAMED</jenkins.addOpens>
B
Basil Crow 已提交
48 49
    <!-- Filled in by maven-hpi-plugin with the path to org-netbeans-insane-hook.jar extracted from jenkins-test-harness -->
    <jenkins.insaneHook />
50 51 52 53 54 55 56 57 58 59 60
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.jenkins-ci.main</groupId>
        <artifactId>jenkins-bom</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
61 62 63
      <dependency>
        <groupId>io.jenkins.plugins</groupId>
        <artifactId>font-awesome-api</artifactId>
64
        <version>6.2.1-1</version>
65
      </dependency>
J
Jesse Glick 已提交
66 67 68
      <dependency>
        <groupId>org.jenkins-ci.plugins</groupId>
        <artifactId>ant</artifactId>
69
        <version>481.v7b_09e538fcca</version>
J
Jesse Glick 已提交
70
      </dependency>
71 72 73 74
      <dependency>
        <!-- RequireUpperBoundDeps via mailer and junit -->
        <groupId>org.jenkins-ci.plugins</groupId>
        <artifactId>display-url-api</artifactId>
75
        <version>2.3.7</version>
76
      </dependency>
77 78 79 80
      <dependency>
        <!-- requireUpperBoundDeps via matrix-project and junit -->
        <groupId>org.jenkins-ci.plugins</groupId>
        <artifactId>script-security</artifactId>
81
        <version>1229.v4880b_b_e905a_6</version>
82
      </dependency>
83 84 85
    </dependencies>
  </dependencyManagement>
  <dependencies>
B
Basil Crow 已提交
86 87 88 89 90 91 92
    <!-- For maven-hpi-plugin -->
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>jenkins-core</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
93 94 95
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>jenkins-test-harness</artifactId>
96
      <version>1949.vb_b_37feefe78c</version>
97 98 99 100 101 102 103 104 105 106 107
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>${project.groupId}</groupId>
          <artifactId>jenkins-war</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>jenkins-test-harness-tools</artifactId>
108
      <version>2.2</version>
109
      <scope>test</scope>
110 111 112 113 114 115
      <exclusions>
        <exclusion>
          <groupId>${project.groupId}</groupId>
          <artifactId>jenkins-test-harness</artifactId>
        </exclusion>
      </exclusions>
116
    </dependency>
B
Basil Crow 已提交
117
    <dependency>
B
Basil Crow 已提交
118 119 120 121
      <groupId>${project.groupId}</groupId>
      <artifactId>jenkins-war</artifactId>
      <version>${project.version}</version>
      <type>executable-war</type>
B
Basil Crow 已提交
122 123
      <scope>test</scope>
    </dependency>
B
Basil Crow 已提交
124
    <dependency>
B
Basil Crow 已提交
125 126
      <groupId>io.jenkins.plugins</groupId>
      <artifactId>javax-mail-api</artifactId>
127
      <version>1.6.2-9</version>
128 129 130
      <scope>test</scope>
    </dependency>
    <dependency>
B
Basil Crow 已提交
131 132 133
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <version>4.2.0</version>
134
      <scope>test</scope>
135
    </dependency>
B
Basil Crow 已提交
136
    <dependency>
B
Basil Crow 已提交
137 138
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
B
Basil Crow 已提交
139 140
      <scope>test</scope>
    </dependency>
141
    <dependency>
B
Basil Crow 已提交
142 143
      <groupId>org.jenkins-ci</groupId>
      <artifactId>test-annotations</artifactId>
144
      <scope>test</scope>
145
    </dependency>
146 147 148
    <dependency>
      <groupId>org.jenkins-ci.modules</groupId>
      <artifactId>instance-identity</artifactId>
149
      <version>142.v04572ca_5b_265</version>
150 151
      <scope>test</scope>
    </dependency>
152 153 154
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>antisamy-markup-formatter</artifactId>
155
      <version>159.v25b_c67cd35fb_</version>
156 157 158 159
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
B
Basil Crow 已提交
160
      <artifactId>cloudbees-folder</artifactId>
161
      <version>6.815.v0dd5a_cb_40e0e</version>
162
      <scope>test</scope>
163
    </dependency>
164 165 166
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>credentials</artifactId>
167
      <version>1224.vc23ca_a_9a_2cb_0</version>
168 169
      <scope>test</scope>
    </dependency>
170 171 172
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>junit</artifactId>
173
      <version>1189.v1b_e593637fa_e</version>
174 175 176 177
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
B
Basil Crow 已提交
178
      <artifactId>mailer</artifactId>
179
      <version>448.v5b_97805e3767</version>
180 181 182
      <scope>test</scope>
    </dependency>
    <dependency>
B
Basil Crow 已提交
183 184
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>matrix-auth</artifactId>
185
      <version>3.1.6</version>
B
Basil Crow 已提交
186 187 188 189 190
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>matrix-project</artifactId>
191
      <version>785.v06b_7f47b_c631</version>
B
Basil Crow 已提交
192 193 194 195 196
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId>
      <artifactId>structs</artifactId>
197
      <version>324.va_f5d6774f3a_d</version>
198
      <scope>test</scope>
199
    </dependency>
200 201 202 203 204 205 206 207 208 209
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <scope>test</scope>
    </dependency>
210 211
    <dependency>
      <groupId>org.mockito</groupId>
T
Tim Jacomb 已提交
212
      <artifactId>mockito-inline</artifactId>
213 214 215 216 217 218 219 220 221
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.jenkins-ci.tools</groupId>
        <artifactId>maven-hpi-plugin</artifactId>
222
        <!-- Version specified in grandparent POM -->
223
        <extensions>true</extensions>
B
Basil Crow 已提交
224
        <executions>
225 226 227 228 229 230 231
          <execution>
            <id>prepare-test-plugins</id>
            <goals>
              <goal>resolve-test-dependencies</goal>
            </goals>
            <phase>test-compile</phase>
          </execution>
B
Basil Crow 已提交
232 233 234 235 236 237 238 239
          <execution>
            <id>test-runtime</id>
            <goals>
              <goal>test-runtime</goal>
            </goals>
            <phase>test</phase>
          </execution>
        </executions>
240 241 242
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
243
        <!-- Version specified in grandparent POM -->
244 245 246 247 248 249 250
        <executions>
          <execution>
            <id>old-remoting-for-test</id>
            <goals>
              <!-- we use copy as this is a dependency from outside the reactor -->
              <goal>copy</goal>
            </goals>
B
Basil Crow 已提交
251
            <phase>generate-test-resources</phase>
252 253 254 255 256 257 258 259
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.jenkins-ci.main</groupId>
                  <artifactId>remoting</artifactId>
                  <version>${remoting.minimum.supported.version}</version>
                  <type>jar</type>
                  <outputDirectory>${project.build.outputDirectory}/old-remoting</outputDirectory>
260
                  <destFileName>remoting-minimum-supported.jar</destFileName>
261
                </artifactItem>
262 263 264
                <artifactItem>
                  <groupId>org.jenkins-ci.main</groupId>
                  <artifactId>remoting</artifactId>
265
                  <version>4.6</version>
266 267 268 269
                  <type>jar</type>
                  <outputDirectory>${project.build.outputDirectory}/old-remoting</outputDirectory>
                  <destFileName>remoting-unsupported.jar</destFileName>
                </artifactItem>
270 271 272 273 274 275 276 277
                <artifactItem>
                  <groupId>io.jenkins.plugins</groupId>
                  <artifactId>design-library</artifactId>
                  <version>91.v257f311ea_1dc</version>
                  <type>hpi</type>
                  <outputDirectory>${project.build.outputDirectory}/plugins</outputDirectory>
                  <destFileName>design-library.jpi</destFileName>
                </artifactItem>
278 279 280 281 282 283 284 285 286 287
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <!-- version specified in grandparent pom -->
        <configuration>
B
Basil Crow 已提交
288
          <argLine>@{jacocoSurefireArgs} -Xmx1g @{jenkins.addOpens} @{jenkins.insaneHook}</argLine>
289
          <systemPropertyVariables>
B
Basil Crow 已提交
290 291
            <hudson.maven.debug>${mavenDebug}</hudson.maven.debug>
            <buildDirectory>${project.build.directory}</buildDirectory>
292 293 294
          </systemPropertyVariables>
          <reuseForks>false</reuseForks>
        </configuration>
B
Basil Crow 已提交
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312
        <executions>
          <!-- Unbind the default execution so that it does not run before test-runtime. -->
          <execution>
            <id>default-test</id>
            <goals>
              <goal>test</goal>
            </goals>
            <phase>none</phase>
          </execution>
          <!-- Bind a new execution which, by virtue of being declared after test-runtime, will also run after it. -->
          <execution>
            <id>functional-test</id>
            <goals>
              <goal>test</goal>
            </goals>
            <phase>test</phase>
          </execution>
        </executions>
313 314 315
      </plugin>
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
316
        <!-- Version specified in grandparent POM -->
317 318 319 320 321 322 323
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
324
        <!-- Version specified in grandparent POM -->
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346
        <configuration>
          <fork>true</fork>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <!-- Profile, which allows skipping all integration tests -->
      <id>light-test</id>
      <properties>
        <skipTests>true</skipTests>
      </properties>
    </profile>
    <profile>
      <!-- Profile, which runs only a number of quick integration tests so that the build takes less than 5 minutes -->
      <id>smoke-test</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
347
            <!-- Version specified in grandparent POM -->
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366
            <configuration>
              <groups>org.jvnet.hudson.test.SmokeTest</groups>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>all-tests</id>
      <activation>
        <property>
          <name>!test</name>
        </property>
      </activation>
      <properties>
        <surefire.skipAfterFailureCount>100</surefire.skipAfterFailureCount>
      </properties>
    </profile>
    <profile>
B
Basil Crow 已提交
367
      <id>enable-jacoco</id>
368 369 370 371 372
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
B
Basil Crow 已提交
373
            <!-- Version specified in parent POM -->
374 375 376 377 378 379 380
            <executions>
              <execution>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
                <configuration>
                  <propertyName>jacocoSurefireArgs</propertyName>
B
Basil Crow 已提交
381 382 383 384 385 386 387 388 389 390
                  <includes>
                    <include>hudson/*</include>
                    <include>hudson/**/*</include>
                    <include>jenkins/*</include>
                    <include>jenkins/**/*</include>
                    <include>org/jenkins/**/*</include>
                  </includes>
                  <excludes>
                    <exclude>**/Messages.class</exclude>
                  </excludes>
391 392 393 394 395 396 397 398
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
K
kohsuke 已提交
399
</project>