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