svn-gvsig-desktop / trunk / frameworks / _fwAndami / build.xml @ 1518
History | View | Annotate | Download (4.95 KB)
1 |
<project name="MyProject" default="move" basedir="."> |
---|---|
2 |
<!-- set global properties for this build -->
|
3 |
<property name="webapps" location="c:\webservers\jakarta-tomcat-5.0.25\webapps\" /> |
4 |
<property name="webdir" location="web" /> |
5 |
<property name="bin" location="bin" /> |
6 |
<property name="src" location="src" /> |
7 |
<property name="lib" location="lib" /> |
8 |
<property name="extensiones" location="gvSIG/extensiones" /> |
9 |
<property name="keystore" location="keystore" /> |
10 |
<property name="schemas" location="schemas" /> |
11 |
|
12 |
<target name="init"> |
13 |
<!-- Create the time stamp -->
|
14 |
<tstamp /> |
15 |
</target>
|
16 |
|
17 |
<!-- Genera las clases a partir de los esquemas -->
|
18 |
<target name="generate-andami-config-classes"> |
19 |
|
20 |
<delete>
|
21 |
<fileset dir="${src}" includes="com/iver/andami/config/generate/**" /> |
22 |
</delete>
|
23 |
<java classname="org.exolab.castor.builder.SourceGenerator"> |
24 |
<classpath>
|
25 |
<pathelement path="lib/castor-0.9.5.3-xml.jar" /> |
26 |
<pathelement path="lib/xercesImpl.jar" /> |
27 |
</classpath>
|
28 |
<arg value="-i" /> |
29 |
<arg value="${schemas}/andami-config.xsd" /> |
30 |
<arg value="-package" /> |
31 |
<arg value="com.iver.andami.config.generate" /> |
32 |
<arg value="-dest" /> |
33 |
<arg value="${src}" /> |
34 |
</java>
|
35 |
</target>
|
36 |
|
37 |
<!-- Genera las clases a partir de los esquemas -->
|
38 |
<target name="generate-plugin-config"> |
39 |
<delete>
|
40 |
<fileset dir="${src}" includes="com/iver/andami/plugins/config/generate/**" /> |
41 |
</delete>
|
42 |
<java classname="org.exolab.castor.builder.SourceGenerator"> |
43 |
<classpath>
|
44 |
<pathelement path="lib/castor-0.9.5.3-xml.jar" /> |
45 |
<pathelement path="lib/xercesImpl.jar" /> |
46 |
</classpath>
|
47 |
<arg value="-i" /> |
48 |
<arg value="${schemas}/plugin-config.xsd" /> |
49 |
<arg value="-package" /> |
50 |
<arg value="com.iver.andami.plugins.config.generate" /> |
51 |
<arg value="-dest" /> |
52 |
<arg value="${src}" /> |
53 |
</java>
|
54 |
</target>
|
55 |
|
56 |
<!-- Genera las clases a partir de los esquemas -->
|
57 |
<target name="generate-plugin-persistence"> |
58 |
<delete>
|
59 |
<fileset dir="${src}" includes="com/iver/andami/persistence/generate/**" /> |
60 |
</delete>
|
61 |
<java classname="org.exolab.castor.builder.SourceGenerator"> |
62 |
<classpath>
|
63 |
<pathelement path="lib/castor-0.9.5.3-xml.jar" /> |
64 |
<pathelement path="lib/xercesImpl.jar" /> |
65 |
</classpath>
|
66 |
<arg value="-i" /> |
67 |
<arg value="${schemas}/plugin-persistence.xsd" /> |
68 |
<arg value="-package" /> |
69 |
<arg value="com.iver.andami.persistence.generate" /> |
70 |
<arg value="-dest" /> |
71 |
<arg value="${src}" /> |
72 |
</java>
|
73 |
|
74 |
</target>
|
75 |
<!--Genera un war con todo lo necesario para publicar la aplicacion
|
76 |
en un servidor j2ee-->
|
77 |
<target name="war" description="crea el war" depends="crea-web-dir"> |
78 |
<war warfile="gvsig.war" basedir="web" webxml="${webdir}/web.xml"> |
79 |
<excludesfile name="${webdir}/web.xml" /> |
80 |
</war>
|
81 |
</target>
|
82 |
|
83 |
<!--Mueve el war con la informacion de la aplicacion jws al
|
84 |
directorio del tomcat donde va la aplicacion-->
|
85 |
<target name="move" depends="war" description="mueve el war"> |
86 |
<copy todir="${webapps}"> |
87 |
<fileset dir="." includes="gvsig.war" /> |
88 |
</copy>
|
89 |
</target>
|
90 |
|
91 |
<!--Crea un jar con el codigo de andami-->
|
92 |
<target name="crea-jar" description="Crea el jar de la aplicacion"> |
93 |
<copy todir="${bin}/com/iver/andami"> |
94 |
<fileset dir="." includes="text*.properties"/> |
95 |
</copy>
|
96 |
|
97 |
<jar jarfile="andami.jar" basedir="${bin}" /> |
98 |
</target>
|
99 |
|
100 |
<!--Mete en el directorio web todo lo necesario para publicar
|
101 |
la aplicacion-->
|
102 |
<target name="crea-web-dir" depends="sign-jar, extensiones" description="Mete todo lo que va al war en el directorio web"> |
103 |
</target>
|
104 |
|
105 |
<!--Firma todos los jar de la aplicacion-->
|
106 |
<target name="sign-jar" description="Firma todos los jar" depends="move-jars"> |
107 |
<signjar keystore="${keystore}" storepass="aquilina" keypass="aquilina" alias="mdikey" jar="${webdir}/gvSIG.jar" /> |
108 |
<signjar keystore="${keystore}" storepass="aquilina" keypass="aquilina" alias="mdikey" jar="${webdir}/javaws.jar" /> |
109 |
<signjar keystore="${keystore}" storepass="aquilina" keypass="aquilina" alias="mdikey" jar="${webdir}/log4j-1.2.8.jar" /> |
110 |
<signjar keystore="${keystore}" storepass="aquilina" keypass="aquilina" alias="mdikey" jar="${webdir}/castor-0.9.5.3-xml.jar" /> |
111 |
<signjar keystore="${keystore}" storepass="aquilina" keypass="aquilina" alias="mdikey" jar="${webdir}/iver-utiles.jar" /> |
112 |
<signjar keystore="${keystore}" storepass="aquilina" keypass="aquilina" alias="mdikey" jar="${webdir}/xercesImpl.jar" /> |
113 |
</target>
|
114 |
|
115 |
<!--Copia los jar que hay en el subdirectorio lib al directorio web-->
|
116 |
<target name="move-jars" description="Pone todos los jar en el directorio web" depends="crea-jar"> |
117 |
<copy todir="${webdir}"> |
118 |
<fileset dir="lib" includes="**/*" /> |
119 |
</copy>
|
120 |
<!-- <copy todir="${webdir}" file="native libs/windows/winlibs.jar"/> -->
|
121 |
</target>
|
122 |
|
123 |
<!--Comprime las extensiones en un zip y las mete en el directorio web-->
|
124 |
<target name="extensiones" description="Copia el directorio de extensiones"> |
125 |
<zip zipfile="${webdir}/extensiones.zip"> |
126 |
<fileset dir="${extensiones}" includes="**/*" excludes="CVS" excludesfile=".cvsignore" /> |
127 |
</zip>
|
128 |
</target>
|
129 |
</project>
|