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