root / tags / v1_0_2_Build_901 / frameworks / _fwAndami / build.xml @ 10571
History | View | Annotate | Download (4.95 KB)
1 |
<project name="_fwAndami" default="create-jar" basedir="."> |
---|---|
2 |
<!-- set global properties for this build -->
|
3 |
<property name="src" location="src" /> |
4 |
<property name="build" location="bin" /> |
5 |
<property name="dist" location="dist" /> |
6 |
<property name="lib" location="lib" /> |
7 |
<property name="appDir" location="gvSIG" /> |
8 |
<property name="extensiones" location="${appDir}/extensiones" /> |
9 |
<property name="build-doc" value="build-doc"/> |
10 |
<property name="jarName" value="andami.jar"/> |
11 |
<property name="debug" value="off" /> |
12 |
<import file="compile-classpath.xml"/> |
13 |
<property name="webapps" location="c:\webservers\jakarta-tomcat-5.0.25\webapps\" /> |
14 |
<property name="webdir" location="web" /> |
15 |
<property name="keystore" location="keystore" /> |
16 |
<property name="schemas" location="schemas" /> |
17 |
<property name="JavaSourceVersion" value="1.4"/> |
18 |
<property name="JavaTargetVersion" value="1.4"/> |
19 |
|
20 |
<target name="init"> |
21 |
<!-- Create the time stamp -->
|
22 |
<tstamp /> |
23 |
<echo>
|
24 |
Compiling ${ant.project.name}... |
25 |
</echo>
|
26 |
</target>
|
27 |
|
28 |
<target name="batch-build" |
29 |
description="compile the sources, create the jar file for Andami framework" |
30 |
depends="init,compile,create-jar"> |
31 |
</target>
|
32 |
|
33 |
<target name="compile" description="compile the source" > |
34 |
<!-- Compile the Java code from ${src} to ${build} -->
|
35 |
<mkdir dir="${build}" /> |
36 |
<javac srcdir="${src}" |
37 |
destdir="${build}" |
38 |
source="${JavaSourceVersion}" |
39 |
target="${JavaTargetVersion}" |
40 |
debug="${debug}" |
41 |
debuglevel="${debuglevel}"> |
42 |
<classpath refid="_fwAndami.compile-classpath"/> |
43 |
</javac>
|
44 |
<copy todir="${build}"> |
45 |
<fileset
|
46 |
dir="src" |
47 |
excludes="**/*.java"/> |
48 |
</copy>
|
49 |
</target>
|
50 |
|
51 |
<!--Crea un jar con el codigo de andami-->
|
52 |
<target name="create-jar" description="Crea el jar de la aplicacion"> |
53 |
<copy todir="${build}/com/iver/andami/"> |
54 |
<fileset dir="config" includes="*.properties" /> |
55 |
</copy>
|
56 |
<mkdir dir="${appDir}" /> |
57 |
<jar destfile="${jarName}" basedir="${build}" /> |
58 |
</target>
|
59 |
|
60 |
<target name="clean" description="delete binaries and jar files" > |
61 |
<!-- Delete the ${build} and ${dist} directory trees -->
|
62 |
<delete dir="${build}"/> |
63 |
<delete dir="${dist}"/> |
64 |
<delete file="${jarName}"/> |
65 |
<delete dir="${appDir}"/> |
66 |
</target>
|
67 |
|
68 |
<target name="build-doc" depends="" description="Genera un zip con la documentación"> |
69 |
<javadoc
|
70 |
packagenames="com.iver.andami.*" |
71 |
sourcepath="src" |
72 |
defaultexcludes="yes" |
73 |
destdir="${build-doc}/andami-api" |
74 |
windowtitle="andami API"> |
75 |
</javadoc>
|
76 |
</target>
|
77 |
|
78 |
|
79 |
<!-- Genera las clases a partir de los esquemas -->
|
80 |
<target name="generate-andami-config-classes"> |
81 |
|
82 |
<delete>
|
83 |
<fileset dir="${src}" includes="com/iver/andami/config/generate/**" /> |
84 |
</delete>
|
85 |
<java classname="org.exolab.castor.builder.SourceGenerator"> |
86 |
<classpath>
|
87 |
<pathelement path="lib/castor-0.9.5.3-xml.jar" /> |
88 |
<pathelement path="lib/xerces_2_5_0.jar" /> |
89 |
</classpath>
|
90 |
<arg value="-i" /> |
91 |
<arg value="${schemas}/andami-config.xsd" /> |
92 |
<arg value="-package" /> |
93 |
<arg value="com.iver.andami.config.generate" /> |
94 |
<arg value="-dest" /> |
95 |
<arg value="${src}" /> |
96 |
</java>
|
97 |
</target>
|
98 |
|
99 |
<!-- Genera las clases a partir de los esquemas -->
|
100 |
<target name="generate-plugin-config"> |
101 |
<delete>
|
102 |
<fileset dir="${src}" includes="com/iver/andami/plugins/config/generate/**" /> |
103 |
</delete>
|
104 |
<java classname="org.exolab.castor.builder.SourceGenerator"> |
105 |
<classpath>
|
106 |
<pathelement path="lib/castor-0.9.5.3-xml.jar" /> |
107 |
<pathelement path="lib/xerces_2_5_0.jar" /> |
108 |
</classpath>
|
109 |
<arg value="-i" /> |
110 |
<arg value="${schemas}/plugin-config.xsd" /> |
111 |
<arg value="-package" /> |
112 |
<arg value="com.iver.andami.plugins.config.generate" /> |
113 |
<arg value="-dest" /> |
114 |
<arg value="${src}" /> |
115 |
</java>
|
116 |
</target>
|
117 |
|
118 |
<!-- Genera las clases a partir de los esquemas -->
|
119 |
<target name="generate-plugin-persistence"> |
120 |
<delete>
|
121 |
<fileset dir="${src}" includes="com/iver/andami/persistence/generate/**" /> |
122 |
</delete>
|
123 |
<java classname="org.exolab.castor.builder.SourceGenerator"> |
124 |
<classpath>
|
125 |
<pathelement path="lib/castor-0.9.5.3-xml.jar" /> |
126 |
<pathelement path="lib/xerces_2_5_0.jar" /> |
127 |
</classpath>
|
128 |
<arg value="-i" /> |
129 |
<arg value="${schemas}/plugin-persistence.xsd" /> |
130 |
<arg value="-package" /> |
131 |
<arg value="com.iver.andami.persistence.generate" /> |
132 |
<arg value="-dest" /> |
133 |
<arg value="${src}" /> |
134 |
</java>
|
135 |
|
136 |
</target>
|
137 |
|
138 |
<!--Copia los jar que hay en el subdirectorio lib al directorio web-->
|
139 |
<target name="move-jars" description="Pone todos los jar en el directorio web" depends="create-jar"> |
140 |
<copy todir="${webdir}"> |
141 |
<fileset dir="lib" includes="**/*" /> |
142 |
</copy>
|
143 |
</target>
|
144 |
|
145 |
<!--Comprime las extensiones en un zip y las mete en el directorio web-->
|
146 |
<target name="extensiones" description="Copia el directorio de extensiones"> |
147 |
<zip zipfile="${webdir}/extensiones.zip"> |
148 |
<fileset dir="${extensiones}" includes="**/*" excludes="CVS" excludesfile=".cvsignore" /> |
149 |
</zip>
|
150 |
</target>
|
151 |
|
152 |
</project>
|