Rev 1821 | Rev 1830 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
291 | jmachado | 1 | <?xml version="1.0" encoding="UTF-8"?> |
1 | fvelez | 2 | <project name="estgweb" basedir="." default="help"> |
3 | |||
4 | |||
5 | <!-- |
||
6 | ========================================================================================== |
||
7 | ANT TASKS |
||
8 | ========================================================================================== |
||
9 | --> |
||
10 | <target name="help"> |
||
11 | <echo>This is the availible Ant Tasks:</echo> |
||
896 | jmachado | 12 | <echo message="${env.JAVA_HOME}"></echo> |
168 | fvelez | 13 | </target> |
1 | fvelez | 14 | |
15 | |||
16 | <!-- |
||
17 | ========================================================================================== |
||
18 | Path libs definitions and Properties files |
||
19 | ========================================================================================== |
||
20 | --> |
||
21 | |||
22 | |||
104 | jmachado | 23 | <import file="libs.xml"/> |
1381 | jmachado | 24 | <!--<import file="build-web-services.xml"/>--> |
1 | fvelez | 25 | |
26 | <!-- |
||
27 | ========================================================================================== |
||
28 | General Task |
||
29 | ========================================================================================== |
||
30 | --> |
||
31 | <!--caso queiramos apagar os pregen hbm delPreGenAppScripts--> |
||
1312 | jmachado | 32 | <!-- |
33 | Use by hand only |
||
215 | jmachado | 34 | <target name="all" depends="clean,initDirs,createConfigurationFiles,generateHibernateDomainObjects,generateHibernateDaoClasses,build,generateHibernateSql,build.war,dbInit"/> |
291 | jmachado | 35 | <target name="allWebNode" depends="clean,initDirs,createConfigurationFiles,generateHibernateDomainObjects,generateHibernateDaoClasses,build.war"/> |
36 | <target name="dataNode" depends="clean,initDirs,createConfigurationFiles,generateHibernateDomainObjects,generateHibernateDaoClasses,build,generateHibernateSql"/> |
||
1312 | jmachado | 37 | --> |
1 | fvelez | 38 | |
39 | <!-- |
||
40 | ========================================================================================== |
||
41 | CLEAN TASKS |
||
42 | ========================================================================================== |
||
43 | --> |
||
1312 | jmachado | 44 | <!-- |
1 | fvelez | 45 | <target name="clean" description="clean *.class and build dir"> |
46 | <delete dir="${build.dir}"/> |
||
165 | jmachado | 47 | <delete dir="${dist.dir}"/> |
7 | jmachado | 48 | <delete> |
49 | <fileset dir="${gen.dir.java}"> |
||
112 | jmachado | 50 | <exclude name="pt/ipportalegre/**/*.*"/> |
1312 | jmachado | 51 | <exclude name="pt/estgp/estgweb/services/directories/**/*.*"/> |
7 | jmachado | 52 | <include name="**/*.java"/> |
53 | </fileset> |
||
54 | </delete> |
||
163 | jmachado | 55 | <sleep seconds="5"/> |
1 | fvelez | 56 | </target> |
1312 | jmachado | 57 | --> |
1 | fvelez | 58 | |
59 | |||
60 | |||
61 | <!-- |
||
62 | ========================================================================================== |
||
63 | CREATE-DIRS |
||
64 | ========================================================================================== |
||
65 | --> |
||
66 | <target name="initDirs"> |
||
67 | <mkdir dir="${log.dir}"/> |
||
68 | <mkdir dir="${data.dir}"/> |
||
69 | <mkdir dir="${build.dir}"/> |
||
70 | <mkdir dir="${build.dir.classes}"/> |
||
71 | <mkdir dir="${build.dir.war}"/> |
||
99 | jmachado | 72 | <mkdir dir="${build.dir.ws}"/> |
219 | jmachado | 73 | <mkdir dir="${build.dir.scripts}"/> |
1 | fvelez | 74 | <delete dir="${dist.dir}"/> |
75 | <mkdir dir="${dist.dir}"/> |
||
76 | <mkdir dir="${gen.dir.java}"/> |
||
77 | </target> |
||
78 | |||
79 | |||
80 | |||
81 | <!-- |
||
82 | ========================================================================================== |
||
83 | Tomcat Tasks |
||
84 | ========================================================================================== |
||
85 | --> |
||
86 | <taskdef name="tomcat.reload" classname="org.apache.catalina.ant.ReloadTask" classpathref="pathToToolsLib"/> |
||
1382 | jmachado | 87 | <!--<taskdef name="tomcat.remove" classname="org.apache.catalina.ant.RemoveTask" classpathref="pathToToolsLib"/>--> |
1383 | jmachado | 88 | <!--<taskdef name="tomcat.roles" classname="org.apache.catalina.ant.RolesTask" classpathref="pathToToolsLib"/>--> |
1 | fvelez | 89 | <taskdef name="tomcat.start" classname="org.apache.catalina.ant.StartTask" classpathref="pathToToolsLib"/> |
90 | <taskdef name="tomcat.stop" classname="org.apache.catalina.ant.StopTask" classpathref="pathToToolsLib"/> |
||
91 | <taskdef name="tomcat.undeploy" classname="org.apache.catalina.ant.UndeployTask" classpathref="pathToToolsLib"/> |
||
92 | <taskdef name="tomcat.deploy" classname="org.apache.catalina.ant.DeployTask" classpathref="pathToToolsLib"/> |
||
1827 | jmachado | 93 | <!--<taskdef name="tomcat.install" classname="org.apache.catalina.ant.InstallTask" classpathref="pathToToolsLib"/>--> |
1597 | jmachado | 94 | <taskdef name="tomcat.jasper" classname="org.apache.jasper.JspC"> |
95 | <classpath id="jspc.classpath"> |
||
96 | <pathelement location="${env.JAVA_HOME}/lib/tools.jar"/> |
||
97 | <fileset dir="${tomcat.home}/bin"> |
||
98 | <include name="*.jar"/> |
||
99 | </fileset> |
||
1827 | jmachado | 100 | <fileset dir="${tomcat.libs.common.home}"> |
1597 | jmachado | 101 | <include name="*.jar"/> |
102 | </fileset> |
||
1827 | jmachado | 103 | <fileset dir="${tomcat.libs.ant.home}"> |
1597 | jmachado | 104 | <include name="*.jar"/> |
105 | </fileset> |
||
106 | </classpath> |
||
107 | </taskdef> |
||
1 | fvelez | 108 | |
109 | |||
110 | <!-- |
||
111 | TOMCAT Instalation Tasks |
||
112 | --> |
||
1827 | jmachado | 113 | <!--<target name="tomcat.deployContext" depends="build.war"> |
1 | fvelez | 114 | <echo message="${tomcat.manager}"/> |
115 | <tomcat.install url="${tomcat.manager}" path="${tomcat.context.path.install}" |
||
290 | jmachado | 116 | config="file://${basedir}/${dist.dir}/estgweb.xml" |
1 | fvelez | 117 | username="${tomcat.username}" password="${tomcat.password}" /> |
1827 | jmachado | 118 | </target>--> |
1630 | jmachado | 119 | <!-- |
340 | jmachado | 120 | <target name="tomcat.deployContextOnly" depends=""> |
121 | <echo message="${tomcat.manager}"/> |
||
122 | <tomcat.install url="${tomcat.manager}" path="${tomcat.context.path.install}" |
||
123 | config="file://${basedir}/${dist.dir}/estgweb.xml" |
||
124 | username="${tomcat.username}" password="${tomcat.password}" /> |
||
125 | </target> |
||
1 | fvelez | 126 | <target name="tomcat.redeployContext" depends="tomcat.undeploy,build.war" > |
127 | <echo message="${tomcat.manager}"/> |
||
128 | <tomcat.install url="${tomcat.manager}" path="${tomcat.context.path.install}" |
||
287 | jmachado | 129 | config="file:${basedir}/${dist.dir}/estgweb.xml" |
1 | fvelez | 130 | username="${tomcat.username}" password="${tomcat.password}" /> |
1384 | jmachado | 131 | </target>--> |
281 | jmachado | 132 | <target name="tomcat.deploy" depends="war" > |
285 | jmachado | 133 | <echo message="${tomcat.manager} path:${tomcat.context.path.install} warfile:file:${basedir}/${dist.dir}/${tomcat.war.file}"/> |
283 | jmachado | 134 | <tomcat.deploy url="${tomcat.manager}" path="${tomcat.context.path.install}" |
285 | jmachado | 135 | war="file:${basedir}/${dist.dir}/${tomcat.war.file}" |
1 | fvelez | 136 | username="${tomcat.username}" password="${tomcat.password}" /> |
137 | </target> |
||
281 | jmachado | 138 | <target name="tomcat.redeploy" depends="tomcat.undeploy,war"> |
285 | jmachado | 139 | <echo message="${tomcat.manager} path:${tomcat.context.path.install} warfile:file:${basedir}/${dist.dir}/${tomcat.war.file}"/> |
1 | fvelez | 140 | <tomcat.deploy url="${tomcat.manager}" path="${tomcat.context.path.install}" |
285 | jmachado | 141 | war="file:${basedir}/${dist.dir}/${tomcat.war.file}" |
1 | fvelez | 142 | username="${tomcat.username}" password="${tomcat.password}" /> |
143 | </target> |
||
144 | <target name="tomcat.undeploy"> |
||
145 | <echo message="${tomcat.manager}"/> |
||
146 | <tomcat.undeploy url="${tomcat.manager}" path="${tomcat.context.path.install}" |
||
147 | username="${tomcat.username}" password="${tomcat.password}" /> |
||
148 | </target> |
||
149 | <target name="tomcat.reload"> |
||
150 | <echo message="${tomcat.manager}"/> |
||
151 | <tomcat.reload url="${tomcat.manager}" path="${tomcat.context.path.install}" |
||
152 | username="${tomcat.username}" password="${tomcat.password}" /> |
||
153 | </target> |
||
154 | <target name="tomcat.start"> |
||
155 | <echo message="${tomcat.manager}"/> |
||
156 | <tomcat.start url="${tomcat.manager}" path="${tomcat.context.path.install}" |
||
157 | username="${tomcat.username}" password="${tomcat.password}" /> |
||
158 | </target> |
||
159 | <target name="tomcat.stop"> |
||
160 | <echo message="${tomcat.manager}"/> |
||
161 | <tomcat.stop url="${tomcat.manager}" path="${tomcat.context.path.install}" |
||
162 | username="${tomcat.username}" password="${tomcat.password}" /> |
||
163 | </target> |
||
164 | |||
165 | <!-- |
||
166 | ========================================================================================== |
||
167 | BUILD TASKS, Have no effect now, no revengstrategy defined.... |
||
168 | ========================================================================================== |
||
169 | --> |
||
170 | <target name="build" depends="initDirs" description="Compile All and create conf files"> |
||
171 | <antcall target="compile"/> |
||
172 | <antcall target="createConfigurationFiles"/> |
||
1791 | jmachado | 173 | <antcall target="generateJsonJspsFile"/> |
174 | <antcall target="generateJsonSoaServicesFile"/> |
||
1 | fvelez | 175 | </target> |
385 | jmachado | 176 | |
1 | fvelez | 177 | <target name="compile" depends="initDirs" description="Compile All"> |
1827 | 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"> |
||
1827 | 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}"/> |
||
1827 | 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}">--> |
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}"/>--> |
||
480 | <!--</java>--> |
||
481 | <!--<copy overwrite="true" todir="${build.dir.scripts}">--> |
||
482 | <!--<fileset dir="${src.scripts}" includes="*.*"/>--> |
||
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}"/> |
1312 | jmachado | 576 | |
1455 | jmachado | 577 | |
1312 | jmachado | 578 | <replacefilter token="@system.intranet.url@" value="${system.intranet.url}"/> |
579 | <replacefilter token="@system.public.url@" value="${system.public.url}"/> |
||
580 | |||
1324 | jmachado | 581 | <replacefilter token="@ionline.user@" value="${ionline.user}"/> |
582 | <replacefilter token="@ionline.pass@" value="${ionline.pass}"/> |
||
1 | fvelez | 583 | </replace> |
1810 | jmachado | 584 | <replace file="${ldap.properties.build}/ldap.properties"> |
585 | <replacefilter token="@ldap.queries.login@" value="${ldap.queries.login}"/> |
||
586 | <replacefilter token="@ldap.queries.password@" value="${ldap.queries.password}"/> |
||
587 | </replace> |
||
1 | fvelez | 588 | <replace file="${build.dir.classes}/${log4j.properties.filename}"> |
589 | <replacefilter token="@log.file@" value="${log.file}"/> |
||
299 | jmachado | 590 | <replacefilter token="@log.level@" value="${log.level}"/> |
1 | fvelez | 591 | </replace> |
352 | jmachado | 592 | <!--<replace file="${build.dir.scripts}/${scripts.setenv.file}"> |
219 | jmachado | 593 | <replacefilter token="@tomcat.home@" value="${tomcat.home}"/> |
352 | jmachado | 594 | </replace>--> |
1 | fvelez | 595 | <replace file="${jdbc.properties.build}/${jdbc.properties.filename}"> |
596 | <replacefilter token="@database.username@" value="${database.username}"/> |
||
597 | <replacefilter token="@database.password@" value="${database.password}"/> |
||
598 | <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
599 | </replace> |
||
1325 | jmachado | 600 | <replace file="${jdbc.olap.properties.build}/${jdbc.olap.properties.filename}"> |
601 | <replacefilter token="@database.username@" value="${database.username}"/> |
||
602 | <replacefilter token="@database.password@" value="${database.password}"/> |
||
603 | <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
604 | </replace> |
||
1 | fvelez | 605 | </target> |
606 | <target name="generateHibernateCfgXml" depends="compileToolFiles"> |
||
607 | <!--<delete file="${build.dir.classes}/${hibernate.cfg.xml.filename}"/>--> |
||
608 | <java classname="${mapping.buider.class}" classpath="${build.dir.classes}"> |
||
609 | <arg value="${hibernate.cfg.xml.build}"/> |
||
610 | <arg value="${hibernate.cfg.xml}"/> |
||
611 | <arg value="${package.dir}"/> |
||
1325 | jmachado | 612 | <!--<arg value="Olap"/> O Hibernate.cfg serve para tudo no entanto o schema update e feito |
613 | <arg value="false"/> com o jdbc.olap para que estas tabelas fiquem como MyISAM |
||
614 | --> |
||
1 | fvelez | 615 | </java> |
1325 | jmachado | 616 | <!--<echo message="Starting OLAP"/> |
617 | <java classname="${mapping.buider.class}" classpath="${build.dir.classes}"> |
||
618 | <arg value="${olap.cfg.xml.build}"/> |
||
619 | <arg value="${olap.cfg.xml}"/> |
||
620 | <arg value="${package.dir}"/> |
||
621 | <arg value="Olap"/> |
||
622 | <arg value="true"/> |
||
623 | </java>--> |
||
1 | fvelez | 624 | <antcall target="replaceFiltersConfigurationFiles"/> |
625 | </target> |
||
626 | <target name="dbInit"> |
||
1325 | jmachado | 627 | <!--<delete file="${build.dir.classes}/${olap.cfg.xml.filename}"/>--> |
7 | jmachado | 628 | <!--<delete file="${build.dir.classes}/${hibernate.cfg.xml.filename}"/>--> |
629 | <java classname="pt.estgp.estgweb.examples.DBInit" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
1 | fvelez | 630 | |
7 | jmachado | 631 | <antcall target="replaceFiltersConfigurationFiles"/> |
632 | </target> |
||
1 | fvelez | 633 | |
634 | |||
7 | jmachado | 635 | |
1 | fvelez | 636 | <!-- |
637 | Hibernate Tools Task |
||
638 | --> |
||
7 | jmachado | 639 | <taskdef name="hibernatetool" |
640 | classname="org.hibernate.tool.ant.HibernateToolTask" |
||
641 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/> |
||
1 | fvelez | 642 | <!-- |
643 | ========================================================================================== |
||
644 | GENERATE SQL SCRIPTS |
||
645 | ========================================================================================== |
||
646 | --> |
||
647 | <taskdef name="schemaexport" |
||
648 | classname="org.hibernate.tool.hbm2ddl.SchemaExportTask" |
||
649 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/> |
||
650 | |||
651 | |||
1070 | jmachado | 652 | |
1312 | jmachado | 653 | <!-- |
215 | jmachado | 654 | <target name="generateHibernateSql" depends="build"> |
1 | fvelez | 655 | <schemaexport |
656 | properties="${jdbc.properties.build}/${jdbc.properties.filename}" |
||
657 | quiet="no" |
||
658 | text="no" |
||
659 | drop="no" |
||
660 | delimiter=";" |
||
661 | output="${build.dir.classes}/app-scripts.sql"> |
||
662 | <fileset dir="${hbm.dir}"> |
||
663 | <include name="**/*.hbm.xml"/> |
||
1325 | jmachado | 664 | <exclude name="**/Olap*.hbm.xml"/> |
1 | fvelez | 665 | </fileset> |
666 | </schemaexport> |
||
1325 | jmachado | 667 | <schemaexport |
668 | properties="${jdbc.olap.properties.build}/${jdbc.olap.properties.filename}" |
||
669 | quiet="no" |
||
670 | text="no" |
||
671 | drop="no" |
||
672 | delimiter=";" |
||
673 | output="${build.dir.classes}/app-scripts.sql"> |
||
674 | <fileset dir="${hbm.dir}"> |
||
675 | <include name="**/Olap*.hbm.xml"/> |
||
676 | </fileset> |
||
677 | </schemaexport> |
||
1312 | jmachado | 678 | </target>--> |
1 | fvelez | 679 | |
852 | jmachado | 680 | <target name="generateUpdateHibernateSql" depends="build"> |
1547 | jmachado | 681 | <!--<taskdef name="schemaupdate" |
682 | classname="org.hibernate.tool.hbm2ddl.SchemaUpdateTask" |
||
683 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/>--> |
||
852 | jmachado | 684 | <taskdef name="schemaupdate" |
1547 | jmachado | 685 | classname="jomm.dao.utils.JommSchemaUpdateTask" |
686 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/> |
||
852 | jmachado | 687 | <schemaupdate |
688 | properties="${jdbc.properties.build}/${jdbc.properties.filename}" |
||
1547 | jmachado | 689 | quiet="false" |
690 | text="false"> |
||
852 | jmachado | 691 | <fileset dir="${hbm.dir}"> |
692 | <include name="**/*.hbm.xml"/> |
||
1386 | jmachado | 693 | <!--<exclude name="**/Olap*.hbm.xml"/>--> |
852 | jmachado | 694 | </fileset> |
695 | </schemaupdate> |
||
1325 | jmachado | 696 | |
1386 | jmachado | 697 | <!-- |
1325 | jmachado | 698 | <schemaupdate |
699 | properties="${jdbc.olap.properties.build}/${jdbc.olap.properties.filename}" |
||
700 | quiet="no" |
||
701 | text="no"> |
||
702 | <fileset dir="${hbm.dir}"> |
||
703 | <include name="**/Olap*.hbm.xml"/> |
||
704 | </fileset> |
||
1386 | jmachado | 705 | </schemaupdate>--> |
852 | jmachado | 706 | </target> |
707 | |||
1814 | jmachado | 708 | <!-- |
709 | Esta tarefa compila todas as classes necessarias para que os enhanced types seja bem gerados |
||
710 | Para que tudo corra bem é necessario que os pacotes pt.estgp.estgweb.utils jomm.utils e pt.estgp.estgweb.domain.gentypes sejam 100% coesos |
||
711 | com zero referências ao exterior. Esta modificação foi feita na versão 1812 |
||
712 | Classes que necessitem de serviços ou outros tipos que ainda não foram compilados |
||
713 | os seus enhanced's devem usar o meta atributo no mapeamento do hibernate |
||
714 | exemplo |
||
715 | <property name="repositoryFileProxy" |
||
716 | type="pt.estgp.estgweb.domain.typegenservices.repositorydocuments.EnhancedRepositoryFileProxy"> |
||
717 | <meta attribute="property-type">pt.estgp.estgweb.domain.typegenservices.repositorydocuments.RepositoryFileProxy</meta> |
||
718 | <column name="repositoryStream" sql-type="VARCHAR(255)"/> |
||
719 | </property> |
||
720 | |||
721 | --> |
||
722 | <target name="compileUtils" depends="initDirs"> |
||
1827 | jmachado | 723 | <javac encoding="UTF-8" source="1.8" target="1.8" destdir="${build.dir.classes}" debug="true" optimize="true" failonerror="true" nowarn="true"> |
724 | <compilerarg line="-Xlint:deprecation" /> |
||
1814 | jmachado | 725 | <src path="${src.dir}/pt/estgp/estgweb/utils"/> |
726 | <src path="${src.dir}/jomm/utils"/> |
||
727 | <classpath refid="pathToToolsLib"/> |
||
728 | </javac> |
||
729 | </target> |
||
730 | |||
731 | <target name="compileEnhancedTypes" depends="compileUtils"> |
||
1827 | jmachado | 732 | <javac encoding="UTF-8" source="1.8" target="1.8" destdir="${build.dir.classes}" debug="true" optimize="true" failonerror="true" nowarn="true"> |
733 | <compilerarg line="-Xlint:deprecation" /> |
||
1814 | jmachado | 734 | <src path="${src.dir}/pt/estgp/estgweb/domain/typesgen"/> |
735 | <classpath refid="pathToToolsLib"/> |
||
736 | </javac> |
||
737 | </target> |
||
738 | |||
739 | |||
740 | <target name="generateHibernateDomainObjects" > |
||
741 | <!--<echo message="SE NAO COMPILOU AS ENHANCED CLASSES COMPILE PRIMEIRO POR FAVOR"></echo> |
||
742 | <sleep milliseconds="5000"> |
||
743 | </sleep>--> |
||
691 | jmachado | 744 | <replace dir="${hbm.dir}" value=""> |
745 | <include name="**/*.hbm.xml"/> |
||
746 | <replacefilter token='<timestamp source="db"' value="<timestamp"/> |
||
747 | </replace> |
||
1 | fvelez | 748 | <hibernatetool> |
749 | <configuration> |
||
750 | <fileset dir="${hbm.dir}"> |
||
751 | <include name="**/*.hbm.xml"/> |
||
752 | </fileset> |
||
753 | </configuration> |
||
754 | <hbm2java |
||
755 | jdk5="true" |
||
756 | ejb3="false" |
||
757 | destdir="${gen.dir.java}"/> |
||
758 | </hibernatetool> |
||
759 | <delete> |
||
760 | <fileset dir="${gen.dir.java}"> |
||
761 | <include name="**/*Impl.java"/> |
||
762 | </fileset> |
||
763 | </delete> |
||
691 | jmachado | 764 | <replace dir="${hbm.dir}" value=""> |
765 | <include name="**/*.hbm.xml"/> |
||
766 | <replacefilter token='<timestamp' value='<timestamp source="db"'/> |
||
767 | </replace> |
||
1 | fvelez | 768 | </target> |
769 | |||
770 | |||
771 | <!-- |
||
772 | ========================================================================================== |
||
773 | GENERATE DAO IMPLEMENTATION |
||
774 | ========================================================================================== |
||
775 | --> |
||
776 | <target name="generateHibernateDaoClasses"> |
||
777 | <hibernatetool destdir="${gen.dir.java}" > |
||
778 | <configuration> |
||
779 | <fileset dir="${hbm.dir}"> |
||
780 | <include name="**/*.hbm.xml"/> |
||
781 | </fileset> |
||
782 | </configuration> |
||
783 | <hbmtemplate |
||
784 | filepattern="{class-name}${dao.file.pattern}.java" |
||
785 | templatepath="${dao.template.dir}" |
||
786 | template="${dao.impl.template}" |
||
787 | destdir="${dao.impl.package.dir}"> |
||
788 | <property key="jdk5" value="true"/> |
||
789 | <property key="ejb3" value="false"/> |
||
790 | <property key="dao" value="${dao.file.pattern}"/> |
||
791 | <property key="daoDomainPackage" value="${domain.package}"/> |
||
792 | <property key="daoInterfacesPackage" value="${dao.interfaces.package}"/> |
||
793 | <property key="daoImplPackage" value="${dao.impl.package}"/> |
||
794 | </hbmtemplate> |
||
795 | </hibernatetool> |
||
796 | <delete> |
||
797 | <fileset dir="${gen.dir.java}"> |
||
798 | <include name="**/*ImplDao.java"/> |
||
799 | </fileset> |
||
800 | </delete> |
||
801 | </target> |
||
802 | |||
1235 | jmachado | 803 | <!-- |
804 | ========================================================================================== |
||
805 | Generate Hibernate UML Diagrams |
||
806 | ========================================================================================== |
||
1 | fvelez | 807 | |
1235 | jmachado | 808 | |
809 | <property name="doc" location="build/ant/diagrams"/> |
||
810 | |||
811 | <property name="dot.exe" location="/usr/local/bin/dot" /> |
||
812 | |||
813 | <taskdef |
||
814 | name="hbm2gif" |
||
815 | classname="com.oy.shared.lm.ant.HBMtoGIFTask" |
||
816 | classpathref="pathToToolsLib" |
||
817 | /> |
||
818 | |||
819 | <target name="generateHibernateUmlDiagram" depends="initDirs"> |
||
820 | <mkdir dir="${doc}"/> |
||
821 | <hbm2gif |
||
822 | caption="XML file for launching Catalina 5.0.25 applications using Apache Ant." |
||
823 | colors="cyan, lightcyan, orange, black, black" |
||
824 | inFile="${hbm.dir}/pt/estgp/estgweb/domain/CourseUnit.hbm.xml" |
||
825 | dotFile="${doc}/CourseUnit.dot" |
||
826 | outFile="${doc}/CourseUnit.gif" |
||
827 | exeFile="${dot.exe}" |
||
828 | /> |
||
829 | </target> |
||
830 | --> |
||
995 | jmachado | 831 | <!-- |
832 | ========================================================================================== |
||
833 | GENERATE WEBSERVICES JAXWS |
||
834 | ========================================================================================== |
||
835 | --> |
||
1 | fvelez | 836 | |
995 | jmachado | 837 | |
838 | <target name="ws.generate-siges-client" depends="initDirs"> |
||
839 | <taskdef name="wsimport2" classname="com.sun.tools.ws.ant.WsImport" |
||
840 | classpathref="pathToToolsLib"> |
||
841 | </taskdef> |
||
842 | <copy file="${ws.client.binding.dir}/${ws.siges.binding.file}" todir="${build.dir.ws}" overwrite="true"/> |
||
843 | <replace file="${build.dir.ws}/${ws.siges.binding.file}" encoding="UTF-8"> |
||
844 | <replacefilter token="@wsdl.client@" value="${ws.siges.wsdl}"/> |
||
845 | <replacefilter token="@target.namespace@" value="${ws.siges.target.namespace}"/> |
||
846 | <replacefilter token="@ws.package@" value="${ws.siges.package}"/> |
||
847 | </replace> |
||
848 | <!--xendorsed="true"--> |
||
849 | <wsimport2 |
||
850 | |||
851 | debug="${ws.debug}" |
||
852 | verbose="${ws.verbose}" |
||
853 | keep="${ws.keep}" |
||
854 | extension="${ws.extension}" |
||
855 | destdir="${gen.dir.java}" |
||
856 | wsdl="${ws.siges.wsdl}"> |
||
857 | <binding dir="${build.dir.ws}" includes="${ws.client.binding.file}"/> |
||
858 | </wsimport2> |
||
859 | <delete> |
||
860 | <fileset dir="${gen.dir.java}"> |
||
861 | <include name="**/*.class"/> |
||
862 | </fileset> |
||
863 | </delete> |
||
864 | </target> |
||
865 | |||
1775 | jmachado | 866 | <!-- |
867 | ========================================================================================== |
||
868 | GENERATE A LIST OF ALL JSP's FILES IN JSON |
||
869 | ========================================================================================== |
||
870 | --> |
||
871 | <target name="generateJsonJspsFile" > |
||
995 | jmachado | 872 | |
1775 | jmachado | 873 | <java classname="${jsp.interfaces.web.json.class}" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
874 | <arg value="${build.dir.classes}"/> |
||
875 | <arg value="${src.web}"/> |
||
876 | <arg value="/user;/admin;/public"/> |
||
877 | </java> |
||
878 | </target> |
||
879 | |||
1791 | jmachado | 880 | <target name="generateJsonSoaServicesFile" > |
1775 | jmachado | 881 | |
1791 | jmachado | 882 | <java fork="true" classname="${soa.services.json.class}" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
883 | <arg value="${build.dir.classes}"/> |
||
884 | <arg value="${basedir}/${src.dir}/"/> |
||
885 | </java> |
||
886 | </target> |
||
887 | |||
888 | |||
1 | fvelez | 889 | <!-- |
995 | jmachado | 890 | ========================================================================================== |
1496 | jmachado | 891 | DIRECTORIES + STUDIES PLANS XSD JAXB |
1067 | jmachado | 892 | ========================================================================================== |
893 | --> |
||
894 | |||
895 | <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask" classpathref="pathToToolsLib"> |
||
896 | </taskdef> |
||
897 | |||
898 | <target name="directories-gen-jaxb" depends="initDirs"> |
||
899 | <xjc destdir="${gen.dir.java}" package="pt.estgp.estgweb.services.directories.xsd"> |
||
900 | <schema dir="${conf.dir}/directories" includes="directory.xsd"/> |
||
901 | </xjc> |
||
902 | <replace dir="${gen.dir.java}/pt/estgp/estgweb/services/directories/xsd" value=""> |
||
903 | <include name="*.java"/> |
||
904 | <replacefilter token="public Boolean is" value="public Boolean get"/> |
||
905 | </replace> |
||
906 | </target> |
||
907 | |||
908 | |||
1496 | jmachado | 909 | <target name="studies-plan-gen-jaxb" depends="initDirs"> |
910 | <xjc destdir="${gen.dir.java}" package="pt.estgp.estgweb.services.courses.xsd"> |
||
911 | <schema dir="src/xsd" includes="planoestudos.xsd"/> |
||
912 | </xjc> |
||
913 | <replace dir="${gen.dir.java}/pt/estgp/estgweb/services/courses/xsd" value=""> |
||
914 | <include name="*.java"/> |
||
915 | <replacefilter token="public Boolean is" value="public Boolean get"/> |
||
916 | </replace> |
||
917 | </target> |
||
1067 | jmachado | 918 | |
919 | <!-- |
||
920 | ========================================================================================== |
||
995 | jmachado | 921 | DEAMONS |
922 | ========================================================================================== |
||
1 | fvelez | 923 | --> |
924 | |||
925 | <!--<target name="run">--> |
||
926 | <!--<java classname="mitra.oaiharvest.harvest.HarvestEngine" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/>--> |
||
927 | <!--<java classname="mitra.oaiharvest.index.IndexEngine" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/>--> |
||
928 | <!--</target>--> |
||
336 | jmachado | 929 | <target name="util.task.createRepositoryXML"> |
930 | <java classname="pt.estgp.estgweb.services.data.CreateDescriptionsXML" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
931 | </target> |
||
359 | jmachado | 932 | <target name="util.task.reset.urlsstats"> |
933 | <java classname="pt.estgp.estgweb.services.urlstat.ResetRelativePathsService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
934 | </target> |
||
438 | jmachado | 935 | <target name="util.task.reset.urlsstats.digests"> |
936 | <java classname="pt.estgp.estgweb.services.urlstat.ResetRelativePathsServiceDigests" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
937 | </target> |
||
1 | fvelez | 938 | |
1362 | jmachado | 939 | <target name="CourseUnitsStatisticsJobService"> |
940 | <java classname="pt.estgp.estgweb.services.courses.CourseUnitsStatisticsJobService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
941 | </target> |
||
336 | jmachado | 942 | |
1235 | jmachado | 943 | |
1553 | jmachado | 944 | <target name="RUNReportQuestionariosGeneratorTest" depends="compile,copyXslFiles"> |
1575 | jmachado | 945 | <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 | 946 | </target> |
1362 | jmachado | 947 | |
1607 | jmachado | 948 | <target name="RUNZipFolderAdHoc"> |
949 | <java fork="true" jvmargs="-Dfile.encoding=UTF-8" classname="pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.utils.ZipFolderForReportDocente" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
950 | </target> |
||
1362 | jmachado | 951 | |
952 | |||
1549 | jmachado | 953 | |
1607 | jmachado | 954 | |
1603 | jmachado | 955 | <target name="print-version"> |
956 | <echo>Java/JVM version: ${ant.java.version}</echo> |
||
957 | <echo>Java/JVM detail version: ${java.version}</echo> |
||
958 | </target> |
||
1549 | jmachado | 959 | |
273 | jmachado | 960 | </project> |