forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathivysettings.xml
68 lines (56 loc) · 3.18 KB
/
ivysettings.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0"?>
<!--
Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
Licensed under the Apache License, Version 2.0 (see LICENSE).
-->
<ivysettings>
<settings defaultResolver="pants-chain-repos"/>
<property name="m2.repo.relpath" value="[organisation]/[module]/[revision]"/>
<property name="m2.repo.pom" value="${m2.repo.relpath}/[module]-[revision].pom"/>
<property name="m2.repo.artifact"
value="${m2.repo.relpath}/[artifact](-[classifier])-[revision].[ext]"/>
<property name="m2.repo.dir" value="${user.home}/.m2/repository" override="false"/>
<!-- This dance to set ANDROID_HOME seems more complex than it need be, but an absolute path is
needed whether or not the ANDROID_HOME env var is set and just using the following does
not work to default the value when unset in the environment:
<properties environment="env"/>
<property name="env.ANDROID_HOME" value="/please-export-your-ANDROID_HOME" override="false"/>
-->
<properties environment="env"/>
<property name="ANDROID_HOME"
value="/please-export-your-ANDROID_HOME"
unlessset="env.ANDROID_HOME"/>
<property name="ANDROID_HOME"
value="${env.ANDROID_HOME}"
ifset="env.ANDROID_HOME"/>
<property name="android.repo.dir" value="${ANDROID_HOME}/extras/android/m2repository"/>
<property name="google.repo.dir" value="${ANDROID_HOME}/extras/google/m2repository"/>
<resolvers>
<chain name="pants-chain-repos" returnFirst="true">
<!-- By default ivy does not require metadata (or successful metadata downloads).
This can lead to jars downloading without their transitive deps which leads
to confusing failures later when classpaths are constructed and used.
We setup the maven central resolver to require successful pom downloads here. -->
<ibiblio name="maven-central" m2compatible="true" descriptor="required"/>
<!-- NB: Although url resolvers (like <ibiblio/>) can be pointed at local file:// system
URLs, this leads to issues resolving any <dependency/> with a custom artifact that
defines a file:// url itself. We stick to <filesystem/> resolvers here for the
two android SDK resolvers as a result. -->
<!-- Android SDK Support Library, found in reference to the ANDROID_HOME variable. -->
<filesystem name="local.android" m2compatible="true" local="true">
<ivy pattern="${android.repo.dir}/${m2.repo.pom}"/>
<artifact pattern="${android.repo.dir}/${m2.repo.artifact}"/>
</filesystem>
<!-- Google Libraries for the Android SDK, found in reference to ANDROID_HOME. -->
<filesystem name="local.google" m2compatible="true" local="true">
<ivy pattern="${google.repo.dir}/${m2.repo.pom}"/>
<artifact pattern="${google.repo.dir}/${m2.repo.artifact}"/>
</filesystem>
<!-- The mvn standard local filesystem repo/cache -->
<filesystem name="local.m2" m2compatible="true" local="true" checkmodified="true">
<ivy pattern="${m2.repo.dir}/${m2.repo.pom}"/>
<artifact pattern="${m2.repo.dir}/${m2.repo.artifact}"/>
</filesystem>
</chain>
</resolvers>
</ivysettings>