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