Mercurial > public > develkit
annotate ivy-ant.xml @ 340:5b1ab7484ad7
testing
author | marc_davis <davis@ssdt-ohio.org> |
---|---|
date | Tue, 30 May 2023 13:30:44 -0400 |
parents | 6c62c55b613f |
children |
rev | line source |
---|---|
4 | 1 <?xml version="1.0" encoding="UTF-8"?> |
8
26a4d8410fdf
TL-32: Refactor ivy include for non-ivy based projects.
smith@nwoca.org
parents:
4
diff
changeset
|
2 <project name="ivy-ant" basedir="." |
110
d5e9a144ce40
Add task to manually publish artifacts to artifactory
smith@nwoca.org
parents:
69
diff
changeset
|
3 xmlns:ivy="antlib:fr.jayasoft.ivy.ant" |
d5e9a144ce40
Add task to manually publish artifacts to artifactory
smith@nwoca.org
parents:
69
diff
changeset
|
4 xmlns:ssdt="http://www.ssdt-ohio.org/ant/common"> |
18
e4c45fd105ea
TL-32: Modify iivy-ant to retrieve 'runtime' conf for web libraries.
smith@nwoca.org
parents:
8
diff
changeset
|
5 |
321
6c62c55b613f
USASR-5111: Adding legacy jars.
Jason Klinger <klinger@nwoca.org>
parents:
320
diff
changeset
|
6 <property name="ssdt.ivy.jar.src" value="${ssdt.devel.kit.src}/legacy.jars/ivy.jar"/> |
18
e4c45fd105ea
TL-32: Modify iivy-ant to retrieve 'runtime' conf for web libraries.
smith@nwoca.org
parents:
8
diff
changeset
|
7 <property name="ssdt.ivy.settings.src" value="${ssdt.devel.kit.src}/ssdt.default.ivy.settings.xml"/> |
8
26a4d8410fdf
TL-32: Refactor ivy include for non-ivy based projects.
smith@nwoca.org
parents:
4
diff
changeset
|
8 |
26a4d8410fdf
TL-32: Refactor ivy include for non-ivy based projects.
smith@nwoca.org
parents:
4
diff
changeset
|
9 <ssdt:fetch dest="${user.home.ant.lib}/ivy.jar" |
26a4d8410fdf
TL-32: Refactor ivy include for non-ivy based projects.
smith@nwoca.org
parents:
4
diff
changeset
|
10 src="${ssdt.ivy.jar.src}"/> |
4 | 11 |
12 <dirname property="ivy.home" file="${ant.file.ivy-ant}"/> | |
13 <property name="ivy-ant.location" location="${ant.file.ivy-ant}"/> | |
14 <dirname property="ivy-ant.base" file="${ivy-ant.location}"/> | |
15 | |
66
a85308f02ef4
update clean targets to handle user ivy in different location
smith@nwoca.org
parents:
62
diff
changeset
|
16 <property name="ivy.default.ivy.user.dir" |
a85308f02ef4
update clean targets to handle user ivy in different location
smith@nwoca.org
parents:
62
diff
changeset
|
17 value="${user.home}/.ivy2"/> |
4 | 18 <property name="ivy.default.cache.dir" |
66
a85308f02ef4
update clean targets to handle user ivy in different location
smith@nwoca.org
parents:
62
diff
changeset
|
19 value="${ivy.default.ivy.user.dir}/cache"/> |
4 | 20 <property name="ivy.local.default.root" |
68
bd192b070501
correct problem with location of default local dir
smith@nwoca.org
parents:
66
diff
changeset
|
21 value="${ivy.default.ivy.user.dir}/local"/> |
4 | 22 |
8
26a4d8410fdf
TL-32: Refactor ivy include for non-ivy based projects.
smith@nwoca.org
parents:
4
diff
changeset
|
23 <ssdt:fetch dest="${ssdt.devel.kit}/ssdt.default.ivy.settings.xml" |
26a4d8410fdf
TL-32: Refactor ivy include for non-ivy based projects.
smith@nwoca.org
parents:
4
diff
changeset
|
24 src="${ssdt.ivy.settings.src}"/> |
26a4d8410fdf
TL-32: Refactor ivy include for non-ivy based projects.
smith@nwoca.org
parents:
4
diff
changeset
|
25 |
4 | 26 <target name="ivy-report" depends="init"> |
27 <mkdir dir="${build.dir}/ivy"/> | |
28 <ivy:resolve log="quiet" file="ivy.xml"/> | |
69
9e09ab83f8d9
add proper ivy pattern for ssdt release repository
smith@nwoca.org
parents:
68
diff
changeset
|
29 <ivy:report todir="${build.dir}/ivy" conf="runtime" graph="false" dot="true" xml="true"/> |
9e09ab83f8d9
add proper ivy pattern for ssdt release repository
smith@nwoca.org
parents:
68
diff
changeset
|
30 <ivy:artifactreport tofile="${build.dir}/ivy/artifact-report.xml" /> |
4 | 31 </target> |
32 | |
33 <target name="ivy-info" depends="init"> | |
34 <ivy:info file="ivy.xml" property="ivy.project"/> | |
35 <echoproperties prefix="ivy.project"/> | |
36 </target> | |
37 | |
48
561ece0a8225
Return to using snapshot resolver to ensure ivy.xml file from dependency can be found and improve performance and tracbility. removed changing from chain. Modified local to be treated as local.
smith@nwoca.org
parents:
26
diff
changeset
|
38 <target name="ivy-clean-all" description="cleans ssdt caches and local builds" depends="init"> |
66
a85308f02ef4
update clean targets to handle user ivy in different location
smith@nwoca.org
parents:
62
diff
changeset
|
39 <delete failonerror="false" includeemptydirs="true" dir="${ivy.default.ivy.user.dir}"/> |
48
561ece0a8225
Return to using snapshot resolver to ensure ivy.xml file from dependency can be found and improve performance and tracbility. removed changing from chain. Modified local to be treated as local.
smith@nwoca.org
parents:
26
diff
changeset
|
40 </target> |
561ece0a8225
Return to using snapshot resolver to ensure ivy.xml file from dependency can be found and improve performance and tracbility. removed changing from chain. Modified local to be treated as local.
smith@nwoca.org
parents:
26
diff
changeset
|
41 |
4 | 42 <target name="ivy-clean" description="cleans ssdt caches and local builds" depends="init"> |
43 <delete failonerror="false" includeemptydirs="true"> | |
66
a85308f02ef4
update clean targets to handle user ivy in different location
smith@nwoca.org
parents:
62
diff
changeset
|
44 <fileset dir="${ivy.default.ivy.user.dir}/cache"> |
48
561ece0a8225
Return to using snapshot resolver to ensure ivy.xml file from dependency can be found and improve performance and tracbility. removed changing from chain. Modified local to be treated as local.
smith@nwoca.org
parents:
26
diff
changeset
|
45 <include name="*ssdt*.*"/> |
4 | 46 </fileset> |
47 </delete> | |
66
a85308f02ef4
update clean targets to handle user ivy in different location
smith@nwoca.org
parents:
62
diff
changeset
|
48 <delete dir="${ivy.default.ivy.user.dir}/cache/org.ssdt_ohio" failonerror="false"/> |
a85308f02ef4
update clean targets to handle user ivy in different location
smith@nwoca.org
parents:
62
diff
changeset
|
49 <delete dir="${ivy.default.ivy.user.dir}/cache/org.nwoca.ssdt" failonerror="false"/> |
a85308f02ef4
update clean targets to handle user ivy in different location
smith@nwoca.org
parents:
62
diff
changeset
|
50 <delete dir="${ivy.default.ivy.user.dir}/ssdt-cache" failonerror="false"/> |
a85308f02ef4
update clean targets to handle user ivy in different location
smith@nwoca.org
parents:
62
diff
changeset
|
51 <delete dir="${ivy.default.ivy.user.dir}/snapshot-cache" failonerror="false"/> |
a85308f02ef4
update clean targets to handle user ivy in different location
smith@nwoca.org
parents:
62
diff
changeset
|
52 <delete dir="${ivy.default.ivy.user.dir}/local" failonerror="false"/> |
4 | 53 </target> |
54 | |
55 <target name="-ivy-retrieve-custom" depends="-ivy-define-classpaths,-ivy-retrieve-web-jars"> | |
56 </target> | |
57 | |
58 <target name="-ivy-copy-webjars" if="build.web.dir"> | |
59 <ivy:resolve log="quiet" file="ivy.xml"/> | |
18
e4c45fd105ea
TL-32: Modify iivy-ant to retrieve 'runtime' conf for web libraries.
smith@nwoca.org
parents:
8
diff
changeset
|
60 <ivy:retrieve pattern="${basedir}/${build.web.dir}/WEB-INF/lib/[artifact]-[revision].[ext]" type="jar" conf="runtime"/> |
4 | 61 </target> |
62 | |
63 <target name="-ivy-retrieve-web-jars" if="build.web.dir"> | |
18
e4c45fd105ea
TL-32: Modify iivy-ant to retrieve 'runtime' conf for web libraries.
smith@nwoca.org
parents:
8
diff
changeset
|
64 <ivy:retrieve pattern="${basedir}/${build.web.dir}/WEB-INF/lib/[artifact]-[revision].[ext]" type="jar" conf="runtime"/> |
4 | 65 </target> |
66 | |
67 <target name="-ivy-define-classpaths"> | |
68 <!-- Custom SSDT retrieve target to replaced IvyBean's default -ivy-retrieve. | |
69 Builds a separate classpath for javac, javac.test, run, run.test, etc based | |
70 on the ivy configurations similer to how NetBeans would build them. | |
71 Uses "ivy:cachepath" instead of "ivy:retrieve". Although is is contrary | |
72 to "best practice" it avoids transfering all jars to build directory and | |
73 avoids problem with 'clean'. NetBeans and ant don't care where the files | |
74 are on disk and the builds are dependent on Ivy anyway. But the "runtime" jars | |
75 are still placed in dist/libs based on the correct run.classpath built by this | |
76 target. | |
77 --> | |
78 <ivy:settings file="ivysettings.xml"/> | |
53
7066d68bcb47
enable resolve logging. Fixed changing pattern. set ttl on snapshot cache. Allow forcemode to be disabled.
smith@nwoca.org
parents:
48
diff
changeset
|
79 <ivy:resolve file="ivy.xml" /> |
19
2632897c8a2b
CM-125: Update ivy resolve to create Ant properties for resolved modules with version.
smith@nwoca.org
parents:
18
diff
changeset
|
80 <ivy:artifactproperty conf="*" |
110
d5e9a144ce40
Add task to manually publish artifacts to artifactory
smith@nwoca.org
parents:
69
diff
changeset
|
81 name="ivydeps.[organisation]-[module]" |
d5e9a144ce40
Add task to manually publish artifacts to artifactory
smith@nwoca.org
parents:
69
diff
changeset
|
82 value="[revision]"/> |
4 | 83 |
84 <ivy:cachepath pathid="ivy.javac.classpath.id" conf="compile" type="jar"/> | |
85 <pathconvert dirsep="/" pathsep="${path.separator}" property="ivy.javac.classpath"> | |
86 <path refid="ivy.javac.classpath.id"/> | |
87 <!--map from="${basedir}${file.separator}" to=""/--> | |
88 </pathconvert> | |
89 <property name="old.javac.classpath" value="${javac.classpath}"/> | |
90 <var name="javac.classpath" unset="true"/> | |
91 <if> | |
92 <equals arg1="${old.javac.classpath}" arg2=""/> | |
93 <then> | |
94 <property name="javac.classpath" value="${ivy.javac.classpath}"/> | |
95 </then> | |
96 <else> | |
97 <property name="javac.classpath" value="${old.javac.classpath}${path.separator}${ivy.javac.classpath}"/> | |
98 </else> | |
99 </if> | |
100 <echo level="debug" message="$${javac.classpath} : ${javac.classpath}"/> | |
101 | |
102 <ivy:cachepath pathid="ivy.javac.test.classpath.id" conf="compile,compile-test" type="jar"/> | |
103 <pathconvert dirsep="/" pathsep="${path.separator}" property="ivy.javac.test.classpath"> | |
104 <path refid="ivy.javac.test.classpath.id"/> | |
105 <!--map from="${basedir}${file.separator}" to=""/--> | |
106 </pathconvert> | |
107 <property name="old.javac.test.classpath" value="${javac.test.classpath}"/> | |
108 <var name="javac.test.classpath" unset="true"/> | |
109 <if> | |
110 <equals arg1="${old.javac.test.classpath}" arg2=""/> | |
111 <then> | |
112 <property name="javac.test.classpath" value="${ivy.javac.test.classpath}"/> | |
113 </then> | |
114 <else> | |
115 <property name="javac.test.classpath" value="${old.javac.test.classpath}${path.separator}${ivy.javac.test.classpath}"/> | |
116 </else> | |
117 </if> | |
118 <echo level="debug" message="$${javac.test.classpath} : ${javac.test.classpath}"/> | |
119 | |
120 <ivy:cachepath pathid="ivy.run.classpath.id" conf="compile,runtime" type="jar"/> | |
121 <pathconvert dirsep="/" pathsep="${path.separator}" property="ivy.run.classpath"> | |
122 <path refid="ivy.run.classpath.id"/> | |
123 <!--map from="${basedir}${file.separator}" to=""/--> | |
124 </pathconvert> | |
125 <property name="old.run.classpath" value="${run.classpath}"/> | |
126 <var name="run.classpath" unset="true"/> | |
127 <if> | |
128 <equals arg1="${old.run.classpath}" arg2="$${run.classpath}"/> | |
129 <then> | |
130 <property name="run.classpath" value="${ivy.run.classpath}"/> | |
131 </then> | |
132 <else> | |
133 <property name="run.classpath" value="${old.run.classpath}${path.separator}${ivy.run.classpath}"/> | |
134 </else> | |
135 </if> | |
136 <echo level="debug" message="$${run.classpath} : ${run.classpath}"/> | |
137 | |
138 | |
139 <ivy:cachepath pathid="ivy.run.test.classpath.id" conf="compile,compile-test,runtime,runtime-test" type="jar"/> | |
140 <pathconvert dirsep="/" pathsep="${path.separator}" property="ivy.run.test.classpath"> | |
141 <path refid="ivy.run.test.classpath.id"/> | |
142 <!--map from="${basedir}${file.separator}" to=""/--> | |
143 </pathconvert> | |
144 | |
145 <property name="old.run.test.classpath" value="${run.test.classpath}"/> | |
146 <var name="run.test.classpath" unset="true"/> | |
147 <if> | |
148 <equals arg1="${old.run.test.classpath}" arg2="$${run.test.classpath}"/> | |
149 <then> | |
150 <property name="run.test.classpath" value="${ivy.run.test.classpath}"/> | |
151 </then> | |
152 <else> | |
153 <property name="run.test.classpath" value="${old.run.test.classpath}${path.separator}${ivy.run.test.classpath}"/> | |
154 </else> | |
155 </if> | |
26 | 156 <if> |
48
561ece0a8225
Return to using snapshot resolver to ensure ivy.xml file from dependency can be found and improve performance and tracbility. removed changing from chain. Modified local to be treated as local.
smith@nwoca.org
parents:
26
diff
changeset
|
157 <isset property="coverage.run.with.cobertura"/> |
561ece0a8225
Return to using snapshot resolver to ensure ivy.xml file from dependency can be found and improve performance and tracbility. removed changing from chain. Modified local to be treated as local.
smith@nwoca.org
parents:
26
diff
changeset
|
158 <then> |
26 | 159 <property name="precoverage.run.test.classpath" value="${run.test.classpath}"/> |
160 <var name="run.test.classpath" unset="true"/> | |
161 <property name="run.test.classpath" value="${cobertura.instrumented.classes}${path.separator}${precoverage.run.test.classpath}${path.separator}${cobertura.classpath.path}"/> | |
162 </then> | |
48
561ece0a8225
Return to using snapshot resolver to ensure ivy.xml file from dependency can be found and improve performance and tracbility. removed changing from chain. Modified local to be treated as local.
smith@nwoca.org
parents:
26
diff
changeset
|
163 </if> |
26 | 164 <if> |
48
561ece0a8225
Return to using snapshot resolver to ensure ivy.xml file from dependency can be found and improve performance and tracbility. removed changing from chain. Modified local to be treated as local.
smith@nwoca.org
parents:
26
diff
changeset
|
165 <isset property="coverage.run.with.clover"/> |
561ece0a8225
Return to using snapshot resolver to ensure ivy.xml file from dependency can be found and improve performance and tracbility. removed changing from chain. Modified local to be treated as local.
smith@nwoca.org
parents:
26
diff
changeset
|
166 <then> |
26 | 167 <property name="preclover.run.test.classpath" value="${run.test.classpath}"/> |
168 <var name="run.test.classpath" unset="true"/> | |
169 <property name="run.test.classpath" value="${preclover.run.test.classpath}${path.separator}${clover.jar.file}"/> | |
170 </then> | |
48
561ece0a8225
Return to using snapshot resolver to ensure ivy.xml file from dependency can be found and improve performance and tracbility. removed changing from chain. Modified local to be treated as local.
smith@nwoca.org
parents:
26
diff
changeset
|
171 </if> |
26 | 172 |
4 | 173 <echo level="debug" message="$${run.test.classpath} : ${run.test.classpath}"/> |
174 | |
175 <ivy:cachepath pathid="ivy.debug.classpath.id" conf="compile,runtime" type="jar"/> | |
176 <pathconvert dirsep="/" pathsep="${path.separator}" property="ivy.debug.classpath"> | |
177 <path refid="ivy.debug.classpath.id"/> | |
178 <!--map from="${basedir}${file.separator}" to=""/--> | |
179 </pathconvert> | |
180 <property name="old.debug.classpath" value="${debug.classpath}"/> | |
181 <var name="debug.classpath" unset="true"/> | |
182 <if> | |
183 <equals arg1="${old.debug.classpath}" arg2="$${debug.classpath}"/> | |
184 <then> | |
185 <property name="debug.classpath" value="${ivy.debug.classpath}"/> | |
186 </then> | |
187 <else> | |
188 <property name="debug.classpath" value="${old.debug.classpath}${path.separator}${ivy.debug.classpath}"/> | |
189 </else> | |
190 </if> | |
191 <echo level="debug" message="$${debug.classpath} : ${debug.classpath}"/> | |
192 | |
193 <ivy:cachepath pathid="ivy.debug.test.classpath.id" conf="compile,compile-test,runtime,runtime-test" type="jar"/> | |
194 <pathconvert dirsep="/" pathsep="${path.separator}" property="ivy.debug.test.classpath"> | |
195 <path refid="ivy.debug.test.classpath.id"/> | |
196 <!--map from="${basedir}${file.separator}" to=""/--> | |
197 </pathconvert> | |
198 <property name="old.debug.test.classpath" value="${debug.test.classpath}"/> | |
199 <var name="debug.test.classpath" unset="true"/> | |
200 <if> | |
201 <equals arg1="${old.debug.test.classpath}" arg2="$${debug.test.classpath}"/> | |
202 <then> | |
203 <property name="debug.test.classpath" value="${ivy.debug.test.classpath}"/> | |
204 </then> | |
205 <else> | |
206 <property name="debug.test.classpath" value="${old.debug.test.classpath}${path.separator}${ivy.debug.test.classpath}"/> | |
207 </else> | |
208 </if> | |
209 <echo level="debug" message="$${debug.test.classpath} : ${debug.test.classpath}"/> | |
210 </target> | |
211 | |
212 | |
213 <target name="-ivy-javaagent" description="Retrieves load time weaver java agent"> | |
214 <property name="java.agent.org" value="org.springframework"/> | |
215 <property name="java.agent.module" value="org.springframework.instrument"/> | |
216 <property name="java.agent.revision" value="3.0.1.RELEASE-A"/> | |
217 <ivy:resolve resolveId="javaagentid" | |
218 organisation="${java.agent.org}" | |
219 module="${java.agent.module}" | |
220 revision="${java.agent.revision}" | |
221 type="jar" | |
222 inline="true" | |
223 keep="true" | |
224 log="quiet"/> | |
225 <ivy:retrieve | |
226 resolveid="javaagentid" | |
227 pattern="${basedir}/${build.dir}/${lib.dir}/java-agent.[ext]" | |
228 type="jar" | |
229 log="quiet"/> | |
230 <property name="java.agent.jar" | |
231 value="build/jar/java-agent.jar"/> | |
232 </target> | |
233 | |
110
d5e9a144ce40
Add task to manually publish artifacts to artifactory
smith@nwoca.org
parents:
69
diff
changeset
|
234 <target name="artifactoryPublish" depends="init"> |
d5e9a144ce40
Add task to manually publish artifacts to artifactory
smith@nwoca.org
parents:
69
diff
changeset
|
235 <ivy:settings/> |
d5e9a144ce40
Add task to manually publish artifacts to artifactory
smith@nwoca.org
parents:
69
diff
changeset
|
236 <ivy:resolve file="ivy.xml"/> |
112 | 237 <ivy:publish forcedeliver="true" overwrite="true" resolver="ssdt-snapshots-local"> |
113
86fdadd7468a
set artifact pattern to match netbeans project default
smith@nwoca.org
parents:
112
diff
changeset
|
238 <artifacts pattern="${basedir}/${dist.dir}/[artifact].[ext]"/> |
110
d5e9a144ce40
Add task to manually publish artifacts to artifactory
smith@nwoca.org
parents:
69
diff
changeset
|
239 </ivy:publish> |
d5e9a144ce40
Add task to manually publish artifacts to artifactory
smith@nwoca.org
parents:
69
diff
changeset
|
240 </target> |
4 | 241 |
242 </project> |