Rev 1845 | Rev 1969 | 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}"/> |
||
1845 | jmachado | 394 | <war destfile="${dist.dir}/${tomcat.war.file}"> |
1 | fvelez | 395 | <fileset dir="${build.dir.war}"> |
396 | <include name="**/*" /> |
||
397 | </fileset> |
||
1845 | jmachado | 398 | </war> |
1 | fvelez | 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}"/> |
1844 | jmachado | 544 | <replacefilter token="@service.url@" value="${service.url}"/> |
1017 | jmachado | 545 | <!-- DONT USE ANY MORE NOW IS IN CONFIGURATION DAO <replacefilter token="@ws.siges.wsdl@" value="${ws.siges.wsdl}"/>--> |
163 | jmachado | 546 | <replacefilter token="@ws.siges.target.namespace@" value="${ws.siges.target.namespace}"/> |
214 | jmachado | 547 | <replacefilter token="@intranet.setup.folders.file@" value="${build.dir.relative.intranet.setup.folders.file}"/> |
548 | <replacefilter token="@intranet.setup.folders.filename@" value="${intranet.setup.folders.filename}"/> |
||
1235 | jmachado | 549 | |
550 | <replacefilter token="@oracle.siges.url@" value="${oracle.siges.url}"/> |
||
551 | <replacefilter token="@oracle.siges.username@" value="${oracle.siges.username}"/> |
||
552 | <replacefilter token="@oracle.siges.password@" value="${oracle.siges.password}"/> |
||
553 | |||
1312 | jmachado | 554 | <!--System instance type specifications--> |
1327 | jmachado | 555 | |
556 | <replacefilter token="@email.password@" value="${email.password}"/> |
||
1426 | jmachado | 557 | <replacefilter token="@email.user.sufix@" value="${email.user.sufix}"/> |
1459 | jmachado | 558 | |
559 | <replacefilter token="@email.user.count@" value="${email.user.count}"/> |
||
1431 | jmachado | 560 | <replacefilter token="@email.use.round.robin@" value="${email.use.round.robin}"/> |
1459 | jmachado | 561 | |
1431 | jmachado | 562 | <replacefilter token="@email.use.security@" value="${email.use.security}"/> |
1426 | jmachado | 563 | <replacefilter token="@email.user.prefix@" value="${email.user.prefix}"/> |
1431 | jmachado | 564 | <replacefilter token="@email.from@" value="${email.from}"/> |
1432 | jmachado | 565 | <replacefilter token="@email.server@" value="${email.server}"/> |
1327 | jmachado | 566 | <replacefilter token="@test.control.var@" value="${test.control.var}"/> |
1394 | jmachado | 567 | |
568 | <replacefilter token="@mode.pae.enabled@" value="${mode.pae.enabled}"/> |
||
1312 | jmachado | 569 | <replacefilter token="@system.theme@" value="${system.theme}"/> |
570 | <replacefilter token="@authentication.policy.service@" value="${authentication.policy.service}"/> |
||
571 | <replacefilter token="@authentication.policy.username.msg.key@" value="${authentication.policy.username.msg.key}"/> |
||
572 | <replacefilter token="@authentication.policy.password.msg.key@" value="${authentication.policy.password.msg.key}"/> |
||
573 | <replacefilter token="@system.redirections.policy.index.welcome@" value="${system.redirections.policy.index.welcome}"/> |
||
574 | <replacefilter token="@system.redirections.policy.authentication.action@" value="${system.redirections.policy.authentication.action}"/> |
||
1387 | jmachado | 575 | <replacefilter token="@system.redirections.policy.authentication.logout.action@" value="${system.redirections.policy.authentication.logout.action}"/> |
1455 | jmachado | 576 | <replacefilter token="@system.mail.standard.certificated.home.page@" value="${system.mail.standard.certificated.home.page}"/> |
1830 | jmachado | 577 | <replacefilter token="@system.wsjson.service.course.report.quest.result.api@" value="${system.wsjson.service.course.report.quest.result.api}"/> |
578 | <replacefilter token="@system.wsjson.service.course.units.reports.api@" value="${system.wsjson.service.course.units.reports.api}"/> |
||
579 | <replacefilter token="@system.wsjson.service.course.units.dtp.stats.api@" value="${system.wsjson.service.course.units.dtp.stats.api}"/> |
||
1312 | jmachado | 580 | |
1455 | jmachado | 581 | |
1830 | jmachado | 582 | |
1312 | jmachado | 583 | <replacefilter token="@system.intranet.url@" value="${system.intranet.url}"/> |
584 | <replacefilter token="@system.public.url@" value="${system.public.url}"/> |
||
585 | |||
1324 | jmachado | 586 | <replacefilter token="@ionline.user@" value="${ionline.user}"/> |
587 | <replacefilter token="@ionline.pass@" value="${ionline.pass}"/> |
||
1 | fvelez | 588 | </replace> |
1810 | jmachado | 589 | <replace file="${ldap.properties.build}/ldap.properties"> |
590 | <replacefilter token="@ldap.queries.login@" value="${ldap.queries.login}"/> |
||
591 | <replacefilter token="@ldap.queries.password@" value="${ldap.queries.password}"/> |
||
592 | </replace> |
||
1 | fvelez | 593 | <replace file="${build.dir.classes}/${log4j.properties.filename}"> |
594 | <replacefilter token="@log.file@" value="${log.file}"/> |
||
299 | jmachado | 595 | <replacefilter token="@log.level@" value="${log.level}"/> |
1 | fvelez | 596 | </replace> |
352 | jmachado | 597 | <!--<replace file="${build.dir.scripts}/${scripts.setenv.file}"> |
219 | jmachado | 598 | <replacefilter token="@tomcat.home@" value="${tomcat.home}"/> |
352 | jmachado | 599 | </replace>--> |
1 | fvelez | 600 | <replace file="${jdbc.properties.build}/${jdbc.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> |
||
1325 | jmachado | 605 | <replace file="${jdbc.olap.properties.build}/${jdbc.olap.properties.filename}"> |
606 | <replacefilter token="@database.username@" value="${database.username}"/> |
||
607 | <replacefilter token="@database.password@" value="${database.password}"/> |
||
608 | <replacefilter token="@database.connection.url@" value="${database.connection.url}"/> |
||
609 | </replace> |
||
1 | fvelez | 610 | </target> |
611 | <target name="generateHibernateCfgXml" depends="compileToolFiles"> |
||
612 | <!--<delete file="${build.dir.classes}/${hibernate.cfg.xml.filename}"/>--> |
||
613 | <java classname="${mapping.buider.class}" classpath="${build.dir.classes}"> |
||
614 | <arg value="${hibernate.cfg.xml.build}"/> |
||
615 | <arg value="${hibernate.cfg.xml}"/> |
||
616 | <arg value="${package.dir}"/> |
||
1325 | jmachado | 617 | <!--<arg value="Olap"/> O Hibernate.cfg serve para tudo no entanto o schema update e feito |
618 | <arg value="false"/> com o jdbc.olap para que estas tabelas fiquem como MyISAM |
||
619 | --> |
||
1 | fvelez | 620 | </java> |
1325 | jmachado | 621 | <!--<echo message="Starting OLAP"/> |
622 | <java classname="${mapping.buider.class}" classpath="${build.dir.classes}"> |
||
623 | <arg value="${olap.cfg.xml.build}"/> |
||
624 | <arg value="${olap.cfg.xml}"/> |
||
625 | <arg value="${package.dir}"/> |
||
626 | <arg value="Olap"/> |
||
627 | <arg value="true"/> |
||
628 | </java>--> |
||
1 | fvelez | 629 | <antcall target="replaceFiltersConfigurationFiles"/> |
630 | </target> |
||
631 | <target name="dbInit"> |
||
1325 | jmachado | 632 | <!--<delete file="${build.dir.classes}/${olap.cfg.xml.filename}"/>--> |
7 | jmachado | 633 | <!--<delete file="${build.dir.classes}/${hibernate.cfg.xml.filename}"/>--> |
634 | <java classname="pt.estgp.estgweb.examples.DBInit" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
1 | fvelez | 635 | |
7 | jmachado | 636 | <antcall target="replaceFiltersConfigurationFiles"/> |
637 | </target> |
||
1 | fvelez | 638 | |
639 | |||
7 | jmachado | 640 | |
1 | fvelez | 641 | <!-- |
642 | Hibernate Tools Task |
||
643 | --> |
||
7 | jmachado | 644 | <taskdef name="hibernatetool" |
645 | classname="org.hibernate.tool.ant.HibernateToolTask" |
||
646 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/> |
||
1 | fvelez | 647 | <!-- |
648 | ========================================================================================== |
||
649 | GENERATE SQL SCRIPTS |
||
650 | ========================================================================================== |
||
651 | --> |
||
652 | <taskdef name="schemaexport" |
||
653 | classname="org.hibernate.tool.hbm2ddl.SchemaExportTask" |
||
654 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/> |
||
655 | |||
656 | |||
1070 | jmachado | 657 | |
1312 | jmachado | 658 | <!-- |
215 | jmachado | 659 | <target name="generateHibernateSql" depends="build"> |
1 | fvelez | 660 | <schemaexport |
661 | properties="${jdbc.properties.build}/${jdbc.properties.filename}" |
||
662 | quiet="no" |
||
663 | text="no" |
||
664 | drop="no" |
||
665 | delimiter=";" |
||
666 | output="${build.dir.classes}/app-scripts.sql"> |
||
667 | <fileset dir="${hbm.dir}"> |
||
668 | <include name="**/*.hbm.xml"/> |
||
1325 | jmachado | 669 | <exclude name="**/Olap*.hbm.xml"/> |
1 | fvelez | 670 | </fileset> |
671 | </schemaexport> |
||
1325 | jmachado | 672 | <schemaexport |
673 | properties="${jdbc.olap.properties.build}/${jdbc.olap.properties.filename}" |
||
674 | quiet="no" |
||
675 | text="no" |
||
676 | drop="no" |
||
677 | delimiter=";" |
||
678 | output="${build.dir.classes}/app-scripts.sql"> |
||
679 | <fileset dir="${hbm.dir}"> |
||
680 | <include name="**/Olap*.hbm.xml"/> |
||
681 | </fileset> |
||
682 | </schemaexport> |
||
1312 | jmachado | 683 | </target>--> |
1 | fvelez | 684 | |
852 | jmachado | 685 | <target name="generateUpdateHibernateSql" depends="build"> |
1547 | jmachado | 686 | <!--<taskdef name="schemaupdate" |
687 | classname="org.hibernate.tool.hbm2ddl.SchemaUpdateTask" |
||
688 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/>--> |
||
852 | jmachado | 689 | <taskdef name="schemaupdate" |
1547 | jmachado | 690 | classname="jomm.dao.utils.JommSchemaUpdateTask" |
691 | classpathref="pathToToolsLib" classpath="${build.dir.classes}"/> |
||
852 | jmachado | 692 | <schemaupdate |
693 | properties="${jdbc.properties.build}/${jdbc.properties.filename}" |
||
1547 | jmachado | 694 | quiet="false" |
695 | text="false"> |
||
852 | jmachado | 696 | <fileset dir="${hbm.dir}"> |
697 | <include name="**/*.hbm.xml"/> |
||
1386 | jmachado | 698 | <!--<exclude name="**/Olap*.hbm.xml"/>--> |
852 | jmachado | 699 | </fileset> |
700 | </schemaupdate> |
||
1325 | jmachado | 701 | |
1386 | jmachado | 702 | <!-- |
1325 | jmachado | 703 | <schemaupdate |
704 | properties="${jdbc.olap.properties.build}/${jdbc.olap.properties.filename}" |
||
705 | quiet="no" |
||
706 | text="no"> |
||
707 | <fileset dir="${hbm.dir}"> |
||
708 | <include name="**/Olap*.hbm.xml"/> |
||
709 | </fileset> |
||
1386 | jmachado | 710 | </schemaupdate>--> |
852 | jmachado | 711 | </target> |
712 | |||
1814 | jmachado | 713 | <!-- |
714 | Esta tarefa compila todas as classes necessarias para que os enhanced types seja bem gerados |
||
715 | Para que tudo corra bem é necessario que os pacotes pt.estgp.estgweb.utils jomm.utils e pt.estgp.estgweb.domain.gentypes sejam 100% coesos |
||
716 | com zero referências ao exterior. Esta modificação foi feita na versão 1812 |
||
717 | Classes que necessitem de serviços ou outros tipos que ainda não foram compilados |
||
718 | os seus enhanced's devem usar o meta atributo no mapeamento do hibernate |
||
719 | exemplo |
||
720 | <property name="repositoryFileProxy" |
||
721 | type="pt.estgp.estgweb.domain.typegenservices.repositorydocuments.EnhancedRepositoryFileProxy"> |
||
722 | <meta attribute="property-type">pt.estgp.estgweb.domain.typegenservices.repositorydocuments.RepositoryFileProxy</meta> |
||
723 | <column name="repositoryStream" sql-type="VARCHAR(255)"/> |
||
724 | </property> |
||
725 | |||
726 | --> |
||
727 | <target name="compileUtils" depends="initDirs"> |
||
1827 | jmachado | 728 | <javac encoding="UTF-8" source="1.8" target="1.8" destdir="${build.dir.classes}" debug="true" optimize="true" failonerror="true" nowarn="true"> |
729 | <compilerarg line="-Xlint:deprecation" /> |
||
1814 | jmachado | 730 | <src path="${src.dir}/pt/estgp/estgweb/utils"/> |
731 | <src path="${src.dir}/jomm/utils"/> |
||
732 | <classpath refid="pathToToolsLib"/> |
||
733 | </javac> |
||
734 | </target> |
||
735 | |||
736 | <target name="compileEnhancedTypes" depends="compileUtils"> |
||
1827 | jmachado | 737 | <javac encoding="UTF-8" source="1.8" target="1.8" destdir="${build.dir.classes}" debug="true" optimize="true" failonerror="true" nowarn="true"> |
738 | <compilerarg line="-Xlint:deprecation" /> |
||
1814 | jmachado | 739 | <src path="${src.dir}/pt/estgp/estgweb/domain/typesgen"/> |
740 | <classpath refid="pathToToolsLib"/> |
||
741 | </javac> |
||
742 | </target> |
||
743 | |||
744 | |||
745 | <target name="generateHibernateDomainObjects" > |
||
746 | <!--<echo message="SE NAO COMPILOU AS ENHANCED CLASSES COMPILE PRIMEIRO POR FAVOR"></echo> |
||
747 | <sleep milliseconds="5000"> |
||
748 | </sleep>--> |
||
691 | jmachado | 749 | <replace dir="${hbm.dir}" value=""> |
750 | <include name="**/*.hbm.xml"/> |
||
751 | <replacefilter token='<timestamp source="db"' value="<timestamp"/> |
||
752 | </replace> |
||
1 | fvelez | 753 | <hibernatetool> |
754 | <configuration> |
||
755 | <fileset dir="${hbm.dir}"> |
||
756 | <include name="**/*.hbm.xml"/> |
||
757 | </fileset> |
||
758 | </configuration> |
||
759 | <hbm2java |
||
760 | jdk5="true" |
||
761 | ejb3="false" |
||
762 | destdir="${gen.dir.java}"/> |
||
763 | </hibernatetool> |
||
764 | <delete> |
||
765 | <fileset dir="${gen.dir.java}"> |
||
766 | <include name="**/*Impl.java"/> |
||
767 | </fileset> |
||
768 | </delete> |
||
691 | jmachado | 769 | <replace dir="${hbm.dir}" value=""> |
770 | <include name="**/*.hbm.xml"/> |
||
771 | <replacefilter token='<timestamp' value='<timestamp source="db"'/> |
||
772 | </replace> |
||
1 | fvelez | 773 | </target> |
774 | |||
775 | |||
776 | <!-- |
||
777 | ========================================================================================== |
||
778 | GENERATE DAO IMPLEMENTATION |
||
779 | ========================================================================================== |
||
780 | --> |
||
781 | <target name="generateHibernateDaoClasses"> |
||
782 | <hibernatetool destdir="${gen.dir.java}" > |
||
783 | <configuration> |
||
784 | <fileset dir="${hbm.dir}"> |
||
785 | <include name="**/*.hbm.xml"/> |
||
786 | </fileset> |
||
787 | </configuration> |
||
788 | <hbmtemplate |
||
789 | filepattern="{class-name}${dao.file.pattern}.java" |
||
790 | templatepath="${dao.template.dir}" |
||
791 | template="${dao.impl.template}" |
||
792 | destdir="${dao.impl.package.dir}"> |
||
793 | <property key="jdk5" value="true"/> |
||
794 | <property key="ejb3" value="false"/> |
||
795 | <property key="dao" value="${dao.file.pattern}"/> |
||
796 | <property key="daoDomainPackage" value="${domain.package}"/> |
||
797 | <property key="daoInterfacesPackage" value="${dao.interfaces.package}"/> |
||
798 | <property key="daoImplPackage" value="${dao.impl.package}"/> |
||
799 | </hbmtemplate> |
||
800 | </hibernatetool> |
||
801 | <delete> |
||
802 | <fileset dir="${gen.dir.java}"> |
||
803 | <include name="**/*ImplDao.java"/> |
||
804 | </fileset> |
||
805 | </delete> |
||
806 | </target> |
||
807 | |||
1235 | jmachado | 808 | <!-- |
809 | ========================================================================================== |
||
810 | Generate Hibernate UML Diagrams |
||
811 | ========================================================================================== |
||
1 | fvelez | 812 | |
1235 | jmachado | 813 | |
814 | <property name="doc" location="build/ant/diagrams"/> |
||
815 | |||
816 | <property name="dot.exe" location="/usr/local/bin/dot" /> |
||
817 | |||
818 | <taskdef |
||
819 | name="hbm2gif" |
||
820 | classname="com.oy.shared.lm.ant.HBMtoGIFTask" |
||
821 | classpathref="pathToToolsLib" |
||
822 | /> |
||
823 | |||
824 | <target name="generateHibernateUmlDiagram" depends="initDirs"> |
||
825 | <mkdir dir="${doc}"/> |
||
826 | <hbm2gif |
||
827 | caption="XML file for launching Catalina 5.0.25 applications using Apache Ant." |
||
828 | colors="cyan, lightcyan, orange, black, black" |
||
829 | inFile="${hbm.dir}/pt/estgp/estgweb/domain/CourseUnit.hbm.xml" |
||
830 | dotFile="${doc}/CourseUnit.dot" |
||
831 | outFile="${doc}/CourseUnit.gif" |
||
832 | exeFile="${dot.exe}" |
||
833 | /> |
||
834 | </target> |
||
835 | --> |
||
995 | jmachado | 836 | <!-- |
837 | ========================================================================================== |
||
838 | GENERATE WEBSERVICES JAXWS |
||
839 | ========================================================================================== |
||
840 | --> |
||
1 | fvelez | 841 | |
995 | jmachado | 842 | |
843 | <target name="ws.generate-siges-client" depends="initDirs"> |
||
844 | <taskdef name="wsimport2" classname="com.sun.tools.ws.ant.WsImport" |
||
845 | classpathref="pathToToolsLib"> |
||
846 | </taskdef> |
||
847 | <copy file="${ws.client.binding.dir}/${ws.siges.binding.file}" todir="${build.dir.ws}" overwrite="true"/> |
||
848 | <replace file="${build.dir.ws}/${ws.siges.binding.file}" encoding="UTF-8"> |
||
849 | <replacefilter token="@wsdl.client@" value="${ws.siges.wsdl}"/> |
||
850 | <replacefilter token="@target.namespace@" value="${ws.siges.target.namespace}"/> |
||
851 | <replacefilter token="@ws.package@" value="${ws.siges.package}"/> |
||
852 | </replace> |
||
853 | <!--xendorsed="true"--> |
||
854 | <wsimport2 |
||
855 | |||
856 | debug="${ws.debug}" |
||
857 | verbose="${ws.verbose}" |
||
858 | keep="${ws.keep}" |
||
859 | extension="${ws.extension}" |
||
860 | destdir="${gen.dir.java}" |
||
861 | wsdl="${ws.siges.wsdl}"> |
||
862 | <binding dir="${build.dir.ws}" includes="${ws.client.binding.file}"/> |
||
863 | </wsimport2> |
||
864 | <delete> |
||
865 | <fileset dir="${gen.dir.java}"> |
||
866 | <include name="**/*.class"/> |
||
867 | </fileset> |
||
868 | </delete> |
||
869 | </target> |
||
870 | |||
1775 | jmachado | 871 | <!-- |
872 | ========================================================================================== |
||
873 | GENERATE A LIST OF ALL JSP's FILES IN JSON |
||
874 | ========================================================================================== |
||
875 | --> |
||
876 | <target name="generateJsonJspsFile" > |
||
995 | jmachado | 877 | |
1775 | jmachado | 878 | <java classname="${jsp.interfaces.web.json.class}" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
879 | <arg value="${build.dir.classes}"/> |
||
880 | <arg value="${src.web}"/> |
||
881 | <arg value="/user;/admin;/public"/> |
||
882 | </java> |
||
883 | </target> |
||
884 | |||
1791 | jmachado | 885 | <target name="generateJsonSoaServicesFile" > |
1830 | jmachado | 886 | <!-- |
1791 | jmachado | 887 | <java fork="true" classname="${soa.services.json.class}" classpath="${build.dir.classes}" classpathref="pathToToolsLib"> |
888 | <arg value="${build.dir.classes}"/> |
||
889 | <arg value="${basedir}/${src.dir}/"/> |
||
890 | </java> |
||
1830 | jmachado | 891 | --> |
1791 | jmachado | 892 | </target> |
893 | |||
894 | |||
1 | fvelez | 895 | <!-- |
995 | jmachado | 896 | ========================================================================================== |
1496 | jmachado | 897 | DIRECTORIES + STUDIES PLANS XSD JAXB |
1067 | jmachado | 898 | ========================================================================================== |
899 | --> |
||
900 | |||
901 | <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask" classpathref="pathToToolsLib"> |
||
902 | </taskdef> |
||
903 | |||
904 | <target name="directories-gen-jaxb" depends="initDirs"> |
||
905 | <xjc destdir="${gen.dir.java}" package="pt.estgp.estgweb.services.directories.xsd"> |
||
906 | <schema dir="${conf.dir}/directories" includes="directory.xsd"/> |
||
907 | </xjc> |
||
908 | <replace dir="${gen.dir.java}/pt/estgp/estgweb/services/directories/xsd" value=""> |
||
909 | <include name="*.java"/> |
||
910 | <replacefilter token="public Boolean is" value="public Boolean get"/> |
||
911 | </replace> |
||
912 | </target> |
||
913 | |||
914 | |||
1496 | jmachado | 915 | <target name="studies-plan-gen-jaxb" depends="initDirs"> |
916 | <xjc destdir="${gen.dir.java}" package="pt.estgp.estgweb.services.courses.xsd"> |
||
917 | <schema dir="src/xsd" includes="planoestudos.xsd"/> |
||
918 | </xjc> |
||
919 | <replace dir="${gen.dir.java}/pt/estgp/estgweb/services/courses/xsd" value=""> |
||
920 | <include name="*.java"/> |
||
921 | <replacefilter token="public Boolean is" value="public Boolean get"/> |
||
922 | </replace> |
||
923 | </target> |
||
1067 | jmachado | 924 | |
925 | <!-- |
||
926 | ========================================================================================== |
||
995 | jmachado | 927 | DEAMONS |
928 | ========================================================================================== |
||
1 | fvelez | 929 | --> |
930 | |||
931 | <!--<target name="run">--> |
||
932 | <!--<java classname="mitra.oaiharvest.harvest.HarvestEngine" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/>--> |
||
933 | <!--<java classname="mitra.oaiharvest.index.IndexEngine" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/>--> |
||
934 | <!--</target>--> |
||
336 | jmachado | 935 | <target name="util.task.createRepositoryXML"> |
1830 | jmachado | 936 | <java classname="pt.estgp.estgweb.services..CreateDescriptionsXML" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
336 | jmachado | 937 | </target> |
359 | jmachado | 938 | <target name="util.task.reset.urlsstats"> |
939 | <java classname="pt.estgp.estgweb.services.urlstat.ResetRelativePathsService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
940 | </target> |
||
438 | jmachado | 941 | <target name="util.task.reset.urlsstats.digests"> |
942 | <java classname="pt.estgp.estgweb.services.urlstat.ResetRelativePathsServiceDigests" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
943 | </target> |
||
1 | fvelez | 944 | |
1362 | jmachado | 945 | <target name="CourseUnitsStatisticsJobService"> |
946 | <java classname="pt.estgp.estgweb.services.courses.CourseUnitsStatisticsJobService" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
947 | </target> |
||
336 | jmachado | 948 | |
1235 | jmachado | 949 | |
1553 | jmachado | 950 | <target name="RUNReportQuestionariosGeneratorTest" depends="compile,copyXslFiles"> |
1575 | jmachado | 951 | <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 | 952 | </target> |
1362 | jmachado | 953 | |
1607 | jmachado | 954 | <target name="RUNZipFolderAdHoc"> |
955 | <java fork="true" jvmargs="-Dfile.encoding=UTF-8" classname="pt.estgp.estgweb.services.questionarios.pedagogico.reportprocessors.utils.ZipFolderForReportDocente" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/> |
||
956 | </target> |
||
1362 | jmachado | 957 | |
958 | |||
1549 | jmachado | 959 | |
1607 | jmachado | 960 | |
1603 | jmachado | 961 | <target name="print-version"> |
962 | <echo>Java/JVM version: ${ant.java.version}</echo> |
||
963 | <echo>Java/JVM detail version: ${java.version}</echo> |
||
964 | </target> |
||
1549 | jmachado | 965 | |
273 | jmachado | 966 | </project> |