Mercurial > public > develkit
annotate ivy-ant.xml @ 63:5d200e63ba1a
USASR-644: update to compile groovy source for web projects
author | smith@nwoca.org |
---|---|
date | Wed, 12 Oct 2011 13:06:17 -0400 |
parents | 880f230dd947 |
children | a85308f02ef4 |
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="." |
26a4d8410fdf
TL-32: Refactor ivy include for non-ivy based projects.
smith@nwoca.org
parents:
4
diff
changeset
|
3 xmlns:ivy="antlib:fr.jayasoft.ivy.ant" |
26a4d8410fdf
TL-32: Refactor ivy include for non-ivy based projects.
smith@nwoca.org
parents:
4
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 |
e4c45fd105ea
TL-32: Modify iivy-ant to retrieve 'runtime' conf for web libraries.
smith@nwoca.org
parents:
8
diff
changeset
|
6 <property name="ssdt.ivy.jar.src" value="http://ivy.ssdt.nwoca.org/repository/ivy/ivy.jar"/> |
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 | |
16 <property name="ivy.default.cache.dir" | |
17 value="${user.home}/.ivy2/cache"/> | |
18 <property name="ivy.default.ivy.user.dir" | |
19 value="${user.home}/.ivy2"/> | |
20 <property name="ivy.local.default.root" | |
21 value="${user.home}/.ivy2/local"/> | |
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"/> | |
62
880f230dd947
change ivy-report to only produce 'runtime' report and produce dot files
smith@nwoca.org
parents:
56
diff
changeset
|
29 <ivy:report todir="${build.dir}/ivy" conf="runtime" graph="false" dot="true"/> |
4 | 30 </target> |
31 | |
32 <target name="ivy-info" depends="init"> | |
33 <ivy:info file="ivy.xml" property="ivy.project"/> | |
34 <echoproperties prefix="ivy.project"/> | |
35 </target> | |
36 | |
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
|
37 <target name="ivy-clean-all" description="cleans ssdt caches and local builds" depends="init"> |
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 <delete failonerror="false" includeemptydirs="true" dir="${user.home}/.ivy2"/> |
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
|
39 </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
|
40 |
4 | 41 <target name="ivy-clean" description="cleans ssdt caches and local builds" depends="init"> |
42 <delete failonerror="false" includeemptydirs="true"> | |
43 <fileset dir="${user.home}/.ivy2/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
|
44 <include name="*ssdt*.*"/> |
4 | 45 </fileset> |
46 </delete> | |
56 | 47 <delete dir="${user.home}/.ivy2/cache/org.ssdt_ohio" failonerror="false"/> |
48 <delete dir="${user.home}/.ivy2/cache/org.nwoca.ssdt" failonerror="false"/> | |
4 | 49 <delete dir="${user.home}/.ivy2/ssdt-cache" failonerror="false"/> |
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
|
50 <delete dir="${user.home}/.ivy2/snapshot-cache" failonerror="false"/> |
4 | 51 <delete dir="${user.home}/.ivy2/local" failonerror="false"/> |
52 </target> | |
53 | |
54 <target name="-ivy-retrieve-custom" depends="-ivy-define-classpaths,-ivy-retrieve-web-jars"> | |
55 </target> | |
56 | |
57 <target name="-ivy-copy-webjars" if="build.web.dir"> | |
58 <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
|
59 <ivy:retrieve pattern="${basedir}/${build.web.dir}/WEB-INF/lib/[artifact]-[revision].[ext]" type="jar" conf="runtime"/> |
4 | 60 </target> |
61 | |
62 <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
|
63 <ivy:retrieve pattern="${basedir}/${build.web.dir}/WEB-INF/lib/[artifact]-[revision].[ext]" type="jar" conf="runtime"/> |
4 | 64 </target> |
65 | |
66 <target name="-ivy-define-classpaths"> | |
67 <!-- Custom SSDT retrieve target to replaced IvyBean's default -ivy-retrieve. | |
68 Builds a separate classpath for javac, javac.test, run, run.test, etc based | |
69 on the ivy configurations similer to how NetBeans would build them. | |
70 Uses "ivy:cachepath" instead of "ivy:retrieve". Although is is contrary | |
71 to "best practice" it avoids transfering all jars to build directory and | |
72 avoids problem with 'clean'. NetBeans and ant don't care where the files | |
73 are on disk and the builds are dependent on Ivy anyway. But the "runtime" jars | |
74 are still placed in dist/libs based on the correct run.classpath built by this | |
75 target. | |
76 --> | |
77 <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
|
78 <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
|
79 <ivy:artifactproperty conf="*" |
2632897c8a2b
CM-125: Update ivy resolve to create Ant properties for resolved modules with version.
smith@nwoca.org
parents:
18
diff
changeset
|
80 name="ivydeps.[organisation]-[module]" |
2632897c8a2b
CM-125: Update ivy resolve to create Ant properties for resolved modules with version.
smith@nwoca.org
parents:
18
diff
changeset
|
81 value="[revision]"/> |
4 | 82 |
83 <ivy:cachepath pathid="ivy.javac.classpath.id" conf="compile" type="jar"/> | |
84 <pathconvert dirsep="/" pathsep="${path.separator}" property="ivy.javac.classpath"> | |
85 <path refid="ivy.javac.classpath.id"/> | |
86 <!--map from="${basedir}${file.separator}" to=""/--> | |
87 </pathconvert> | |
88 <property name="old.javac.classpath" value="${javac.classpath}"/> | |
89 <var name="javac.classpath" unset="true"/> | |
90 <if> | |
91 <equals arg1="${old.javac.classpath}" arg2=""/> | |
92 <then> | |
93 <property name="javac.classpath" value="${ivy.javac.classpath}"/> | |
94 </then> | |
95 <else> | |
96 <property name="javac.classpath" value="${old.javac.classpath}${path.separator}${ivy.javac.classpath}"/> | |
97 </else> | |
98 </if> | |
99 <echo level="debug" message="$${javac.classpath} : ${javac.classpath}"/> | |
100 | |
101 <ivy:cachepath pathid="ivy.javac.test.classpath.id" conf="compile,compile-test" type="jar"/> | |
102 <pathconvert dirsep="/" pathsep="${path.separator}" property="ivy.javac.test.classpath"> | |
103 <path refid="ivy.javac.test.classpath.id"/> | |
104 <!--map from="${basedir}${file.separator}" to=""/--> | |
105 </pathconvert> | |
106 <property name="old.javac.test.classpath" value="${javac.test.classpath}"/> | |
107 <var name="javac.test.classpath" unset="true"/> | |
108 <if> | |
109 <equals arg1="${old.javac.test.classpath}" arg2=""/> | |
110 <then> | |
111 <property name="javac.test.classpath" value="${ivy.javac.test.classpath}"/> | |
112 </then> | |
113 <else> | |
114 <property name="javac.test.classpath" value="${old.javac.test.classpath}${path.separator}${ivy.javac.test.classpath}"/> | |
115 </else> | |
116 </if> | |
117 <echo level="debug" message="$${javac.test.classpath} : ${javac.test.classpath}"/> | |
118 | |
119 <ivy:cachepath pathid="ivy.run.classpath.id" conf="compile,runtime" type="jar"/> | |
120 <pathconvert dirsep="/" pathsep="${path.separator}" property="ivy.run.classpath"> | |
121 <path refid="ivy.run.classpath.id"/> | |
122 <!--map from="${basedir}${file.separator}" to=""/--> | |
123 </pathconvert> | |
124 <property name="old.run.classpath" value="${run.classpath}"/> | |
125 <var name="run.classpath" unset="true"/> | |
126 <if> | |
127 <equals arg1="${old.run.classpath}" arg2="$${run.classpath}"/> | |
128 <then> | |
129 <property name="run.classpath" value="${ivy.run.classpath}"/> | |
130 </then> | |
131 <else> | |
132 <property name="run.classpath" value="${old.run.classpath}${path.separator}${ivy.run.classpath}"/> | |
133 </else> | |
134 </if> | |
135 <echo level="debug" message="$${run.classpath} : ${run.classpath}"/> | |
136 | |
137 | |
138 <ivy:cachepath pathid="ivy.run.test.classpath.id" conf="compile,compile-test,runtime,runtime-test" type="jar"/> | |
139 <pathconvert dirsep="/" pathsep="${path.separator}" property="ivy.run.test.classpath"> | |
140 <path refid="ivy.run.test.classpath.id"/> | |
141 <!--map from="${basedir}${file.separator}" to=""/--> | |
142 </pathconvert> | |
143 | |
144 <property name="old.run.test.classpath" value="${run.test.classpath}"/> | |
145 <var name="run.test.classpath" unset="true"/> | |
146 <if> | |
147 <equals arg1="${old.run.test.classpath}" arg2="$${run.test.classpath}"/> | |
148 <then> | |
149 <property name="run.test.classpath" value="${ivy.run.test.classpath}"/> | |
150 </then> | |
151 <else> | |
152 <property name="run.test.classpath" value="${old.run.test.classpath}${path.separator}${ivy.run.test.classpath}"/> | |
153 </else> | |
154 </if> | |
26 | 155 <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
|
156 <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
|
157 <then> |
26 | 158 <property name="precoverage.run.test.classpath" value="${run.test.classpath}"/> |
159 <var name="run.test.classpath" unset="true"/> | |
160 <property name="run.test.classpath" value="${cobertura.instrumented.classes}${path.separator}${precoverage.run.test.classpath}${path.separator}${cobertura.classpath.path}"/> | |
161 </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
|
162 </if> |
26 | 163 <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
|
164 <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
|
165 <then> |
26 | 166 <property name="preclover.run.test.classpath" value="${run.test.classpath}"/> |
167 <var name="run.test.classpath" unset="true"/> | |
168 <property name="run.test.classpath" value="${preclover.run.test.classpath}${path.separator}${clover.jar.file}"/> | |
169 </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
|
170 </if> |
26 | 171 |
4 | 172 <echo level="debug" message="$${run.test.classpath} : ${run.test.classpath}"/> |
173 | |
174 <ivy:cachepath pathid="ivy.debug.classpath.id" conf="compile,runtime" type="jar"/> | |
175 <pathconvert dirsep="/" pathsep="${path.separator}" property="ivy.debug.classpath"> | |
176 <path refid="ivy.debug.classpath.id"/> | |
177 <!--map from="${basedir}${file.separator}" to=""/--> | |
178 </pathconvert> | |
179 <property name="old.debug.classpath" value="${debug.classpath}"/> | |
180 <var name="debug.classpath" unset="true"/> | |
181 <if> | |
182 <equals arg1="${old.debug.classpath}" arg2="$${debug.classpath}"/> | |
183 <then> | |
184 <property name="debug.classpath" value="${ivy.debug.classpath}"/> | |
185 </then> | |
186 <else> | |
187 <property name="debug.classpath" value="${old.debug.classpath}${path.separator}${ivy.debug.classpath}"/> | |
188 </else> | |
189 </if> | |
190 <echo level="debug" message="$${debug.classpath} : ${debug.classpath}"/> | |
191 | |
192 <ivy:cachepath pathid="ivy.debug.test.classpath.id" conf="compile,compile-test,runtime,runtime-test" type="jar"/> | |
193 <pathconvert dirsep="/" pathsep="${path.separator}" property="ivy.debug.test.classpath"> | |
194 <path refid="ivy.debug.test.classpath.id"/> | |
195 <!--map from="${basedir}${file.separator}" to=""/--> | |
196 </pathconvert> | |
197 <property name="old.debug.test.classpath" value="${debug.test.classpath}"/> | |
198 <var name="debug.test.classpath" unset="true"/> | |
199 <if> | |
200 <equals arg1="${old.debug.test.classpath}" arg2="$${debug.test.classpath}"/> | |
201 <then> | |
202 <property name="debug.test.classpath" value="${ivy.debug.test.classpath}"/> | |
203 </then> | |
204 <else> | |
205 <property name="debug.test.classpath" value="${old.debug.test.classpath}${path.separator}${ivy.debug.test.classpath}"/> | |
206 </else> | |
207 </if> | |
208 <echo level="debug" message="$${debug.test.classpath} : ${debug.test.classpath}"/> | |
209 </target> | |
210 | |
211 | |
212 <target name="-ivy-javaagent" description="Retrieves load time weaver java agent"> | |
213 <property name="java.agent.org" value="org.springframework"/> | |
214 <property name="java.agent.module" value="org.springframework.instrument"/> | |
215 <property name="java.agent.revision" value="3.0.1.RELEASE-A"/> | |
216 <ivy:resolve resolveId="javaagentid" | |
217 organisation="${java.agent.org}" | |
218 module="${java.agent.module}" | |
219 revision="${java.agent.revision}" | |
220 type="jar" | |
221 inline="true" | |
222 keep="true" | |
223 log="quiet"/> | |
224 <ivy:retrieve | |
225 resolveid="javaagentid" | |
226 pattern="${basedir}/${build.dir}/${lib.dir}/java-agent.[ext]" | |
227 type="jar" | |
228 log="quiet"/> | |
229 <property name="java.agent.jar" | |
230 value="build/jar/java-agent.jar"/> | |
231 </target> | |
232 | |
233 | |
234 </project> |