-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-common-ivy.xml
125 lines (105 loc) · 3.14 KB
/
build-common-ivy.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="build-common-ivy" xmlns:antelope="antlib:ise.antelope.tasks" xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="ivy.home" value="${sdk.dir}/.ivy" />
<if>
<not>
<available file="${ivy.home}/ivy-${ivy.version}.jar" />
</not>
<then>
<mkdir dir="${ivy.home}" />
<get
dest="${ivy.home}"
src="${ivy.jar.url}"
/>
</then>
</if>
<path id="ivy.lib.path">
<fileset
dir="${ivy.home}"
includes="ivy-${ivy.version}.jar"
/>
<fileset
dir="${sdk.dir}/lib"
includes="bcpg-jdk16.jar,bcprov-jdk16.jar"
/>
</path>
<taskdef classpathref="ivy.lib.path" resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" />
<for list="${basedir},${sdk.dir}" param="ivy.xml.dir">
<sequential>
<if>
<available file="@{ivy.xml.dir}/ivy.xml" />
<then>
<checksum file="@{ivy.xml.dir}/ivy.xml" verifyproperty="ivy.xml.unmodified" />
<if>
<isfalse value="${ivy.xml.unmodified}" />
<then>
<ivy:settings file="${ivy.custom.settings.file}" />
<ivy:resolve
file="@{ivy.xml.dir}/ivy.xml"
log="download-only"
transitive="false"
/>
<if>
<or>
<equals arg1="@{ivy.xml.dir}" arg2="${sdk.dir}" />
<antelope:endswith string="${ant.project.name}" with="-shared" />
<available file="@{ivy.xml.dir}/bnd.bnd" />
</or>
<then>
<ivy:retrieve
pattern="@{ivy.xml.dir}/lib/[artifact].[ext]"
type="bundle,jar,orbit"
/>
<ivy:retrieve
pattern="@{ivy.xml.dir}/lib/[artifact]-[type]s.[ext]"
type="source"
/>
</then>
<else>
<ivy:retrieve
pattern="@{ivy.xml.dir}/docroot/WEB-INF/lib/[artifact].[ext]"
type="bundle,jar,orbit"
/>
<ivy:retrieve
pattern="@{ivy.xml.dir}/docroot/WEB-INF/lib/[artifact]-[type]s.[ext]"
type="source"
/>
</else>
</if>
<checksum file="@{ivy.xml.dir}/ivy.xml" forceoverwrite="true" />
</then>
</if>
<var name="ivy.xml.unmodified" unset="true" />
</then>
</if>
</sequential>
</for>
<target name="publish">
<ivy:settings file="${sdk.dir}/ivy-settings-publisher.xml" />
<ivy:resolve
log="download-only"
transitive="false"
/>
<property name="ivy.pom.description" value="${plugin.name}" />
<property name="ivy.pom.name" value="${plugin.name}" />
<property name="plugin.release.qualifier" value="" />
<property name="ivy.pom.version" value="${plugin.full.version}${plugin.release.qualifier}" />
<ivy:makepom
description="${ivy.pom.description}"
ivyfile="ivy.xml"
pomfile="${plugin.pom.file}"
templatefile="${sdk.dir}/tools/pom_tmpl/template.pom"
/>
<ivy:publish
forcedeliver="true"
overwrite="true"
publishivy="false"
pubrevision="${ivy.pom.version}"
resolver="${ivy.publish.resolver}"
>
<artifacts pattern="${sdk.dir}/dist/${plugin.name}-${plugin.full.version}.[ext]" />
<artifacts pattern="${sdk.dir}/dist/${plugin.name}-${plugin.full.version}-[type].[ext]" />
</ivy:publish>
</target>
</project>