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