|
1 | 1 | <!-- |
2 | | -
|
3 | 2 | Copyright 2020 LinkedIn Corporation. All rights reserved. |
4 | 3 | Licensed under the BSD-2 Clause license. |
5 | 4 | See LICENSE in the project root for license information. |
6 | | -
|
7 | 5 | --> |
8 | 6 | <ivysettings> |
| 7 | + |
| 8 | + <!-- Define timeouts for resolvers |
| 9 | + Reference: https://ant.apache.org/ivy/history/2.5.0-rc1/settings/timeout-constraint.html |
| 10 | +
|
| 11 | + The <timeout-constraint> element allows you to define named timeout constraints that can be referenced |
| 12 | + in other parts of the Ivy settings file, such as resolvers. |
| 13 | +
|
| 14 | + Attributes: |
| 15 | + - name: (Required) The name of the timeout constraint. |
| 16 | + - connectionTimeout: (Optional) Specifies the time, in milliseconds, to wait for a connection to be established. |
| 17 | + - A value greater than 0 is used literally as the timeout. |
| 18 | + - A value of 0 indicates no timeout (wait-forever). |
| 19 | + - A value less than 0 lets the users of this timeout constraint decide what semantics to use. |
| 20 | + - readTimeout: (Optional) Specifies the time, in milliseconds, to wait when reading content from a resource after a connection is established. |
| 21 | + - A value greater than 0 is used literally as the timeout. |
| 22 | + - A value of 0 indicates no timeout (wait-forever). |
| 23 | + - A value less than 0 lets the users of this timeout constraint decide what semantics to use. |
| 24 | + |
| 25 | + For large files, this setting helps avoid premature timeouts during the download process. The `readTimeout` is |
| 26 | + applied between receiving data packets, not for the entire download process. If the server continuously sends data, |
| 27 | + this timeout won't be triggered. |
| 28 | + --> |
| 29 | + <timeout-constraint name="default-timeout" connect-timeout="10000" read-timeout="30000" /> |
| 30 | + |
9 | 31 | <property name="artifactory.base.url" value="http://artifactory.corp.linkedin.com:8081/artifactory"/> |
10 | 32 | <property name="artifactory.failover.url" value="http://artifactory-failover.corp.linkedin.com:8081/artifactory"/> |
| 33 | + |
11 | 34 | <caches lockStrategy="artifact-lock" /> |
12 | 35 | <settings defaultResolver="downloadGrapes" /> |
| 36 | + |
13 | 37 | <resolvers> |
14 | 38 | <chain name="downloadGrapes" returnFirst="true"> |
15 | | - |
| 39 | + |
16 | 40 | <dual name="artifactory-release-resolver"> |
17 | | - <url name="public" m2compatible="true"> |
| 41 | + <url name="public" m2compatible="true" timeout-constraint="default-timeout"> |
18 | 42 | <ivy pattern="${artifactory.base.url}/release/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).ivy" /> |
19 | 43 | </url> |
20 | 44 | <ibiblio name="public" m2compatible="true" root="${artifactory.base.url}/release" /> |
21 | 45 | </dual> |
22 | 46 |
|
23 | 47 | <dual name="artifactory-release-failover-resolver"> |
24 | | - <url name="public" m2compatible="true"> |
| 48 | + <url name="public" m2compatible="true" timeout-constraint="default-timeout"> |
25 | 49 | <ivy pattern="${artifactory.failover.url}/release/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).ivy" /> |
26 | 50 | </url> |
27 | 51 | <ibiblio name="public" m2compatible="true" root="${artifactory.failover.url}/release" /> |
28 | 52 | </dual> |
29 | 53 |
|
30 | 54 | <dual name="artifactory-snapshot-resolver"> |
31 | | - <url name="public" m2compatible="true"> |
| 55 | + <url name="public" m2compatible="true" timeout-constraint="default-timeout"> |
32 | 56 | <ivy pattern="${artifactory.base.url}/snapshot/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).ivy" /> |
33 | 57 | </url> |
34 | 58 | <ibiblio name="public" m2compatible="true" root="${artifactory.base.url}/snapshot" /> |
35 | 59 | </dual> |
36 | 60 |
|
37 | 61 | <dual name="artifactory-snapshot-failover-resolver"> |
38 | | - <url name="public" m2compatible="true"> |
| 62 | + <url name="public" m2compatible="true" timeout-constraint="default-timeout"> |
39 | 63 | <ivy pattern="${artifactory.failover.url}/snapshot/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).ivy" /> |
40 | 64 | </url> |
41 | 65 | <ibiblio name="public" m2compatible="true" root="${artifactory.failover.url}/snapshot" /> |
|
0 commit comments