Rev 1791 | Rev 1814 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
291 | jmachado | 1 | <?xml version="1.0" encoding="UTF-8"?> |
1 | fvelez | 2 | <project name="estgweb" basedir="." default="help"> |
3 | |||
4 | |||
5 | <!-- |
||
6 | ========================================================================================== |
||
7 | ANT TASKS |
||
8 | ========================================================================================== |
||
9 | --> |
||
10 | <target name="help"> |
||
11 | <echo>This is the availible Ant Tasks:</echo> |
||
896 | jmachado | 12 | <echo message="${env.JAVA_HOME}"></echo> |
168 | fvelez | 13 | </target> |
1 | fvelez | 14 | |
15 | |||
16 | <!-- |
||
17 | ========================================================================================== |
||
18 | Path libs definitions and Properties files |
||
19 | ========================================================================================== |
||
20 | --> |
||
21 | |||
22 | |||
104 | jmachado | 23 | <import file="libs.xml"/> |
1381 | jmachado | 24 | <!--<import file="build-web-services.xml"/>--> |
1 | fvelez | 25 | |
26 | <!-- |
||
27 | ========================================================================================== |
||
28 | General Task |
||
29 | ========================================================================================== |
||
30 | --> |
||
31 | <!--caso queiramos apagar os pregen hbm delPreGenAppScripts--> |
||
1312 | jmachado | 32 | <!-- |
33 | Use by hand only |
||
215 | jmachado | 34 | <target name="all" depends="clean,initDirs,createConfigurationFiles,generateHibernateDomainObjects,generateHibernateDaoClasses,build,generateHibernateSql,build.war,dbInit"/> |
291 | jmachado | 35 | <target name="allWebNode" depends="clean,initDirs,createConfigurationFiles,generateHibernateDomainObjects,generateHibernateDaoClasses,build.war"/> |
36 | <target name="dataNode" depends="clean,initDirs,createConfigurationFiles,generateHibernateDomainObjects,generateHibernateDaoClasses,build,generateHibernateSql"/> |
||
1312 | jmachado | 37 | --> |
1 | fvelez | 38 | |
39 | <!-- |
||
40 | ========================================================================================== |
||
41 | CLEAN TASKS |
||
42 | ========================================================================================== |
||
43 | --> |
||
1312 | jmachado | 44 | <!-- |
1 | fvelez | 45 | <target name="clean" description="clean *.class and build dir"> |
46 | <delete dir="${build.dir}"/> |
||
165 | jmachado | 47 | <delete dir="${dist.dir}"/> |
7 | jmachado | 48 | <delete> |
49 | <fileset dir="${gen.dir.java}"> |
||
112 | jmachado | 50 | <exclude name="pt/ipportalegre/**/*.*"/> |
1312 | jmachado | 51 | <exclude name="pt/estgp/estgweb/services/directories/**/*.*"/> |
7 | jmachado | 52 | <include name="**/*.java"/> |
53 | </fileset> |
||
54 | </delete> |
||
163 | jmachado | 55 | <sleep seconds="5"/> |
1 | fvelez | 56 | </target> |
1312 | jmachado | 57 | --> |
1 | fvelez | 58 | |
59 | |||
60 | |||
61 | <!-- |
||
62 | ========================================================================================== |
||
63 | CREATE-DIRS |
||
64 | ========================================================================================== |
||
65 | --> |
||
66 | <target name="initDirs"> |
||
67 | <mkdir dir="${log.dir}"/> |
||
68 | <mkdir dir="${data.dir}"/> |
||
69 | <mkdir dir="${build.dir}"/> |
||
70 | <mkdir dir="${build.dir.classes}"/> |
||
71 | <mkdir dir="${build.dir.war}"/> |
||
99 | jmachado | 72 | <mkdir dir="${build.dir.ws}"/> |
219 | jmachado | 73 | <mkdir dir="${build.dir.scripts}"/> |
1 | fvelez | 74 | <delete dir="${dist.dir}"/> |
75 | <mkdir dir="${dist.dir}"/> |
||
76 | <mkdir dir="${gen.dir.java}"/> |
||
77 | </target> |
||
78 | |||
79 | |||
80 | |||
81 | <!-- |
||
82 | ========================================================================================== |
||
83 | Tomcat Tasks |
||
84 | ========================================================================================== |
||
85 | --> |
||
86 | <taskdef name="tomcat.reload" classname="org.apache.catalina.ant.ReloadTask" classpathref="pathToToolsLib"/> |
||
1382 | jmachado | 87 | <!--<taskdef name="tomcat.remove" classname="org.apache.catalina.ant.RemoveTask" classpathref="pathToToolsLib"/>--> |
1383 | jmachado | 88 | <!--<taskdef name="tomcat.roles" classname="org.apache.catalina.ant.RolesTask" classpathref="pathToToolsLib"/>--> |
1 | fvelez | 89 | <taskdef name="tomcat.start" classname="org.apache.catalina.ant.StartTask" classpathref="pathToToolsLib"/> |
90 | <taskdef name="tomcat.stop" classname="org.apache.catalina.ant.StopTask" classpathref="pathToToolsLib"/> |
||
91 | <taskdef name="tomcat.undeploy" classname="org.apache.catalina.ant.UndeployTask" classpathref="pathToToolsLib"/> |
||
92 | <taskdef name="tomcat.deploy" classname="org.apache.catalina.ant.DeployTask" classpathref="pathToToolsLib"/> |
||
1630 | jmachado | 93 | <taskdef name="tomcat.install" classname="org.apache.catalina.ant.InstallTask" classpathref="pathToToolsLib"/> |
1597 | jmachado | 94 | <taskdef name="tomcat.jasper" classname="org.apache.jasper.JspC"> |
95 | <classpath id="jspc.classpath"> |
||
96 | <pathelement location="${env.JAVA_HOME}/lib/tools.jar"/> |
||
97 | <fileset dir="${tomcat.home}/bin"> |
||
98 | <include name="*.jar"/> |
||
99 | </fileset> |
||
100 | <fileset dir="${tomcat.home}/server/lib"> |
||
101 | <include name="*.jar"/> |
||
102 | </fileset> |
||
103 | <fileset dir="${tomcat.home}/common/lib"> |
||
104 | <include name="*.jar"/> |
||
105 | </fileset> |
||
106 | </classpath> |
||
107 | </taskdef> |
||
1 | fvelez | 108 | |
109 | |||
110 | <!-- |
||
111 | TOMCAT Instalation Tasks |
||
112 | --> |
||
1630 | jmachado | 113 | <target name="tomcat.deployContext" depends="build.war"> |
1 | fvelez | 114 | <echo message="${tomcat.manager}"/> |
115 | <tomcat.install url="${tomcat.manager}" path="${tomcat.context.path.install}" |
||
290 | jmachado | 116 | config="file://${basedir}/${dist.dir}/estgweb.xml" |
1 | fvelez | 117 | username="${tomcat.username}" password="${tomcat.password}" /> |
118 | </target> |
||
1630 | jmachado | 119 | <!-- |
340 | jmachado | 120 | <target name="tomcat.deployContextOnly" depends=""> |
121 | <echo message="${tomcat.manager}"/> |
||
122 | <tomcat.install url="${tomcat.manager}" path="${tomcat.context.path.install}" |
||
123 | config="file://${basedir}/${dist.dir}/estgweb.xml" |
||
124 | username="${tomcat.username}" password="${tomcat.password}" /> |
||
125 | </target> |
||
1 | fvelez | 126 | <target name="tomcat.redeployContext" depends="tomcat.undeploy,build.war" > |
127 | <echo message="${tomcat.manager}"/> |
||
128 | <tomcat.install url="${tomcat.manager}" path="${tomcat.context.path.install}" |
||
287 | jmachado | 129 | config="file:${basedir}/${dist.dir}/estgweb.xml" |
1 | fvelez | 130 | username="${tomcat.username}" password="${tomcat.password}" /> |
1384 | jmachado | 131 | </target>--> |
281 | jmachado | 132 | <target name="tomcat.deploy" depends="war" > |
285 | jmachado | 133 | <echo message="${tomcat.manager} path:${tomcat.context.path.install} warfile:file:${basedir}/${dist.dir}/${tomcat.war.file}"/> |
283 | jmachado | 134 | <tomcat.deploy url="${tomcat.manager}" path="${tomcat.context.path.install}" |
285 | jmachado | 135 | war="file:${basedir}/${dist.dir}/${tomcat.war.file}" |
1 | fvelez | 136 | username="${tomcat.username}" password="${tomcat.password}" /> |
137 | </target> |
||
281 | jmachado | 138 | <target name="tomcat.redeploy" depends="tomcat.undeploy,war"> |
285 | jmachado | 139 | <echo message="${tomcat.manager} path:${tomcat.context.path.install} warfile:file:${basedir}/${dist.dir}/${tomcat.war.file}"/> |
1 | fvelez | 140 | <tomcat.deploy url="${tomcat.manager}" path="${tomcat.context.path.install}" |
285 | jmachado | 141 | war="file:${basedir}/${dist.dir}/${tomcat.war.file}" |
1 | fvelez | 142 | username="${tomcat.username}" password="${tomcat.password}" /> |
143 | </target> |
||
144 | <target name="tomcat.undeploy"> |
||
145 | <echo message="${tomcat.manager}"/> |
||
146 | <tomcat.undeploy url="${tomcat.manager}" path="${tomcat.context.path.install}" |
||
147 | username="${tomcat.username}" password="${tomcat.password}" /> |
||
148 | </target> |
||
149 | <target name="tomcat.reload"> |
||
150 | <echo message="${tomcat.manager}"/> |
||
151 | <tomcat.reload url="${tomcat.manager}" path="${tomcat.context.path.install}" |
||
152 | username="${tomcat.username}" password="${tomcat.password}" /> |
||
153 | </target> |
||
154 | <target name="tomcat.start"> |
||
155 | <echo message="${tomcat.manager}"/> |
||
156 | <tomcat.start url="${tomcat.manager}" path="${tomcat.context.path.install}" |
||
157 | username="${tomcat.username}" password="${tomcat.password}" /> |
||
158 | </target> |
||
159 | <target name="tomcat.stop"> |
||
160 | <echo message="${tomcat.manager}"/> |
||
161 | <tomcat.stop url="${tomcat.manager}" path="${tomcat.context.path.install}" |
||
162 | username="${tomcat.username}" password="${tomcat.password}" /> |
||
163 | </target> |
||
164 | |||
165 | <!-- |
||
166 | ========================================================================================== |
||
167 | BUILD TASKS, Have no effect now, no revengstrategy defined.... |
||
168 | ========================================================================================== |
||
169 | --> |
||
170 | <target name="build" depends="initDirs" description="Compile All and create conf files"> |
||
171 | <antcall target="compile"/> |
||
172 | <antcall target="createConfigurationFiles"/> |
||
1791 | jmachado | 173 | <antcall target="generateJsonJspsFile"/> |
174 | <antcall target="generateJsonSoaServicesFile"/> |
||
1 | fvelez | 175 | </target> |
385 | jmachado | 176 | |
1 | fvelez | 177 | <target name="compile" depends="initDirs" description="Compile All"> |
1593 | jmachado | 178 | <javac encoding="UTF-8" source="1.6" target="1.6" destdir="${build.dir.classes}" debug="true" optimize="true" fork="true" failonerror="true" nowarn="true"> |
1 | fvelez | 179 | <src path="${src.dir}"/> |
180 | <src path="${gen.dir.java}"/> |
||
181 | <classpath refid="pathToToolsLib"/> |
||
182 | </javac> |
||
183 | </target> |
||
184 | <target name="compileToolFiles" description="Compile Mappings Builder"> |
||
185 | <javac destdir="${build.dir.classes}" srcdir="${src.dir}" debug="true" optimize="true" deprecation="true" verbose="true" failonerror="true"> |
||
186 | <include name="${mapping.buider.class.file}"/> |
||
219 | jmachado | 187 | <include name="${scripts.buider.class.file}"/> |
1775 | jmachado | 188 | <include name="${jsp.interfaces.web.json.class.file}"/> |
1 | fvelez | 189 | <classpath refid="pathToToolsLib"/> |
190 | </javac> |
||
191 | </target> |
||
192 | |||
193 | <!-- |
||
194 | Build distribution files |
||
195 | --> |
||
196 | <target name="dist" depends="build"> |
||
197 | <jar jarfile="${dist.dir}/estgweb.jar"> |
||
198 | <fileset dir="${build.dir.classes}" includes="**/*.class"/> |
||
199 | </jar> |
||
200 | <copy overwrite="true" todir="${dist.dir}"> |
||
201 | <fileset dir="${build.dir.classes}" includes="**/*.properties"/> |
||
202 | <fileset dir="${build.dir.classes}" includes="**/*.xml"/> |
||
730 | jmachado | 203 | <fileset dir="${build.dir.classes}" includes="**/*.gif"/> |
244 | jmachado | 204 | <fileset dir="${build.dir.classes}" includes="**/*.xsd"/> |
205 | <fileset dir="${build.dir.classes}" includes="**/*.xsl"/> |
||
1 | fvelez | 206 | </copy> |
207 | <copy overwrite="true" todir="${dist.dir}" file="${conf.dir}/tomcat/estgweb.xml"/> |
||
208 | <replace file="${dist.dir}/estgweb.xml" value=""> |
||
209 | <replacefilter token="@build.dir.war@" value="${basedir}${file.separator}build${file.separator}ant${file.separator}war${file.separator}"/> |
||
210 | <replacefilter token="@context.path@" value="${tomcat.context.path}"/> |
||
211 | </replace> |
||
212 | </target> |
||
213 | |||
1315 | jmachado | 214 | <target name="copy.jsps.war" depends="createConfigurationFiles" description="copy only jsps to war distribution"> |
1 | fvelez | 215 | <copy todir="${build.dir.war}" overwrite="false"> |
216 | <fileset dir="src/web"> |
||
217 | <include name="**/*"/> |
||
218 | </fileset> |
||
219 | </copy> |
||
1581 | jmachado | 220 | |
221 | <copy todir="${build.dir.war}/WEB-INF/tags" overwrite="false"> |
||
222 | <fileset dir="${conf.dir}/WEB-INF/tags"> |
||
223 | <include name="**/*"/> |
||
224 | </fileset> |
||
225 | </copy> |
||
1312 | jmachado | 226 | <copy todir="${build.dir.war}/WEB-INF/classes" overwrite="false"> |
227 | <fileset dir="${build.dir.classes}"> |
||
228 | <include name="**/*.xsl"/> |
||
229 | </fileset> |
||
230 | </copy> |
||
1470 | jmachado | 231 | |
165 | jmachado | 232 | <replace file="${build.dir.war}/css/style.css"> |
233 | <replacefilter token="@contextPath@" value="${tomcat.context.path}"/> |
||
234 | </replace> |
||
235 | <replace file="${build.dir.war}/css/intranet.css"> |
||
236 | <replacefilter token="@contextPath@" value="${tomcat.context.path}"/> |
||
237 | </replace> |
||
238 | <replace file="${build.dir.war}/js/ajax.js"> |
||
239 | <replacefilter token="@contextPath@" value="${tomcat.context.path}"/> |
||
240 | </replace> |
||
1 | fvelez | 241 | </target> |
242 | |||
291 | jmachado | 243 | <target name="build.war" depends="dist" description="Make war distribution"> |
1 | fvelez | 244 | <mkdir dir="${build.dir.war}"/> |
245 | <mkdir dir="${build.dir.war}/WEB-INF"/> |
||
246 | <mkdir dir="${build.dir.war}/WEB-INF/lib"/> |
||
247 | <copy todir="${build.dir.war}/WEB-INF/lib"> |
||
248 | <fileset dir="${common.lib.dir}/log4j"> |
||
249 | <include name="*.jar"/> |
||
250 | </fileset> |
||
251 | <fileset dir="${common.lib.dir}/berserk"> |
||
252 | <include name="**/*.jar"/> |
||
253 | </fileset> |
||
254 | <fileset dir="${common.lib.dir}/hibernate"> |
||
255 | <include name="**/*.jar"/> |
||
995 | jmachado | 256 | <exclude name="xerces-2.6.2.jar"/> |
1 | fvelez | 257 | </fileset> |
258 | <fileset dir="${common.lib.dir}/log4j"> |
||
259 | <include name="**/*.jar"/> |
||
260 | </fileset> |
||
261 | <fileset dir="${common.lib.dir}/mysql"> |
||
262 | <include name="**/*.jar"/> |
||
263 | </fileset> |
||
1235 | jmachado | 264 | <fileset dir="${common.lib.dir}/oracle"> |
265 | <include name="**/*.jar"/> |
||
266 | </fileset> |
||
1 | fvelez | 267 | <fileset dir="${common.lib.dir}/commons"> |
268 | <include name="**/*.jar"/> |
||
269 | </fileset> |
||
270 | <fileset dir="${common.lib.dir}/struts"> |
||
271 | <include name="**/*.jar"/> |
||
272 | </fileset> |
||
10 | jmachado | 273 | <fileset dir="${common.lib.dir}/ldap"> |
274 | <include name="**/*.jar"/> |
||
275 | </fileset> |
||
29 | jmachado | 276 | <fileset dir="${common.lib.dir}/mail"> |
277 | <include name="**/*.jar"/> |
||
278 | </fileset> |
||
1775 | jmachado | 279 | <fileset dir="${common.lib.dir}/jfreechart1019"> |
18 | jmachado | 280 | <include name="**/*.jar"/> |
1775 | jmachado | 281 | <exclude name="servlet.jar"/> |
18 | jmachado | 282 | </fileset> |
99 | jmachado | 283 | <fileset dir="${common.lib.dir}/lucene"> |
92 | jmachado | 284 | <include name="**/*.jar"/> |
285 | </fileset> |
||
995 | jmachado | 286 | <fileset dir="${common.lib.dir}/jaxrpc"> |
104 | jmachado | 287 | <include name="**/*.jar"/> |
186 | fvelez | 288 | </fileset> |
244 | jmachado | 289 | <fileset dir="${common.lib.dir}/saxon"> |
290 | <include name="**/*.jar"/> |
||
291 | </fileset> |
||
726 | jmachado | 292 | <fileset dir="${common.lib.dir}/fop"> |
293 | <include name="**/*.jar"/> |
||
294 | </fileset> |
||
808 | jmachado | 295 | <fileset dir="${common.lib.dir}/itextpdf"> |
296 | <include name="**/*.jar"/> |
||
297 | </fileset> |
||
995 | jmachado | 298 | <fileset dir="${common.lib.dir}/json"> |
299 | <include name="**/*.jar"/> |
||
1776 | jmachado | 300 | <exclude name="genson-0.97.jar"/> |
301 | <!--<exclude name="genson-1.4.jar"/>--> |
||
995 | jmachado | 302 | </fileset> |
1703 | jmachado | 303 | <fileset dir="${common.lib.dir}/jsoup"> |
304 | <include name="**/*.jar"/> |
||
305 | </fileset> |
||
1553 | jmachado | 306 | <fileset dir="${common.lib.dir}/simplexml"> |
307 | <include name="**/*.jar"/> |
||
308 | </fileset> |
||
1 | fvelez | 309 | </copy> |
310 | <copy file="${dist.dir}/estgweb.jar" todir="${build.dir.war}/WEB-INF/lib"/> |
||
311 | <copy todir="${build.dir.war}/WEB-INF" overwrite="true"> |
||
312 | <fileset dir="${conf.dir}/WEB-INF"> |
||
313 | <include name="**/*.*"/> |
||
314 | </fileset> |
||
315 | </copy> |
||
316 | <mkdir dir="${build.dir.war}/WEB-INF/classes"/> |
||
317 | <copy todir="${build.dir.war}/WEB-INF/classes" overwrite="true"> |
||
318 | <fileset dir="${build.dir.classes}"> |
||
18 | jmachado | 319 | <include name="**/*.types"/> |
1 | fvelez | 320 | <include name="**/*.properties"/> |
29 | jmachado | 321 | <include name="**/*.txt"/> |
1 | fvelez | 322 | <include name="**/*.xml"/> |
730 | jmachado | 323 | <include name="**/*.gif"/> |
1554 | jmachado | 324 | <include name="**/*.png"/> |
214 | jmachado | 325 | <include name="**/*.exe"/> |
248 | jmachado | 326 | <include name="**/*.xsl"/> |
327 | <include name="**/*.xsd"/> |
||
1775 | jmachado | 328 | <include name="**/*.json"/> |
1 | fvelez | 329 | </fileset> |
330 | </copy> |
||
331 | <copy todir="${build.dir.war}" overwrite="true"> |
||
332 | <fileset dir="src/web"> |
||
333 | <include name="**/*"/> |
||
334 | </fileset> |
||
1395 | jmachado | 335 | |
1 | fvelez | 336 | </copy> |
1395 | jmachado | 337 | <mkdir dir="${build.dir.war}/docs"/> |
1507 | jmachado | 338 | |
339 | <!--DOCUMENTOS IMPORTANTES ARQUITETURA EMPRESARIAL TODO REVER LOCALIZAÇÃO DOS MESMOS--> |
||
1395 | jmachado | 340 | <copy todir="${build.dir.war}/docs" overwrite="true" file="src/doc/siges/ModeloDeInformacaoPAE-EmVigor.docx"/> |
1507 | jmachado | 341 | <copy todir="${build.dir.war}/docs" overwrite="false" file="src/doc/siges/Modelo_de_Dados_Siges11.zip"/> |
1395 | jmachado | 342 | <copy todir="${build.dir.war}/docs" overwrite="true" file="src/doc/BacoV32016/processos/DocumentacaoProcessos.doc"/> |
343 | |||
48 | fvelez | 344 | <replace file="${build.dir.war}/js/ajax.js"> |
165 | jmachado | 345 | <replacefilter token="@contextPath@" value="${tomcat.context.path}"/> |
48 | fvelez | 346 | </replace> |
165 | jmachado | 347 | <replace file="${build.dir.war}/css/style.css"> |
348 | <replacefilter token="@contextPath@" value="${tomcat.context.path}"/> |
||
349 | </replace> |
||
350 | <replace file="${build.dir.war}/css/intranet.css"> |
||
351 | <replacefilter token="@contextPath@" value="${tomcat.context.path}"/> |
||
352 | </replace> |
||
385 | jmachado | 353 | </target> |
165 | jmachado | 354 | |
385 | jmachado | 355 | <target name="jasper" depends="copy.jsps.war"> |
356 | <delete dir="${build.dir.jsp}"/> |
||
357 | <mkdir dir="${build.dir.jsp}"/> |
||
1605 | jmachado | 358 | <tomcat.jasper compilersourcevm="1.6" compilertargetvm="1.6" validateXml="false" uriroot="${build.dir.war}" webXmlFragment="${build.dir.war}/WEB-INF/generated_web.xml" addWebXmlMappings="true" outputDir="${build.dir.jsp}" /> |
1593 | jmachado | 359 | <javac encoding="UTF-8" source="1.6" target="1.6" destdir="${build.dir.war}/WEB-INF/classes" debug="true" optimize="true" fork="true" failonerror="true" nowarn="true"> |
385 | jmachado | 360 | <src path="${build.dir.jsp}"/> |
1597 | jmachado | 361 | <src path="${build.dir}/"/> |
385 | jmachado | 362 | <classpath path="${build.dir.classes}"/> |
363 | <classpath refid="pathToToolsLib"/> |
||
364 | </javac> |
||
365 | <delete> |
||
366 | <fileset dir="${build.dir.war}"> |
||
367 | <include name="**/*.jsp"/> |
||
368 | </fileset> |
||
369 | </delete> |
||
1598 | jmachado | 370 | <delete> |
371 | <fileset dir="${build.dir.war}/WEB-INF/tags"> |
||
372 | <include name="**/*.jsp"/> |
||
373 | </fileset> |
||
374 | </delete> |
||
1 | fvelez | 375 | </target> |
376 | |||
377 | <target name="war" depends="build.war"> |
||
378 | <delete file="${dist.dir}/${tomcat.war.file}"/> |
||
379 | <jar destfile="${dist.dir}/${tomcat.war.file}"> |
||
380 | <fileset dir="${build.dir.war}"> |
||
381 | <include name="**/*" /> |
||
382 | </fileset> |
||
383 | </jar> |
||
384 | </target> |
||
385 | |||
385 | jmachado | 386 | <target name="war.jasper" depends="build.war,jasper"> |
387 | <delete file="${dist.dir}/${tomcat.war.file}"/> |
||
388 | <jar destfile="${dist.dir}/${tomcat.war.file}"> |
||
389 | <fileset dir="${build.dir.war}"> |
||
390 | <include name="**/*" /> |
||
391 | </fileset> |
||
392 | </jar> |
||
393 | </target> |
||
1 | fvelez | 394 | |
385 | jmachado | 395 | |
1 | fvelez | 396 | <!-- |
397 | ========================================================================================== |
||
398 | Generate Configuration Files TASKS |
||
399 | ========================================================================================== |
||
400 | --> |
||
1791 | jmachado | 401 | <target name="createConfigurationFiles" depends="compileToolFiles,copyConfigurationFiles,replaceFiltersConfigurationFiles,generateHibernateCfgXml"/> |
1 | fvelez | 402 | |
403 | <target name="copyConfigurationFiles"> |
||
404 | <copy overwrite="true" todir="${build.dir.classes}"> |
||
405 | <fileset dir="${hbm.dir}" includes="**/*.hbm.xml"/> |
||
406 | </copy> |
||
244 | jmachado | 407 | <mkdir dir="${build.dir.classes}/template/xsd"/> |
408 | <copy todir="${build.dir.classes}/template/xsd" overwrite="true"> |
||
409 | <fileset dir="${src.xsd}"> |
||
410 | <include name="**/*.xsl"/> |
||
411 | <include name="**/*.xsd"/> |
||
412 | </fileset> |
||
413 | </copy> |
||
1 | fvelez | 414 | <copy overwrite="true" todir="${build.dir.classes}"> |
1775 | jmachado | 415 | <fileset dir="${src.dir}" includes="**/*.json"/> |
416 | </copy> |
||
417 | <copy overwrite="true" todir="${build.dir.classes}"> |
||
1 | fvelez | 418 | <fileset dir="${src.dir}" includes="**/*.xsl"/> |
419 | </copy> |
||
420 | <copy overwrite="true" todir="${build.dir.classes}"> |
||
730 | jmachado | 421 | <fileset dir="${src.dir}" includes="**/*.gif"/> |
422 | </copy> |
||
423 | <copy overwrite="true" todir="${build.dir.classes}"> |
||
1554 | jmachado | 424 | <fileset dir="${src.dir}" includes="**/*.png"/> |
425 | </copy> |
||
426 | <copy overwrite="true" todir="${build.dir.classes}"> |
||
381 | jmachado | 427 | <fileset dir="${src.dir}" includes="**/*.csv"/> |
428 | </copy> |
||
429 | <copy overwrite="true" todir="${build.dir.classes}"> |
||
1 | fvelez | 430 | <fileset dir="${conf.dir}/berserk" includes="*.*"/> |
431 | </copy> |
||
29 | jmachado | 432 | <mkdir dir="${email.templates.dir.build}"/> |
433 | <copy overwrite="true" todir="${email.templates.dir.build}"> |
||
434 | <fileset dir="${email.templates.dir.conf}" includes="*.*"/> |
||
435 | </copy> |
||
227 | jmachado | 436 | <mkdir dir="${sms.templates.dir.build}"/> |
437 | <copy overwrite="true" todir="${sms.templates.dir.build}"> |
||
438 | <fileset dir="${sms.templates.dir.conf}" includes="*.*"/> |
||
439 | </copy> |
||
215 | jmachado | 440 | <mkdir dir="${assignement.templates.dir.build}"/> |
441 | <copy overwrite="true" todir="${assignement.templates.dir.build}"> |
||
442 | <fileset dir="${assignement.templates.dir.conf}" includes="*.*"/> |
||
443 | </copy> |
||
1325 | jmachado | 444 | <!--<copy overwrite="true" todir="${olap.cfg.xml.build}" file="${olap.cfg.xml}"/>--> |
1 | fvelez | 445 | <copy overwrite="true" todir="${hibernate.cfg.xml.build}" file="${hibernate.cfg.xml}"/> |
18 | jmachado | 446 | <copy overwrite="true" todir="${mime.types.build}" file="${mime.types}"/> |
1 | fvelez | 447 | <copy overwrite="true" todir="${app.properties.build}" file="${app.properties}"/> |
1810 | jmachado | 448 | <copy overwrite="true" todir="${ldap.properties.build}" file="${ldap.properties}"/> |
1 | fvelez | 449 | <copy overwrite="true" todir="${jdbc.properties.build}" file="${jdbc.properties}"/> |
1325 | jmachado | 450 | <copy overwrite="true" todir="${jdbc.olap.properties.build}" file="${jdbc.olap.properties}"/> |
1 | fvelez | 451 | <copy overwrite="true" todir="${ldap.properties.build}" file="${ldap.properties}"/> |
452 | <copy overwrite="true" todir="${build.dir.classes}" file="${log4j.properties}"/> |
||
214 | jmachado | 453 | <mkdir dir="${build.dir.intranet.setup.folders.file}"/> |
454 | <copy overwrite="true" todir="${build.dir.intranet.setup.folders.file}" file="${intranet.setup.folders.file.src}"/> |
||
219 | jmachado | 455 | |
368 | jmachado | 456 | <mkdir dir="${build.dir.classes}/pt/estgp/estgweb/directories"/> |
457 | <copy overwrite="true" todir="${build.dir.classes}/pt/estgp/estgweb/directories"> |
||
458 | <fileset dir="${conf.dir}/directories" includes="*.*"/> |
||
459 | </copy> |
||
347 | jmachado | 460 | <!--<java classname="${scripts.buider.class}" classpath="${build.dir.classes}">--> |
461 | <!--<arg value="${basedir}${file.separator}..${file.separator}common"/>--> |
||
462 | <!--<arg value="${basedir}${file.separator}build${file.separator}ant${file.separator}classes"/>--> |
||
463 | <!--<arg value="${build.dir.scripts}"/>--> |
||
464 | <!--<arg value="${scripts.target.libs.file}"/>--> |
||
465 | <!--</java>--> |
||
466 | <!--<copy overwrite="true" todir="${build.dir.scripts}">--> |
||
467 | <!--<fileset dir="${src.scripts}" includes="*.*"/>--> |
||
468 | <!--</copy>--> |
||
244 | jmachado | 469 | |
1 | fvelez | 470 | </target> |
471 | |||
1549 | jmachado | 472 | <target name="copyXslFiles"> |
473 | |||
474 | <copy overwrite="true" todir="${build.dir.classes}"> |
||
475 | <fileset dir="${src.dir}" includes="**/*.xsl"/> |
||
476 | </copy> |
||
477 | |||
478 | |||
479 | </target> |
||
480 | |||
1 | fvelez | 481 | <target name="replaceFiltersConfigurationFiles"> |
482 | <delete file="${build.dir.classes}/MessageResources.properties"/> |
||
1320 | jmachado | 483 | <!--<concat encoding="ISO-8859-1" destfile="${build.dir.classes}/MessageResources.properties" append="true"> |
1 | fvelez | 484 | <fileset dir="${conf.dir}/language"> |
485 | <include name="*.properties" /> |
||
486 | </fileset> |
||
1320 | jmachado | 487 | </concat>--> |
488 | <copy todir="${build.dir.classes}"> |
||
489 | <fileset dir="${conf.dir}/language"> |
||
490 | <include name="*.properties" /> |
||
491 | </fileset> |
||
492 | </copy> |
||
1 | fvelez | 493 | <replace file="${jdbc.properties.build}/${jdbc.properties.filename}"> |
494 | <replacefilter token="@database.username@" value="${database.username}"/> |
||
495 | <replacefilter token="@database.password@" value="${database.password}"/> |
||
496 | <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
497 | </replace> |
||
1325 | jmachado | 498 | <replace file="${jdbc.olap.properties.build}/${jdbc.olap.properties.filename}"> |
499 | <replacefilter token="@database.username@" value="${database.username}"/> |
||
500 | <replacefilter token="@database.password@" value="${database.password}"/> |
||
501 | <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
502 | </replace> |
||
1 | fvelez | 503 | <replace file="${hibernate.cfg.xml.build}/${hibernate.cfg.xml.filename}"> |
504 | <replacefilter token="@database.username@" value="${database.username}"/> |
||
505 | <replacefilter token="@database.password@" value="${database.password}"/> |
||
506 | <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
507 | <replacefilter token="@hibernate.show.sql@" value="${hibernate.show.sql}"/> |
||
508 | </replace> |
||
1325 | jmachado | 509 | <!-- |
510 | <replace file="${olap.cfg.xml.build}/${olap.cfg.xml.filename}"> |
||
511 | <replacefilter token="@database.username@" value="${database.username}"/> |
||
512 | <replacefilter token="@database.password@" value="${database.password}"/> |
||
513 | <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
514 | <replacefilter token="@hibernate.show.sql@" value="${hibernate.show.sql}"/> |
||
515 | </replace>--> |
||
1 | fvelez | 516 | <replace file="${app.properties.build}/app.properties"> |
1525 | jmachado | 517 | |
518 | |||
519 | <replacefilter token="@google.recaptcha.secret.key@" value="${google.recaptcha.secret.key}"/> |
||
520 | |||
1426 | jmachado | 521 | <replacefilter token="@admin.email.1@" value="${admin.email.1}"/> |
522 | <replacefilter token="@admin.email.2@" value="${admin.email.2}"/> |
||
1 | fvelez | 523 | <replacefilter token="@tmp.dir@" value="${tmp.dir}"/> |
187 | jmachado | 524 | <replacefilter token="@data.dir@" value="${data.dir}"/> |
1 | fvelez | 525 | <replacefilter token="@out.dir@" value="${out.dir}"/> |
29 | jmachado | 526 | <replacefilter token="@email.templates.dir@" value="${email.templates.dir}"/> |
79 | jmachado | 527 | <replacefilter token="@use.ldap@" value="${use.ldap}"/> |
146 | jmachado | 528 | <replacefilter token="@site.url@" value="${site.url}"/> |
1017 | jmachado | 529 | <!-- DONT USE ANY MORE NOW IS IN CONFIGURATION DAO <replacefilter token="@ws.siges.wsdl@" value="${ws.siges.wsdl}"/>--> |
163 | jmachado | 530 | <replacefilter token="@ws.siges.target.namespace@" value="${ws.siges.target.namespace}"/> |
214 | jmachado | 531 | <replacefilter token="@intranet.setup.folders.file@" value="${build.dir.relative.intranet.setup.folders.file}"/> |
532 | <replacefilter token="@intranet.setup.folders.filename@" value="${intranet.setup.folders.filename}"/> |
||
1235 | jmachado | 533 | |
534 | <replacefilter token="@oracle.siges.url@" value="${oracle.siges.url}"/> |
||
535 | <replacefilter token="@oracle.siges.username@" value="${oracle.siges.username}"/> |
||
536 | <replacefilter token="@oracle.siges.password@" value="${oracle.siges.password}"/> |
||
537 | |||
1312 | jmachado | 538 | <!--System instance type specifications--> |
1327 | jmachado | 539 | |
540 | <replacefilter token="@email.password@" value="${email.password}"/> |
||
1426 | jmachado | 541 | <replacefilter token="@email.user.sufix@" value="${email.user.sufix}"/> |
1459 | jmachado | 542 | |
543 | <replacefilter token="@email.user.count@" value="${email.user.count}"/> |
||
1431 | jmachado | 544 | <replacefilter token="@email.use.round.robin@" value="${email.use.round.robin}"/> |
1459 | jmachado | 545 | |
1431 | jmachado | 546 | <replacefilter token="@email.use.security@" value="${email.use.security}"/> |
1426 | jmachado | 547 | <replacefilter token="@email.user.prefix@" value="${email.user.prefix}"/> |
1431 | jmachado | 548 | <replacefilter token="@email.from@" value="${email.from}"/> |
1432 | jmachado | 549 | <replacefilter token="@email.server@" value="${email.server}"/> |
1327 | jmachado | 550 | <replacefilter token="@test.control.var@" value="${test.control.var}"/> |
1394 | jmachado | 551 | |
552 | <replacefilter token="@mode.pae.enabled@" value="${mode.pae.enabled}"/> |
||
1312 | jmachado | 553 | <replacefilter token="@system.theme@" value="${system.theme}"/> |
554 | <replacefilter token="@authentication.policy.service@" value="${authentication.policy.service}"/> |
||
555 | <replacefilter token="@authentication.policy.username.msg.key@" value="${authentication.policy.username.msg.key}"/> |
||
556 | <replacefilter token="@authentication.policy.password.msg.key@" value="${authentication.policy.password.msg.key}"/> |
||
557 | <replacefilter token="@system.redirections.policy.index.welcome@" value="${system.redirections.policy.index.welcome}"/> |
||
558 | <replacefilter token="@system.redirections.policy.authentication.action@" value="${system.redirections.policy.authentication.action}"/> |
||
1387 | jmachado | 559 | <replacefilter token="@system.redirections.policy.authentication.logout.action@" value="${system.redirections.policy.authentication.logout.action}"/> |
1455 | jmachado | 560 | <replacefilter token="@system.mail.standard.certificated.home.page@" value="${system.mail.standard.certificated.home.page}"/> |
1312 | jmachado | 561 | |
1455 | jmachado | 562 | |
1312 | jmachado | 563 | <replacefilter token="@system.intranet.url@" value="${system.intranet.url}"/> |
564 | <replacefilter token="@system.public.url@" value="${system.public.url}"/> |
||
565 | |||
1324 | jmachado | 566 | <replacefilter token="@ionline.user@" value="${ionline.user}"/> |
567 | <replacefilter token="@ionline.pass@" value="${ionline.pass}"/> |
||
1 | fvelez | 568 | </replace> |
1810 | jmachado | 569 | <replace file="${ldap.properties.build}/ldap.properties"> |
570 | <replacefilter token="@ldap.queries.login@" value="${ldap.queries.login}"/> |
||
571 | <replacefilter token="@ldap.queries.password@" value="${ldap.queries.password}"/> |
||
572 | </replace> |
||
1 | fvelez | 573 | <replace file="${build.dir.classes}/${log4j.properties.filename}"> |
574 | <replacefilter token="@log.file@" value="${log.file}"/> |
||
299 | jmachado | 575 | <replacefilter token="@log.level@" value="${log.level}"/> |
1 | fvelez | 576 | </replace> |
352 | jmachado | 577 | <!--<replace file="${build.dir.scripts}/${scripts.setenv.file}"> |
219 | jmachado | 578 | <replacefilter token="@tomcat.home@" value="${tomcat.home}"/> |
352 | jmachado | 579 | </replace>--> |
1 | fvelez | 580 | <replace file="${jdbc.properties.build}/${jdbc.properties.filename}"> |
581 | <replacefilter token="@database.username@" value="${database.username}"/> |
||
582 | <replacefilter token="@database.password@" value="${database.password}"/> |
||
583 | <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
584 | </replace> |
||
1325 | jmachado | 585 | <replace file="${jdbc.olap.properties.build}/${jdbc.olap.properties.filename}"> |
586 | <replacefilter token="@database.username@" value="${database.username}"/> |
||
587 | <replacefilter token="@database.password@" value="${database.password}"/> |
||
588 | <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
589 | </replace> |
||
1 | fvelez | 590 | </target> |
591 | <target name="generateHibernateCfgXml" depends="compileToolFiles"> |
||
592 | <!--<delete file="${build.dir.classes}/${hibernate.cfg.xml.filename}"/>--> |
||
593 | <java classname="${mapping.buider.class}" classpath="${build.dir.classes}"> |
||
594 | <arg value="${hibernate.cfg.xml.build}"/> |
||
595 | <arg value="${hibernate.cfg.xml}"/> |
||
596 | <arg value="${package.dir}"/> |
||
1325 | jmachado | 597 | <!--<arg value="Olap"/> O Hibernate.cfg serve para tudo no entanto o schema update e feito |
598 | <arg value="false"/> com o jdbc.olap para que estas tabelas fiquem como MyISAM |
||
599 | --> |
||
1 | fvelez | 600 | </java> |
1325 | jmachado | 601 | <!--<echo message="Starting OLAP"/> |
602 | <java classname="${mapping.buider.class}" classpath="${build.dir.classes}"> |
||
603 | <arg value="${olap.cfg.xml.build}"/> |
||
604 | <arg value="${olap.cfg.xml}"/> |
||
605 | <arg value="${package.dir}"/> |
||
606 | <arg value="Olap"/> |
||
607 | <arg value="true"/> |
||
608 | </java>--> |
||
1 | fvelez | 609 | <antcall target="replaceFiltersConfigurationFiles"/> |
610 | </target> |
||
611 | <target name="dbInit"> |
||
1325 | jmachado | 612 | <!--<delete file="${build.dir.classes}/${olap.cfg.xml.filename}"/>--> |
7 | jmachado | 613 | <!--<delete file="${build.dir.classes}/${hibernate.cfg.xml.filename}"/>--> |
614 | <java classname="pt.estgp.estgweb.examples.DBInit" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
1 | fvelez | 615 | |
7 | jmachado | 616 | <antcall target="replaceFiltersConfigurationFiles"/> |
617 | </target> |
||
1 | fvelez | 618 | |
619 | |||
7 | jmachado | 620 | |
1 | fvelez | 621 | <!-- |
622 | Hibernate Tools Task |
||
623 | --> |
||
7 | jmachado | 624 | <taskdef name="hibernatetool" |
625 | classname="org.hibernate.tool.ant.HibernateToolTask" |
||
626 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/> |
||
1 | fvelez | 627 | <!-- |
628 | ========================================================================================== |
||
629 | GENERATE SQL SCRIPTS |
||
630 | ========================================================================================== |
||
631 | --> |
||
632 | <taskdef name="schemaexport" |
||
633 | classname="org.hibernate.tool.hbm2ddl.SchemaExportTask" |
||
634 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/> |
||
635 | |||
636 | |||
1070 | jmachado | 637 | |
1312 | jmachado | 638 | <!-- |
215 | jmachado | 639 | <target name="generateHibernateSql" depends="build"> |
1 | fvelez | 640 | <schemaexport |
641 | properties="${jdbc.properties.build}/${jdbc.properties.filename}" |
||
642 | quiet="no" |
||
643 | text="no" |
||
644 | drop="no" |
||
645 | delimiter=";" |
||
646 | output="${build.dir.classes}/app-scripts.sql"> |
||
647 | <fileset dir="${hbm.dir}"> |
||
648 | <include name="**/*.hbm.xml"/> |
||
1325 | jmachado | 649 | <exclude name="**/Olap*.hbm.xml"/> |
1 | fvelez | 650 | </fileset> |
651 | </schemaexport> |
||
1325 | jmachado | 652 | <schemaexport |
653 | properties="${jdbc.olap.properties.build}/${jdbc.olap.properties.filename}" |
||
654 | quiet="no" |
||
655 | text="no" |
||
656 | drop="no" |
||
657 | delimiter=";" |
||
658 | output="${build.dir.classes}/app-scripts.sql"> |
||
659 | <fileset dir="${hbm.dir}"> |
||
660 | <include name="**/Olap*.hbm.xml"/> |
||
661 | </fileset> |
||
662 | </schemaexport> |
||
1312 | jmachado | 663 | </target>--> |
1 | fvelez | 664 | |
852 | jmachado | 665 | <target name="generateUpdateHibernateSql" depends="build"> |
1547 | jmachado | 666 | <!--<taskdef name="schemaupdate" |
667 | classname="org.hibernate.tool.hbm2ddl.SchemaUpdateTask" |
||
668 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/>--> |
||
852 | jmachado | 669 | <taskdef name="schemaupdate" |
1547 | jmachado | 670 | classname="jomm.dao.utils.JommSchemaUpdateTask" |
671 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/> |
||
852 | jmachado | 672 | <schemaupdate |
673 | properties="${jdbc.properties.build}/${jdbc.properties.filename}" |
||
1547 | jmachado | 674 | quiet="false" |
675 | text="false"> |
||
852 | jmachado | 676 | <fileset dir="${hbm.dir}"> |
677 | <include name="**/*.hbm.xml"/> |
||
1386 | jmachado | 678 | <!--<exclude name="**/Olap*.hbm.xml"/>--> |
852 | jmachado | 679 | </fileset> |
680 | </schemaupdate> |
||
1325 | jmachado | 681 | |
1386 | jmachado | 682 | <!-- |
1325 | jmachado | 683 | <schemaupdate |
684 | properties="${jdbc.olap.properties.build}/${jdbc.olap.properties.filename}" |
||
685 | quiet="no" |
||
686 | text="no"> |
||
687 | <fileset dir="${hbm.dir}"> |
||
688 | <include name="**/Olap*.hbm.xml"/> |
||
689 | </fileset> |
||
1386 | jmachado | 690 | </schemaupdate>--> |
852 | jmachado | 691 | </target> |
692 | |||
1 | fvelez | 693 | <target name="generateHibernateDomainObjects"> |
691 | jmachado | 694 | <replace dir="${hbm.dir}" value=""> |
695 | <include name="**/*.hbm.xml"/> |
||
696 | <replacefilter token='<timestamp source="db"' value="<timestamp"/> |
||
697 | </replace> |
||
1 | fvelez | 698 | <hibernatetool> |
699 | <configuration> |
||
700 | <fileset dir="${hbm.dir}"> |
||
701 | <include name="**/*.hbm.xml"/> |
||
702 | </fileset> |
||
703 | </configuration> |
||
704 | <hbm2java |
||
705 | jdk5="true" |
||
706 | ejb3="false" |
||
707 | destdir="${gen.dir.java}"/> |
||
708 | </hibernatetool> |
||
709 | <delete> |
||
710 | <fileset dir="${gen.dir.java}"> |
||
711 | <include name="**/*Impl.java"/> |
||
712 | </fileset> |
||
713 | </delete> |
||
691 | jmachado | 714 | <replace dir="${hbm.dir}" value=""> |
715 | <include name="**/*.hbm.xml"/> |
||
716 | <replacefilter token='<timestamp' value='<timestamp source="db"'/> |
||
717 | </replace> |
||
1 | fvelez | 718 | </target> |
719 | |||
720 | |||
721 | <!-- |
||
722 | ========================================================================================== |
||
723 | GENERATE DAO IMPLEMENTATION |
||
724 | ========================================================================================== |
||
725 | --> |
||
726 | <target name="generateHibernateDaoClasses"> |
||
727 | <hibernatetool destdir="${gen.dir.java}" > |
||
728 | <configuration> |
||
729 | <fileset dir="${hbm.dir}"> |
||
730 | <include name="**/*.hbm.xml"/> |
||
731 | </fileset> |
||
732 | </configuration> |
||
733 | <hbmtemplate |
||
734 | filepattern="{class-name}${dao.file.pattern}.java" |
||
735 | templatepath="${dao.template.dir}" |
||
736 | template="${dao.impl.template}" |
||
737 | destdir="${dao.impl.package.dir}"> |
||
738 | <property key="jdk5" value="true"/> |
||
739 | <property key="ejb3" value="false"/> |
||
740 | <property key="dao" value="${dao.file.pattern}"/> |
||
741 | <property key="daoDomainPackage" value="${domain.package}"/> |
||
742 | <property key="daoInterfacesPackage" value="${dao.interfaces.package}"/> |
||
743 | <property key="daoImplPackage" value="${dao.impl.package}"/> |
||
744 | </hbmtemplate> |
||
745 | </hibernatetool> |
||
746 | <delete> |
||
747 | <fileset dir="${gen.dir.java}"> |
||
748 | <include name="**/*ImplDao.java"/> |
||
749 | </fileset> |
||
750 | </delete> |
||
751 | </target> |
||
752 | |||
1235 | jmachado | 753 | <!-- |
754 | ========================================================================================== |
||
755 | Generate Hibernate UML Diagrams |
||
756 | ========================================================================================== |
||
1 | fvelez | 757 | |
1235 | jmachado | 758 | |
759 | <property name="doc" location="build/ant/diagrams"/> |
||
760 | |||
761 | <property name="dot.exe" location="/usr/local/bin/dot" /> |
||
762 | |||
763 | <taskdef |
||
764 | name="hbm2gif" |
||
765 | classname="com.oy.shared.lm.ant.HBMtoGIFTask" |
||
766 | classpathref="pathToToolsLib" |
||
767 | /> |
||
768 | |||
769 | <target name="generateHibernateUmlDiagram" depends="initDirs"> |
||
770 | <mkdir dir="${doc}"/> |
||
771 | <hbm2gif |
||
772 | caption="XML file for launching Catalina 5.0.25 applications using Apache Ant." |
||
773 | colors="cyan, lightcyan, orange, black, black" |
||
774 | inFile="${hbm.dir}/pt/estgp/estgweb/domain/CourseUnit.hbm.xml" |
||
775 | dotFile="${doc}/CourseUnit.dot" |
||
776 | outFile="${doc}/CourseUnit.gif" |
||
777 | exeFile="${dot.exe}" |
||
778 | /> |
||
779 | </target> |
||
780 | --> |
||
995 | jmachado | 781 | <!-- |
782 | ========================================================================================== |
||
783 | GENERATE WEBSERVICES JAXWS |
||
784 | ========================================================================================== |
||
785 | --> |
||
1 | fvelez | 786 | |
995 | jmachado | 787 | |
788 | <target name="ws.generate-siges-client" depends="initDirs"> |
||
789 | <taskdef name="wsimport2" classname="com.sun.tools.ws.ant.WsImport" |
||
790 | classpathref="pathToToolsLib"> |
||
791 | </taskdef> |
||
792 | <copy file="${ws.client.binding.dir}/${ws.siges.binding.file}" todir="${build.dir.ws}" overwrite="true"/> |
||
793 | <replace file="${build.dir.ws}/${ws.siges.binding.file}" encoding="UTF-8"> |
||
794 | <replacefilter token="@wsdl.client@" value="${ws.siges.wsdl}"/> |
||
795 | <replacefilter token="@target.namespace@" value="${ws.siges.target.namespace}"/> |
||
796 | <replacefilter token="@ws.package@" value="${ws.siges.package}"/> |
||
797 | </replace> |
||
798 | <!--xendorsed="true"--> |
||
799 | <wsimport2 |
||
800 | |||
801 | debug="${ws.debug}" |
||
802 | verbose="${ws.verbose}" |
||
803 | keep="${ws.keep}" |
||
804 | extension="${ws.extension}" |
||
805 | destdir="${gen.dir.java}" |
||
806 | wsdl="${ws.siges.wsdl}"> |
||
807 | <binding dir="${build.dir.ws}" includes="${ws.client.binding.file}"/> |
||
808 | </wsimport2> |
||
809 | <delete> |
||
810 | <fileset dir="${gen.dir.java}"> |
||
811 | <include name="**/*.class"/> |
||
812 | </fileset> |
||
813 | </delete> |
||
814 | </target> |
||
815 | |||
1775 | jmachado | 816 | <!-- |
817 | ========================================================================================== |
||
818 | GENERATE A LIST OF ALL JSP's FILES IN JSON |
||
819 | ========================================================================================== |
||
820 | --> |
||
821 | <target name="generateJsonJspsFile" > |
||
995 | jmachado | 822 | |
1775 | jmachado | 823 | <java classname="${jsp.interfaces.web.json.class}" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
824 | <arg value="${build.dir.classes}"/> |
||
825 | <arg value="${src.web}"/> |
||
826 | <arg value="/user;/admin;/public"/> |
||
827 | </java> |
||
828 | </target> |
||
829 | |||
1791 | jmachado | 830 | <target name="generateJsonSoaServicesFile" > |
1775 | jmachado | 831 | |
1791 | jmachado | 832 | <java fork="true" classname="${soa.services.json.class}" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
833 | <arg value="${build.dir.classes}"/> |
||
834 | <arg value="${basedir}/${src.dir}/"/> |
||
835 | </java> |
||
836 | </target> |
||
837 | |||
838 | |||
1 | fvelez | 839 | <!-- |
995 | jmachado | 840 | ========================================================================================== |
1496 | jmachado | 841 | DIRECTORIES + STUDIES PLANS XSD JAXB |
1067 | jmachado | 842 | ========================================================================================== |
843 | --> |
||
844 | |||
845 | <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask" classpathref="pathToToolsLib"> |
||
846 | </taskdef> |
||
847 | |||
848 | <target name="directories-gen-jaxb" depends="initDirs"> |
||
849 | <xjc destdir="${gen.dir.java}" package="pt.estgp.estgweb.services.directories.xsd"> |
||
850 | <schema dir="${conf.dir}/directories" includes="directory.xsd"/> |
||
851 | </xjc> |
||
852 | <replace dir="${gen.dir.java}/pt/estgp/estgweb/services/directories/xsd" value=""> |
||
853 | <include name="*.java"/> |
||
854 | <replacefilter token="public Boolean is" value="public Boolean get"/> |
||
855 | </replace> |
||
856 | </target> |
||
857 | |||
858 | |||
1496 | jmachado | 859 | <target name="studies-plan-gen-jaxb" depends="initDirs"> |
860 | <xjc destdir="${gen.dir.java}" package="pt.estgp.estgweb.services.courses.xsd"> |
||
861 | <schema dir="src/xsd" includes="planoestudos.xsd"/> |
||
862 | </xjc> |
||
863 | <replace dir="${gen.dir.java}/pt/estgp/estgweb/services/courses/xsd" value=""> |
||
864 | <include name="*.java"/> |
||
865 | <replacefilter token="public Boolean is" value="public Boolean get"/> |
||
866 | </replace> |
||
867 | </target> |
||
1067 | jmachado | 868 | |
869 | <!-- |
||
870 | ========================================================================================== |
||
995 | jmachado | 871 | DEAMONS |
872 | ========================================================================================== |
||
1 | fvelez | 873 | --> |
874 | |||
875 | <!--<target name="run">--> |
||
876 | <!--<java classname="mitra.oaiharvest.harvest.HarvestEngine" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/>--> |
||
877 | <!--<java classname="mitra.oaiharvest.index.IndexEngine" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/>--> |
||
878 | <!--</target>--> |
||
336 | jmachado | 879 | <target name="util.task.createRepositoryXML"> |
880 | <java classname="pt.estgp.estgweb.services.data.CreateDescriptionsXML" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
881 | </target> |
||
359 | jmachado | 882 | <target name="util.task.reset.urlsstats"> |
883 | <java classname="pt.estgp.estgweb.services.urlstat.ResetRelativePathsService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
884 | </target> |
||
438 | jmachado | 885 | <target name="util.task.reset.urlsstats.digests"> |
886 | <java classname="pt.estgp.estgweb.services.urlstat.ResetRelativePathsServiceDigests" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
887 | </target> |
||
1 | fvelez | 888 | |
1362 | jmachado | 889 | <target name="CourseUnitsStatisticsJobService"> |
890 | <java classname="pt.estgp.estgweb.services.courses.CourseUnitsStatisticsJobService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
891 | </target> |
||
336 | jmachado | 892 | |
1235 | jmachado | 893 | |
1553 | jmachado | 894 | <target name="RUNReportQuestionariosGeneratorTest" depends="compile,copyXslFiles"> |
1575 | jmachado | 895 | <java fork="true" jvmargs="-Dfile.encoding=UTF-8" classname="pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.DocenteReportGenerator" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
1549 | jmachado | 896 | </target> |
1362 | jmachado | 897 | |
1607 | jmachado | 898 | <target name="RUNZipFolderAdHoc"> |
899 | <java fork="true" jvmargs="-Dfile.encoding=UTF-8" classname="pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.utils.ZipFolderForReportDocente" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
900 | </target> |
||
1362 | jmachado | 901 | |
902 | |||
1549 | jmachado | 903 | |
1607 | jmachado | 904 | |
1603 | jmachado | 905 | <target name="print-version"> |
906 | <echo>Java/JVM version: ${ant.java.version}</echo> |
||
907 | <echo>Java/JVM detail version: ${java.version}</echo> |
||
908 | </target> |
||
1549 | jmachado | 909 | |
273 | jmachado | 910 | </project> |