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