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