Rev 1827 | Rev 1833 | 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"/> |
||
1827 | 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> |
||
1827 | jmachado | 100 | <fileset dir="${tomcat.libs.common.home}"> |
1597 | jmachado | 101 | <include name="*.jar"/> |
102 | </fileset> |
||
1827 | jmachado | 103 | <fileset dir="${tomcat.libs.ant.home}"> |
1597 | jmachado | 104 | <include name="*.jar"/> |
105 | </fileset> |
||
106 | </classpath> |
||
107 | </taskdef> |
||
1 | fvelez | 108 | |
109 | |||
110 | <!-- |
||
111 | TOMCAT Instalation Tasks |
||
112 | --> |
||
1827 | 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}" /> |
1827 | jmachado | 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> |
||
1814 | jmachado | 309 | |
310 | <fileset dir="${common.lib.dir}/poi"> |
||
311 | <include name="**/*.jar"/> |
||
312 | </fileset> |
||
313 | |||
1821 | jmachado | 314 | <fileset dir="${common.lib.dir}/reflections"> |
315 | <include name="**/*.jar"/> |
||
316 | </fileset> |
||
317 | |||
318 | |||
1827 | jmachado | 319 | |
320 | |||
1 | fvelez | 321 | </copy> |
322 | <copy file="${dist.dir}/estgweb.jar" todir="${build.dir.war}/WEB-INF/lib"/> |
||
323 | <copy todir="${build.dir.war}/WEB-INF" overwrite="true"> |
||
324 | <fileset dir="${conf.dir}/WEB-INF"> |
||
325 | <include name="**/*.*"/> |
||
326 | </fileset> |
||
327 | </copy> |
||
328 | <mkdir dir="${build.dir.war}/WEB-INF/classes"/> |
||
329 | <copy todir="${build.dir.war}/WEB-INF/classes" overwrite="true"> |
||
330 | <fileset dir="${build.dir.classes}"> |
||
18 | jmachado | 331 | <include name="**/*.types"/> |
1 | fvelez | 332 | <include name="**/*.properties"/> |
29 | jmachado | 333 | <include name="**/*.txt"/> |
1 | fvelez | 334 | <include name="**/*.xml"/> |
730 | jmachado | 335 | <include name="**/*.gif"/> |
1554 | jmachado | 336 | <include name="**/*.png"/> |
214 | jmachado | 337 | <include name="**/*.exe"/> |
248 | jmachado | 338 | <include name="**/*.xsl"/> |
339 | <include name="**/*.xsd"/> |
||
1775 | jmachado | 340 | <include name="**/*.json"/> |
1 | fvelez | 341 | </fileset> |
342 | </copy> |
||
343 | <copy todir="${build.dir.war}" overwrite="true"> |
||
344 | <fileset dir="src/web"> |
||
345 | <include name="**/*"/> |
||
346 | </fileset> |
||
1395 | jmachado | 347 | |
1 | fvelez | 348 | </copy> |
1395 | jmachado | 349 | <mkdir dir="${build.dir.war}/docs"/> |
1507 | jmachado | 350 | |
351 | <!--DOCUMENTOS IMPORTANTES ARQUITETURA EMPRESARIAL TODO REVER LOCALIZAÇÃO DOS MESMOS--> |
||
1395 | jmachado | 352 | <copy todir="${build.dir.war}/docs" overwrite="true" file="src/doc/siges/ModeloDeInformacaoPAE-EmVigor.docx"/> |
1507 | jmachado | 353 | <copy todir="${build.dir.war}/docs" overwrite="false" file="src/doc/siges/Modelo_de_Dados_Siges11.zip"/> |
1395 | jmachado | 354 | <copy todir="${build.dir.war}/docs" overwrite="true" file="src/doc/BacoV32016/processos/DocumentacaoProcessos.doc"/> |
355 | |||
48 | fvelez | 356 | <replace file="${build.dir.war}/js/ajax.js"> |
165 | jmachado | 357 | <replacefilter token="@contextPath@" value="${tomcat.context.path}"/> |
48 | fvelez | 358 | </replace> |
165 | jmachado | 359 | <replace file="${build.dir.war}/css/style.css"> |
360 | <replacefilter token="@contextPath@" value="${tomcat.context.path}"/> |
||
361 | </replace> |
||
362 | <replace file="${build.dir.war}/css/intranet.css"> |
||
363 | <replacefilter token="@contextPath@" value="${tomcat.context.path}"/> |
||
364 | </replace> |
||
385 | jmachado | 365 | </target> |
165 | jmachado | 366 | |
385 | jmachado | 367 | <target name="jasper" depends="copy.jsps.war"> |
368 | <delete dir="${build.dir.jsp}"/> |
||
369 | <mkdir dir="${build.dir.jsp}"/> |
||
1605 | jmachado | 370 | <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 | 371 | <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 | 372 | <src path="${build.dir.jsp}"/> |
1597 | jmachado | 373 | <src path="${build.dir}/"/> |
385 | jmachado | 374 | <classpath path="${build.dir.classes}"/> |
375 | <classpath refid="pathToToolsLib"/> |
||
376 | </javac> |
||
377 | <delete> |
||
378 | <fileset dir="${build.dir.war}"> |
||
379 | <include name="**/*.jsp"/> |
||
380 | </fileset> |
||
381 | </delete> |
||
1598 | jmachado | 382 | <delete> |
383 | <fileset dir="${build.dir.war}/WEB-INF/tags"> |
||
384 | <include name="**/*.jsp"/> |
||
385 | </fileset> |
||
386 | </delete> |
||
1 | fvelez | 387 | </target> |
388 | |||
389 | <target name="war" depends="build.war"> |
||
390 | <delete file="${dist.dir}/${tomcat.war.file}"/> |
||
391 | <jar destfile="${dist.dir}/${tomcat.war.file}"> |
||
392 | <fileset dir="${build.dir.war}"> |
||
393 | <include name="**/*" /> |
||
394 | </fileset> |
||
395 | </jar> |
||
396 | </target> |
||
397 | |||
385 | jmachado | 398 | <target name="war.jasper" depends="build.war,jasper"> |
399 | <delete file="${dist.dir}/${tomcat.war.file}"/> |
||
400 | <jar destfile="${dist.dir}/${tomcat.war.file}"> |
||
401 | <fileset dir="${build.dir.war}"> |
||
402 | <include name="**/*" /> |
||
403 | </fileset> |
||
404 | </jar> |
||
405 | </target> |
||
1 | fvelez | 406 | |
385 | jmachado | 407 | |
1 | fvelez | 408 | <!-- |
409 | ========================================================================================== |
||
410 | Generate Configuration Files TASKS |
||
411 | ========================================================================================== |
||
412 | --> |
||
1791 | jmachado | 413 | <target name="createConfigurationFiles" depends="compileToolFiles,copyConfigurationFiles,replaceFiltersConfigurationFiles,generateHibernateCfgXml"/> |
1 | fvelez | 414 | |
415 | <target name="copyConfigurationFiles"> |
||
416 | <copy overwrite="true" todir="${build.dir.classes}"> |
||
417 | <fileset dir="${hbm.dir}" includes="**/*.hbm.xml"/> |
||
418 | </copy> |
||
244 | jmachado | 419 | <mkdir dir="${build.dir.classes}/template/xsd"/> |
420 | <copy todir="${build.dir.classes}/template/xsd" overwrite="true"> |
||
421 | <fileset dir="${src.xsd}"> |
||
422 | <include name="**/*.xsl"/> |
||
423 | <include name="**/*.xsd"/> |
||
424 | </fileset> |
||
425 | </copy> |
||
1 | fvelez | 426 | <copy overwrite="true" todir="${build.dir.classes}"> |
1775 | jmachado | 427 | <fileset dir="${src.dir}" includes="**/*.json"/> |
428 | </copy> |
||
429 | <copy overwrite="true" todir="${build.dir.classes}"> |
||
1 | fvelez | 430 | <fileset dir="${src.dir}" includes="**/*.xsl"/> |
431 | </copy> |
||
432 | <copy overwrite="true" todir="${build.dir.classes}"> |
||
730 | jmachado | 433 | <fileset dir="${src.dir}" includes="**/*.gif"/> |
434 | </copy> |
||
435 | <copy overwrite="true" todir="${build.dir.classes}"> |
||
1554 | jmachado | 436 | <fileset dir="${src.dir}" includes="**/*.png"/> |
437 | </copy> |
||
438 | <copy overwrite="true" todir="${build.dir.classes}"> |
||
381 | jmachado | 439 | <fileset dir="${src.dir}" includes="**/*.csv"/> |
440 | </copy> |
||
441 | <copy overwrite="true" todir="${build.dir.classes}"> |
||
1 | fvelez | 442 | <fileset dir="${conf.dir}/berserk" includes="*.*"/> |
443 | </copy> |
||
29 | jmachado | 444 | <mkdir dir="${email.templates.dir.build}"/> |
445 | <copy overwrite="true" todir="${email.templates.dir.build}"> |
||
446 | <fileset dir="${email.templates.dir.conf}" includes="*.*"/> |
||
447 | </copy> |
||
227 | jmachado | 448 | <mkdir dir="${sms.templates.dir.build}"/> |
449 | <copy overwrite="true" todir="${sms.templates.dir.build}"> |
||
450 | <fileset dir="${sms.templates.dir.conf}" includes="*.*"/> |
||
451 | </copy> |
||
215 | jmachado | 452 | <mkdir dir="${assignement.templates.dir.build}"/> |
453 | <copy overwrite="true" todir="${assignement.templates.dir.build}"> |
||
454 | <fileset dir="${assignement.templates.dir.conf}" includes="*.*"/> |
||
455 | </copy> |
||
1325 | jmachado | 456 | <!--<copy overwrite="true" todir="${olap.cfg.xml.build}" file="${olap.cfg.xml}"/>--> |
1 | fvelez | 457 | <copy overwrite="true" todir="${hibernate.cfg.xml.build}" file="${hibernate.cfg.xml}"/> |
18 | jmachado | 458 | <copy overwrite="true" todir="${mime.types.build}" file="${mime.types}"/> |
1 | fvelez | 459 | <copy overwrite="true" todir="${app.properties.build}" file="${app.properties}"/> |
1810 | jmachado | 460 | <copy overwrite="true" todir="${ldap.properties.build}" file="${ldap.properties}"/> |
1 | fvelez | 461 | <copy overwrite="true" todir="${jdbc.properties.build}" file="${jdbc.properties}"/> |
1325 | jmachado | 462 | <copy overwrite="true" todir="${jdbc.olap.properties.build}" file="${jdbc.olap.properties}"/> |
1 | fvelez | 463 | <copy overwrite="true" todir="${ldap.properties.build}" file="${ldap.properties}"/> |
464 | <copy overwrite="true" todir="${build.dir.classes}" file="${log4j.properties}"/> |
||
214 | jmachado | 465 | <mkdir dir="${build.dir.intranet.setup.folders.file}"/> |
466 | <copy overwrite="true" todir="${build.dir.intranet.setup.folders.file}" file="${intranet.setup.folders.file.src}"/> |
||
219 | jmachado | 467 | |
368 | jmachado | 468 | <mkdir dir="${build.dir.classes}/pt/estgp/estgweb/directories"/> |
469 | <copy overwrite="true" todir="${build.dir.classes}/pt/estgp/estgweb/directories"> |
||
470 | <fileset dir="${conf.dir}/directories" includes="*.*"/> |
||
471 | </copy> |
||
347 | jmachado | 472 | <!--<java classname="${scripts.buider.class}" classpath="${build.dir.classes}">--> |
473 | <!--<arg value="${basedir}${file.separator}..${file.separator}common"/>--> |
||
474 | <!--<arg value="${basedir}${file.separator}build${file.separator}ant${file.separator}classes"/>--> |
||
475 | <!--<arg value="${build.dir.scripts}"/>--> |
||
476 | <!--<arg value="${scripts.target.libs.file}"/>--> |
||
477 | <!--</java>--> |
||
478 | <!--<copy overwrite="true" todir="${build.dir.scripts}">--> |
||
479 | <!--<fileset dir="${src.scripts}" includes="*.*"/>--> |
||
480 | <!--</copy>--> |
||
244 | jmachado | 481 | |
1 | fvelez | 482 | </target> |
483 | |||
1549 | jmachado | 484 | <target name="copyXslFiles"> |
485 | |||
486 | <copy overwrite="true" todir="${build.dir.classes}"> |
||
487 | <fileset dir="${src.dir}" includes="**/*.xsl"/> |
||
488 | </copy> |
||
489 | |||
490 | |||
491 | </target> |
||
492 | |||
1 | fvelez | 493 | <target name="replaceFiltersConfigurationFiles"> |
494 | <delete file="${build.dir.classes}/MessageResources.properties"/> |
||
1320 | jmachado | 495 | <!--<concat encoding="ISO-8859-1" destfile="${build.dir.classes}/MessageResources.properties" append="true"> |
1 | fvelez | 496 | <fileset dir="${conf.dir}/language"> |
497 | <include name="*.properties" /> |
||
498 | </fileset> |
||
1320 | jmachado | 499 | </concat>--> |
500 | <copy todir="${build.dir.classes}"> |
||
501 | <fileset dir="${conf.dir}/language"> |
||
502 | <include name="*.properties" /> |
||
503 | </fileset> |
||
504 | </copy> |
||
1 | fvelez | 505 | <replace file="${jdbc.properties.build}/${jdbc.properties.filename}"> |
506 | <replacefilter token="@database.username@" value="${database.username}"/> |
||
507 | <replacefilter token="@database.password@" value="${database.password}"/> |
||
508 | <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
509 | </replace> |
||
1325 | jmachado | 510 | <replace file="${jdbc.olap.properties.build}/${jdbc.olap.properties.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 | </replace> |
||
1 | fvelez | 515 | <replace file="${hibernate.cfg.xml.build}/${hibernate.cfg.xml.filename}"> |
516 | <replacefilter token="@database.username@" value="${database.username}"/> |
||
517 | <replacefilter token="@database.password@" value="${database.password}"/> |
||
518 | <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
519 | <replacefilter token="@hibernate.show.sql@" value="${hibernate.show.sql}"/> |
||
520 | </replace> |
||
1325 | jmachado | 521 | <!-- |
522 | <replace file="${olap.cfg.xml.build}/${olap.cfg.xml.filename}"> |
||
523 | <replacefilter token="@database.username@" value="${database.username}"/> |
||
524 | <replacefilter token="@database.password@" value="${database.password}"/> |
||
525 | <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
526 | <replacefilter token="@hibernate.show.sql@" value="${hibernate.show.sql}"/> |
||
527 | </replace>--> |
||
1 | fvelez | 528 | <replace file="${app.properties.build}/app.properties"> |
1525 | jmachado | 529 | |
530 | |||
531 | <replacefilter token="@google.recaptcha.secret.key@" value="${google.recaptcha.secret.key}"/> |
||
532 | |||
1426 | jmachado | 533 | <replacefilter token="@admin.email.1@" value="${admin.email.1}"/> |
534 | <replacefilter token="@admin.email.2@" value="${admin.email.2}"/> |
||
1 | fvelez | 535 | <replacefilter token="@tmp.dir@" value="${tmp.dir}"/> |
187 | jmachado | 536 | <replacefilter token="@data.dir@" value="${data.dir}"/> |
1 | fvelez | 537 | <replacefilter token="@out.dir@" value="${out.dir}"/> |
29 | jmachado | 538 | <replacefilter token="@email.templates.dir@" value="${email.templates.dir}"/> |
79 | jmachado | 539 | <replacefilter token="@use.ldap@" value="${use.ldap}"/> |
146 | jmachado | 540 | <replacefilter token="@site.url@" value="${site.url}"/> |
1017 | jmachado | 541 | <!-- DONT USE ANY MORE NOW IS IN CONFIGURATION DAO <replacefilter token="@ws.siges.wsdl@" value="${ws.siges.wsdl}"/>--> |
163 | jmachado | 542 | <replacefilter token="@ws.siges.target.namespace@" value="${ws.siges.target.namespace}"/> |
214 | jmachado | 543 | <replacefilter token="@intranet.setup.folders.file@" value="${build.dir.relative.intranet.setup.folders.file}"/> |
544 | <replacefilter token="@intranet.setup.folders.filename@" value="${intranet.setup.folders.filename}"/> |
||
1235 | jmachado | 545 | |
546 | <replacefilter token="@oracle.siges.url@" value="${oracle.siges.url}"/> |
||
547 | <replacefilter token="@oracle.siges.username@" value="${oracle.siges.username}"/> |
||
548 | <replacefilter token="@oracle.siges.password@" value="${oracle.siges.password}"/> |
||
549 | |||
1312 | jmachado | 550 | <!--System instance type specifications--> |
1327 | jmachado | 551 | |
552 | <replacefilter token="@email.password@" value="${email.password}"/> |
||
1426 | jmachado | 553 | <replacefilter token="@email.user.sufix@" value="${email.user.sufix}"/> |
1459 | jmachado | 554 | |
555 | <replacefilter token="@email.user.count@" value="${email.user.count}"/> |
||
1431 | jmachado | 556 | <replacefilter token="@email.use.round.robin@" value="${email.use.round.robin}"/> |
1459 | jmachado | 557 | |
1431 | jmachado | 558 | <replacefilter token="@email.use.security@" value="${email.use.security}"/> |
1426 | jmachado | 559 | <replacefilter token="@email.user.prefix@" value="${email.user.prefix}"/> |
1431 | jmachado | 560 | <replacefilter token="@email.from@" value="${email.from}"/> |
1432 | jmachado | 561 | <replacefilter token="@email.server@" value="${email.server}"/> |
1327 | jmachado | 562 | <replacefilter token="@test.control.var@" value="${test.control.var}"/> |
1394 | jmachado | 563 | |
564 | <replacefilter token="@mode.pae.enabled@" value="${mode.pae.enabled}"/> |
||
1312 | jmachado | 565 | <replacefilter token="@system.theme@" value="${system.theme}"/> |
566 | <replacefilter token="@authentication.policy.service@" value="${authentication.policy.service}"/> |
||
567 | <replacefilter token="@authentication.policy.username.msg.key@" value="${authentication.policy.username.msg.key}"/> |
||
568 | <replacefilter token="@authentication.policy.password.msg.key@" value="${authentication.policy.password.msg.key}"/> |
||
569 | <replacefilter token="@system.redirections.policy.index.welcome@" value="${system.redirections.policy.index.welcome}"/> |
||
570 | <replacefilter token="@system.redirections.policy.authentication.action@" value="${system.redirections.policy.authentication.action}"/> |
||
1387 | jmachado | 571 | <replacefilter token="@system.redirections.policy.authentication.logout.action@" value="${system.redirections.policy.authentication.logout.action}"/> |
1455 | jmachado | 572 | <replacefilter token="@system.mail.standard.certificated.home.page@" value="${system.mail.standard.certificated.home.page}"/> |
1830 | jmachado | 573 | <replacefilter token="@system.wsjson.service.course.report.quest.result.api@" value="${system.wsjson.service.course.report.quest.result.api}"/> |
574 | <replacefilter token="@system.wsjson.service.course.units.reports.api@" value="${system.wsjson.service.course.units.reports.api}"/> |
||
575 | <replacefilter token="@system.wsjson.service.course.units.dtp.stats.api@" value="${system.wsjson.service.course.units.dtp.stats.api}"/> |
||
1312 | jmachado | 576 | |
1455 | jmachado | 577 | |
1312 | jmachado | 578 | <replacefilter token="@system.intranet.url@" value="${system.intranet.url}"/> |
579 | <replacefilter token="@system.public.url@" value="${system.public.url}"/> |
||
580 | |||
1324 | jmachado | 581 | <replacefilter token="@ionline.user@" value="${ionline.user}"/> |
582 | <replacefilter token="@ionline.pass@" value="${ionline.pass}"/> |
||
1 | fvelez | 583 | </replace> |
1810 | jmachado | 584 | <replace file="${ldap.properties.build}/ldap.properties"> |
585 | <replacefilter token="@ldap.queries.login@" value="${ldap.queries.login}"/> |
||
586 | <replacefilter token="@ldap.queries.password@" value="${ldap.queries.password}"/> |
||
587 | </replace> |
||
1 | fvelez | 588 | <replace file="${build.dir.classes}/${log4j.properties.filename}"> |
589 | <replacefilter token="@log.file@" value="${log.file}"/> |
||
299 | jmachado | 590 | <replacefilter token="@log.level@" value="${log.level}"/> |
1 | fvelez | 591 | </replace> |
352 | jmachado | 592 | <!--<replace file="${build.dir.scripts}/${scripts.setenv.file}"> |
219 | jmachado | 593 | <replacefilter token="@tomcat.home@" value="${tomcat.home}"/> |
352 | jmachado | 594 | </replace>--> |
1 | fvelez | 595 | <replace file="${jdbc.properties.build}/${jdbc.properties.filename}"> |
596 | <replacefilter token="@database.username@" value="${database.username}"/> |
||
597 | <replacefilter token="@database.password@" value="${database.password}"/> |
||
598 | <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
599 | </replace> |
||
1325 | jmachado | 600 | <replace file="${jdbc.olap.properties.build}/${jdbc.olap.properties.filename}"> |
601 | <replacefilter token="@database.username@" value="${database.username}"/> |
||
602 | <replacefilter token="@database.password@" value="${database.password}"/> |
||
603 | <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
604 | </replace> |
||
1 | fvelez | 605 | </target> |
606 | <target name="generateHibernateCfgXml" depends="compileToolFiles"> |
||
607 | <!--<delete file="${build.dir.classes}/${hibernate.cfg.xml.filename}"/>--> |
||
608 | <java classname="${mapping.buider.class}" classpath="${build.dir.classes}"> |
||
609 | <arg value="${hibernate.cfg.xml.build}"/> |
||
610 | <arg value="${hibernate.cfg.xml}"/> |
||
611 | <arg value="${package.dir}"/> |
||
1325 | jmachado | 612 | <!--<arg value="Olap"/> O Hibernate.cfg serve para tudo no entanto o schema update e feito |
613 | <arg value="false"/> com o jdbc.olap para que estas tabelas fiquem como MyISAM |
||
614 | --> |
||
1 | fvelez | 615 | </java> |
1325 | jmachado | 616 | <!--<echo message="Starting OLAP"/> |
617 | <java classname="${mapping.buider.class}" classpath="${build.dir.classes}"> |
||
618 | <arg value="${olap.cfg.xml.build}"/> |
||
619 | <arg value="${olap.cfg.xml}"/> |
||
620 | <arg value="${package.dir}"/> |
||
621 | <arg value="Olap"/> |
||
622 | <arg value="true"/> |
||
623 | </java>--> |
||
1 | fvelez | 624 | <antcall target="replaceFiltersConfigurationFiles"/> |
625 | </target> |
||
626 | <target name="dbInit"> |
||
1325 | jmachado | 627 | <!--<delete file="${build.dir.classes}/${olap.cfg.xml.filename}"/>--> |
7 | jmachado | 628 | <!--<delete file="${build.dir.classes}/${hibernate.cfg.xml.filename}"/>--> |
629 | <java classname="pt.estgp.estgweb.examples.DBInit" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
1 | fvelez | 630 | |
7 | jmachado | 631 | <antcall target="replaceFiltersConfigurationFiles"/> |
632 | </target> |
||
1 | fvelez | 633 | |
634 | |||
7 | jmachado | 635 | |
1 | fvelez | 636 | <!-- |
637 | Hibernate Tools Task |
||
638 | --> |
||
7 | jmachado | 639 | <taskdef name="hibernatetool" |
640 | classname="org.hibernate.tool.ant.HibernateToolTask" |
||
641 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/> |
||
1 | fvelez | 642 | <!-- |
643 | ========================================================================================== |
||
644 | GENERATE SQL SCRIPTS |
||
645 | ========================================================================================== |
||
646 | --> |
||
647 | <taskdef name="schemaexport" |
||
648 | classname="org.hibernate.tool.hbm2ddl.SchemaExportTask" |
||
649 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/> |
||
650 | |||
651 | |||
1070 | jmachado | 652 | |
1312 | jmachado | 653 | <!-- |
215 | jmachado | 654 | <target name="generateHibernateSql" depends="build"> |
1 | fvelez | 655 | <schemaexport |
656 | properties="${jdbc.properties.build}/${jdbc.properties.filename}" |
||
657 | quiet="no" |
||
658 | text="no" |
||
659 | drop="no" |
||
660 | delimiter=";" |
||
661 | output="${build.dir.classes}/app-scripts.sql"> |
||
662 | <fileset dir="${hbm.dir}"> |
||
663 | <include name="**/*.hbm.xml"/> |
||
1325 | jmachado | 664 | <exclude name="**/Olap*.hbm.xml"/> |
1 | fvelez | 665 | </fileset> |
666 | </schemaexport> |
||
1325 | jmachado | 667 | <schemaexport |
668 | properties="${jdbc.olap.properties.build}/${jdbc.olap.properties.filename}" |
||
669 | quiet="no" |
||
670 | text="no" |
||
671 | drop="no" |
||
672 | delimiter=";" |
||
673 | output="${build.dir.classes}/app-scripts.sql"> |
||
674 | <fileset dir="${hbm.dir}"> |
||
675 | <include name="**/Olap*.hbm.xml"/> |
||
676 | </fileset> |
||
677 | </schemaexport> |
||
1312 | jmachado | 678 | </target>--> |
1 | fvelez | 679 | |
852 | jmachado | 680 | <target name="generateUpdateHibernateSql" depends="build"> |
1547 | jmachado | 681 | <!--<taskdef name="schemaupdate" |
682 | classname="org.hibernate.tool.hbm2ddl.SchemaUpdateTask" |
||
683 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/>--> |
||
852 | jmachado | 684 | <taskdef name="schemaupdate" |
1547 | jmachado | 685 | classname="jomm.dao.utils.JommSchemaUpdateTask" |
686 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/> |
||
852 | jmachado | 687 | <schemaupdate |
688 | properties="${jdbc.properties.build}/${jdbc.properties.filename}" |
||
1547 | jmachado | 689 | quiet="false" |
690 | text="false"> |
||
852 | jmachado | 691 | <fileset dir="${hbm.dir}"> |
692 | <include name="**/*.hbm.xml"/> |
||
1386 | jmachado | 693 | <!--<exclude name="**/Olap*.hbm.xml"/>--> |
852 | jmachado | 694 | </fileset> |
695 | </schemaupdate> |
||
1325 | jmachado | 696 | |
1386 | jmachado | 697 | <!-- |
1325 | jmachado | 698 | <schemaupdate |
699 | properties="${jdbc.olap.properties.build}/${jdbc.olap.properties.filename}" |
||
700 | quiet="no" |
||
701 | text="no"> |
||
702 | <fileset dir="${hbm.dir}"> |
||
703 | <include name="**/Olap*.hbm.xml"/> |
||
704 | </fileset> |
||
1386 | jmachado | 705 | </schemaupdate>--> |
852 | jmachado | 706 | </target> |
707 | |||
1814 | jmachado | 708 | <!-- |
709 | Esta tarefa compila todas as classes necessarias para que os enhanced types seja bem gerados |
||
710 | Para que tudo corra bem é necessario que os pacotes pt.estgp.estgweb.utils jomm.utils e pt.estgp.estgweb.domain.gentypes sejam 100% coesos |
||
711 | com zero referências ao exterior. Esta modificação foi feita na versão 1812 |
||
712 | Classes que necessitem de serviços ou outros tipos que ainda não foram compilados |
||
713 | os seus enhanced's devem usar o meta atributo no mapeamento do hibernate |
||
714 | exemplo |
||
715 | <property name="repositoryFileProxy" |
||
716 | type="pt.estgp.estgweb.domain.typegenservices.repositorydocuments.EnhancedRepositoryFileProxy"> |
||
717 | <meta attribute="property-type">pt.estgp.estgweb.domain.typegenservices.repositorydocuments.RepositoryFileProxy</meta> |
||
718 | <column name="repositoryStream" sql-type="VARCHAR(255)"/> |
||
719 | </property> |
||
720 | |||
721 | --> |
||
722 | <target name="compileUtils" depends="initDirs"> |
||
723 | <javac encoding="UTF-8" source="1.6" target="1.6" destdir="${build.dir.classes}" debug="true" optimize="true" failonerror="true" nowarn="true"> |
||
724 | <src path="${src.dir}/pt/estgp/estgweb/utils"/> |
||
725 | <src path="${src.dir}/jomm/utils"/> |
||
726 | <classpath refid="pathToToolsLib"/> |
||
727 | </javac> |
||
728 | </target> |
||
729 | |||
730 | <target name="compileEnhancedTypes" depends="compileUtils"> |
||
731 | <javac encoding="UTF-8" source="1.6" target="1.6" destdir="${build.dir.classes}" debug="true" optimize="true" failonerror="true" nowarn="true"> |
||
732 | <src path="${src.dir}/pt/estgp/estgweb/domain/typesgen"/> |
||
733 | <classpath refid="pathToToolsLib"/> |
||
734 | </javac> |
||
735 | </target> |
||
736 | |||
737 | |||
738 | <target name="generateHibernateDomainObjects" > |
||
739 | <!--<echo message="SE NAO COMPILOU AS ENHANCED CLASSES COMPILE PRIMEIRO POR FAVOR"></echo> |
||
740 | <sleep milliseconds="5000"> |
||
741 | </sleep>--> |
||
691 | jmachado | 742 | <replace dir="${hbm.dir}" value=""> |
743 | <include name="**/*.hbm.xml"/> |
||
744 | <replacefilter token='<timestamp source="db"' value="<timestamp"/> |
||
745 | </replace> |
||
1 | fvelez | 746 | <hibernatetool> |
747 | <configuration> |
||
748 | <fileset dir="${hbm.dir}"> |
||
749 | <include name="**/*.hbm.xml"/> |
||
750 | </fileset> |
||
751 | </configuration> |
||
752 | <hbm2java |
||
753 | jdk5="true" |
||
754 | ejb3="false" |
||
755 | destdir="${gen.dir.java}"/> |
||
756 | </hibernatetool> |
||
757 | <delete> |
||
758 | <fileset dir="${gen.dir.java}"> |
||
759 | <include name="**/*Impl.java"/> |
||
760 | </fileset> |
||
761 | </delete> |
||
691 | jmachado | 762 | <replace dir="${hbm.dir}" value=""> |
763 | <include name="**/*.hbm.xml"/> |
||
764 | <replacefilter token='<timestamp' value='<timestamp source="db"'/> |
||
765 | </replace> |
||
1 | fvelez | 766 | </target> |
767 | |||
768 | |||
769 | <!-- |
||
770 | ========================================================================================== |
||
771 | GENERATE DAO IMPLEMENTATION |
||
772 | ========================================================================================== |
||
773 | --> |
||
774 | <target name="generateHibernateDaoClasses"> |
||
775 | <hibernatetool destdir="${gen.dir.java}" > |
||
776 | <configuration> |
||
777 | <fileset dir="${hbm.dir}"> |
||
778 | <include name="**/*.hbm.xml"/> |
||
779 | </fileset> |
||
780 | </configuration> |
||
781 | <hbmtemplate |
||
782 | filepattern="{class-name}${dao.file.pattern}.java" |
||
783 | templatepath="${dao.template.dir}" |
||
784 | template="${dao.impl.template}" |
||
785 | destdir="${dao.impl.package.dir}"> |
||
786 | <property key="jdk5" value="true"/> |
||
787 | <property key="ejb3" value="false"/> |
||
788 | <property key="dao" value="${dao.file.pattern}"/> |
||
789 | <property key="daoDomainPackage" value="${domain.package}"/> |
||
790 | <property key="daoInterfacesPackage" value="${dao.interfaces.package}"/> |
||
791 | <property key="daoImplPackage" value="${dao.impl.package}"/> |
||
792 | </hbmtemplate> |
||
793 | </hibernatetool> |
||
794 | <delete> |
||
795 | <fileset dir="${gen.dir.java}"> |
||
796 | <include name="**/*ImplDao.java"/> |
||
797 | </fileset> |
||
798 | </delete> |
||
799 | </target> |
||
800 | |||
1235 | jmachado | 801 | <!-- |
802 | ========================================================================================== |
||
803 | Generate Hibernate UML Diagrams |
||
804 | ========================================================================================== |
||
1 | fvelez | 805 | |
1235 | jmachado | 806 | |
807 | <property name="doc" location="build/ant/diagrams"/> |
||
808 | |||
809 | <property name="dot.exe" location="/usr/local/bin/dot" /> |
||
810 | |||
811 | <taskdef |
||
812 | name="hbm2gif" |
||
813 | classname="com.oy.shared.lm.ant.HBMtoGIFTask" |
||
814 | classpathref="pathToToolsLib" |
||
815 | /> |
||
816 | |||
817 | <target name="generateHibernateUmlDiagram" depends="initDirs"> |
||
818 | <mkdir dir="${doc}"/> |
||
819 | <hbm2gif |
||
820 | caption="XML file for launching Catalina 5.0.25 applications using Apache Ant." |
||
821 | colors="cyan, lightcyan, orange, black, black" |
||
822 | inFile="${hbm.dir}/pt/estgp/estgweb/domain/CourseUnit.hbm.xml" |
||
823 | dotFile="${doc}/CourseUnit.dot" |
||
824 | outFile="${doc}/CourseUnit.gif" |
||
825 | exeFile="${dot.exe}" |
||
826 | /> |
||
827 | </target> |
||
828 | --> |
||
995 | jmachado | 829 | <!-- |
830 | ========================================================================================== |
||
831 | GENERATE WEBSERVICES JAXWS |
||
832 | ========================================================================================== |
||
833 | --> |
||
1 | fvelez | 834 | |
995 | jmachado | 835 | |
836 | <target name="ws.generate-siges-client" depends="initDirs"> |
||
837 | <taskdef name="wsimport2" classname="com.sun.tools.ws.ant.WsImport" |
||
838 | classpathref="pathToToolsLib"> |
||
839 | </taskdef> |
||
840 | <copy file="${ws.client.binding.dir}/${ws.siges.binding.file}" todir="${build.dir.ws}" overwrite="true"/> |
||
841 | <replace file="${build.dir.ws}/${ws.siges.binding.file}" encoding="UTF-8"> |
||
842 | <replacefilter token="@wsdl.client@" value="${ws.siges.wsdl}"/> |
||
843 | <replacefilter token="@target.namespace@" value="${ws.siges.target.namespace}"/> |
||
844 | <replacefilter token="@ws.package@" value="${ws.siges.package}"/> |
||
845 | </replace> |
||
846 | <!--xendorsed="true"--> |
||
847 | <wsimport2 |
||
848 | |||
849 | debug="${ws.debug}" |
||
850 | verbose="${ws.verbose}" |
||
851 | keep="${ws.keep}" |
||
852 | extension="${ws.extension}" |
||
853 | destdir="${gen.dir.java}" |
||
854 | wsdl="${ws.siges.wsdl}"> |
||
855 | <binding dir="${build.dir.ws}" includes="${ws.client.binding.file}"/> |
||
856 | </wsimport2> |
||
857 | <delete> |
||
858 | <fileset dir="${gen.dir.java}"> |
||
859 | <include name="**/*.class"/> |
||
860 | </fileset> |
||
861 | </delete> |
||
862 | </target> |
||
863 | |||
1775 | jmachado | 864 | <!-- |
865 | ========================================================================================== |
||
866 | GENERATE A LIST OF ALL JSP's FILES IN JSON |
||
867 | ========================================================================================== |
||
868 | --> |
||
869 | <target name="generateJsonJspsFile" > |
||
995 | jmachado | 870 | |
1775 | jmachado | 871 | <java classname="${jsp.interfaces.web.json.class}" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
872 | <arg value="${build.dir.classes}"/> |
||
873 | <arg value="${src.web}"/> |
||
874 | <arg value="/user;/admin;/public"/> |
||
875 | </java> |
||
876 | </target> |
||
877 | |||
1791 | jmachado | 878 | <target name="generateJsonSoaServicesFile" > |
1775 | jmachado | 879 | |
1791 | jmachado | 880 | <java fork="true" classname="${soa.services.json.class}" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
881 | <arg value="${build.dir.classes}"/> |
||
882 | <arg value="${basedir}/${src.dir}/"/> |
||
883 | </java> |
||
884 | </target> |
||
885 | |||
886 | |||
1 | fvelez | 887 | <!-- |
995 | jmachado | 888 | ========================================================================================== |
1496 | jmachado | 889 | DIRECTORIES + STUDIES PLANS XSD JAXB |
1067 | jmachado | 890 | ========================================================================================== |
891 | --> |
||
892 | |||
893 | <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask" classpathref="pathToToolsLib"> |
||
894 | </taskdef> |
||
895 | |||
896 | <target name="directories-gen-jaxb" depends="initDirs"> |
||
897 | <xjc destdir="${gen.dir.java}" package="pt.estgp.estgweb.services.directories.xsd"> |
||
898 | <schema dir="${conf.dir}/directories" includes="directory.xsd"/> |
||
899 | </xjc> |
||
900 | <replace dir="${gen.dir.java}/pt/estgp/estgweb/services/directories/xsd" value=""> |
||
901 | <include name="*.java"/> |
||
902 | <replacefilter token="public Boolean is" value="public Boolean get"/> |
||
903 | </replace> |
||
904 | </target> |
||
905 | |||
906 | |||
1496 | jmachado | 907 | <target name="studies-plan-gen-jaxb" depends="initDirs"> |
908 | <xjc destdir="${gen.dir.java}" package="pt.estgp.estgweb.services.courses.xsd"> |
||
909 | <schema dir="src/xsd" includes="planoestudos.xsd"/> |
||
910 | </xjc> |
||
911 | <replace dir="${gen.dir.java}/pt/estgp/estgweb/services/courses/xsd" value=""> |
||
912 | <include name="*.java"/> |
||
913 | <replacefilter token="public Boolean is" value="public Boolean get"/> |
||
914 | </replace> |
||
915 | </target> |
||
1067 | jmachado | 916 | |
917 | <!-- |
||
918 | ========================================================================================== |
||
995 | jmachado | 919 | DEAMONS |
920 | ========================================================================================== |
||
1 | fvelez | 921 | --> |
922 | |||
923 | <!--<target name="run">--> |
||
924 | <!--<java classname="mitra.oaiharvest.harvest.HarvestEngine" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/>--> |
||
925 | <!--<java classname="mitra.oaiharvest.index.IndexEngine" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/>--> |
||
926 | <!--</target>--> |
||
336 | jmachado | 927 | <target name="util.task.createRepositoryXML"> |
928 | <java classname="pt.estgp.estgweb.services.data.CreateDescriptionsXML" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
929 | </target> |
||
359 | jmachado | 930 | <target name="util.task.reset.urlsstats"> |
931 | <java classname="pt.estgp.estgweb.services.urlstat.ResetRelativePathsService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
932 | </target> |
||
438 | jmachado | 933 | <target name="util.task.reset.urlsstats.digests"> |
934 | <java classname="pt.estgp.estgweb.services.urlstat.ResetRelativePathsServiceDigests" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
935 | </target> |
||
1 | fvelez | 936 | |
1362 | jmachado | 937 | <target name="CourseUnitsStatisticsJobService"> |
938 | <java classname="pt.estgp.estgweb.services.courses.CourseUnitsStatisticsJobService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
939 | </target> |
||
336 | jmachado | 940 | |
1235 | jmachado | 941 | |
1553 | jmachado | 942 | <target name="RUNReportQuestionariosGeneratorTest" depends="compile,copyXslFiles"> |
1575 | jmachado | 943 | <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 | 944 | </target> |
1362 | jmachado | 945 | |
1607 | jmachado | 946 | <target name="RUNZipFolderAdHoc"> |
947 | <java fork="true" jvmargs="-Dfile.encoding=UTF-8" classname="pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.utils.ZipFolderForReportDocente" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
948 | </target> |
||
1362 | jmachado | 949 | |
950 | |||
1549 | jmachado | 951 | |
1607 | jmachado | 952 | |
1603 | jmachado | 953 | <target name="print-version"> |
954 | <echo>Java/JVM version: ${ant.java.version}</echo> |
||
955 | <echo>Java/JVM detail version: ${java.version}</echo> |
||
956 | </target> |
||
1549 | jmachado | 957 | |
273 | jmachado | 958 | </project> |