Statistics
| Branch: | Tag: | Revision:

root / build.xml @ ff397940

History | View | Annotate | Download (19.5 kB)

1 14ad7326 pastith
<?xml version="1.0" encoding="utf-8" ?>
2 14ad7326 pastith
<project name="gss" default="deploy" basedir=".">
3 14ad7326 pastith
        <description>The GSS project build file</description>
4 14ad7326 pastith
5 14ad7326 pastith
        <property file="build.properties"/>
6 936339af Panagiotis Astithas
    <property name="deps.dir" value="dependencies"/>
7 936339af Panagiotis Astithas
8 936339af Panagiotis Astithas
        <!-- User-editable settings. These are the only settings in this file that
9 936339af Panagiotis Astithas
        a user may consider changing. Note that these can also be configured
10 936339af Panagiotis Astithas
        through        command line parameters (e.g. "ant -Dgwt.workers=2") or a
11 936339af Panagiotis Astithas
        build.properties file. -->
12 936339af Panagiotis Astithas
    <property name="gwt.workers" value="1" />
13 936339af Panagiotis Astithas
    <property name="jboss.home" value="${deps.dir}/jboss-5.1.0.GA" />
14 936339af Panagiotis Astithas
    <property name="jboss.args" value="" />
15 936339af Panagiotis Astithas
16 936339af Panagiotis Astithas
        <!-- Library and runtime dependencies -->
17 936339af Panagiotis Astithas
    <property name="jboss.version" value="5.1.0" />
18 936339af Panagiotis Astithas
    <property name="jboss.filename" value="jboss-5.1.0.GA-jdk6.zip"/>
19 936339af Panagiotis Astithas
        <property name="jboss.download.url" value="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/jboss-5.1.0.GA-jdk6.zip/download"/>
20 936339af Panagiotis Astithas
    <property name="gwt.path" value="${deps.dir}/gwt-2.0.4"/>
21 936339af Panagiotis Astithas
    <property name="gwt.filename" value="gwt-2.0.4.zip"/>
22 936339af Panagiotis Astithas
        <property name="gwt.download.url" value="http://google-web-toolkit.googlecode.com/files/gwt-2.0.4.zip"/>
23 936339af Panagiotis Astithas
    <property name="hornetq.path" value="${deps.dir}/hornetq-2.0.0.GA" />
24 936339af Panagiotis Astithas
    <property name="hornetq.filename" value="hornetq-2.0.0.GA.zip/"/>
25 936339af Panagiotis Astithas
    <property name="hornetq.download.url" value="http://sourceforge.net/projects/hornetq/files/2.0.0.GA/hornetq-2.0.0.GA.zip/download"/>
26 936339af Panagiotis Astithas
    <property name="junit.path" value="${deps.dir}/junit3.8.1" />
27 936339af Panagiotis Astithas
    <property name="junit.filename" value="junit3.8.1.zip"/>
28 936339af Panagiotis Astithas
    <property name="junit.download.url" value="http://sourceforge.net/projects/junit/files/junit/3.8.1/junit3.8.1.zip/download"/>
29 8acfa6b5 Panagiotis Astithas
    <property name="gwt-dnd.filename" value="gwt-dnd-3.0.1.jar"/>
30 8acfa6b5 Panagiotis Astithas
    <property name="gwt-dnd.download.url" value="http://gwt-dnd.googlecode.com/files/gwt-dnd-3.0.1.jar"/>
31 8acfa6b5 Panagiotis Astithas
    <property name="gwt-gears.path" value="${deps.dir}/gwt-gears-1.3.0" />
32 8acfa6b5 Panagiotis Astithas
    <property name="gwt-gears.filename" value="gwt-gears-1.3.0.zip"/>
33 8acfa6b5 Panagiotis Astithas
    <property name="gwt-gears.download.url" value="http://gwt-google-apis.googlecode.com/files/gwt-gears-1.3.0.zip"/>
34 8acfa6b5 Panagiotis Astithas
    <property name="gwt-visualization.path" value="${deps.dir}/gwt-visualization-1.1.0" />
35 8acfa6b5 Panagiotis Astithas
    <property name="gwt-visualization.filename" value="gwt-visualization-1.1.0.zip"/>
36 8acfa6b5 Panagiotis Astithas
    <property name="gwt-visualization.download.url" value="http://gwt-google-apis.googlecode.com/files/gwt-visualization-1.1.0.zip"/>
37 8acfa6b5 Panagiotis Astithas
    <property name="gwt-incubator.filename" value="gwt-incubator-20100204-r1747.jar"/>
38 8acfa6b5 Panagiotis Astithas
    <property name="gwt-incubator.download.url" value="http://google-web-toolkit-incubator.googlecode.com/files/gwt-incubator-20100204-r1747.jar"/>
39 936339af Panagiotis Astithas
40 936339af Panagiotis Astithas
        <!-- Source and runtime layout configuration -->
41 14ad7326 pastith
        <property name="jboss_run_configuration" value="default" />
42 936339af Panagiotis Astithas
    <property name="root.context" value="gss" />
43 936339af Panagiotis Astithas
    <property name="gwt.module" value="gr.ebs.gss.GSS" />
44 936339af Panagiotis Astithas
    <property name="gwt.module.class" value="GSS" />
45 936339af Panagiotis Astithas
    <property name="gwt.admin.module" value="gr.ebs.gss.admin.TwoAdmin" />
46 936339af Panagiotis Astithas
    <property name="gwt.admin.module.class" value="TwoAdmin" />
47 14ad7326 pastith
        <property name="src.dir" value="${basedir}/src"/>
48 936339af Panagiotis Astithas
    <property name="jboss-spec.dir" value="${basedir}/jboss" />
49 936339af Panagiotis Astithas
    <property name="jboss-spec.conf.dir" value="${jboss-spec.dir}/conf" />
50 936339af Panagiotis Astithas
    <property name="jboss-spec.bin.dir" value="${jboss-spec.dir}/bin" />
51 936339af Panagiotis Astithas
    <property name="jboss-spec.deploy.dir" value="${jboss-spec.dir}/deploy" />
52 936339af Panagiotis Astithas
    <property name="jboss-spec.lib.dir" value="${jboss-spec.dir}/lib" />
53 14ad7326 pastith
        <property name="jboss.project" value="${basedir}/jboss-config/${jboss.version}" />
54 14ad7326 pastith
        <property name="jboss.bin.dir" value="${jboss.home}/bin" />
55 14ad7326 pastith
        <property name="jboss.conf.dir" value="${jboss.home}/server/${jboss_run_configuration}/conf" />
56 14ad7326 pastith
        <property name="jboss.deploy.dir" value="${jboss.home}/server/${jboss_run_configuration}/deploy" />
57 14ad7326 pastith
        <property name="jboss.run_conf.lib.dir" value="${jboss.home}/server/${jboss_run_configuration}/lib" />
58 14ad7326 pastith
        <property name="jboss.lib.dir" value="${jboss.home}/lib" />
59 14ad7326 pastith
        <property name="jboss.common.lib.dir" value="${jboss.home}/common/lib" />
60 14ad7326 pastith
61 14ad7326 pastith
        <!-- MBeans -->
62 14ad7326 pastith
        <property name="mbeans.dir" value="${basedir}/mbeans"/>
63 14ad7326 pastith
        <property name="mbeans.meta-inf.dir" value="${mbeans.dir}/META-INF"/>
64 14ad7326 pastith
65 14ad7326 pastith
        <!-- JUnit dirs -->
66 14ad7326 pastith
        <property name="test.dir" value="${basedir}/test" />
67 14ad7326 pastith
        <property name="test.src.dir" value="${test.dir}/src"/>
68 14ad7326 pastith
69 14ad7326 pastith
        <!-- Build dirs -->
70 14ad7326 pastith
        <property name="build.dir" value="${basedir}/bin" />
71 14ad7326 pastith
        <property name="build.classes.dir" value="${build.dir}/classes" />
72 14ad7326 pastith
        <property name="test.build.dir" value="${build.dir}" />
73 14ad7326 pastith
        <property name="test.build.classes.dir" value="${test.build.dir}/" />
74 14ad7326 pastith
        <property name="gwt.www.dir" value="${basedir}/www" />
75 023f6f1e Panagiotis Astithas
        <property name="gwt.www.admin.dir" value="${basedir}/wwwadmin" />
76 14ad7326 pastith
        <property name="dist.war" value="${ant.project.name}.war"/>
77 023f6f1e Panagiotis Astithas
        <property name="dist.admin.war" value="${ant.project.name}-admin.war"/>
78 14ad7326 pastith
        <property name="webdav.war" value="webdav.war"/>
79 14ad7326 pastith
        <property name="dist.ear" value="${ant.project.name}.ear"/>
80 14ad7326 pastith
        <property name="war.dir" value="${basedir}/war" />
81 14ad7326 pastith
        <property name="war.web-inf.dir" value="${war.dir}/WEB-INF"/>
82 14ad7326 pastith
        <property name="war.lib.dir" value="${war.web-inf.dir}/lib"/>
83 023f6f1e Panagiotis Astithas
        <property name="war.admin.dir" value="${basedir}/waradmin" />
84 023f6f1e Panagiotis Astithas
        <property name="war.admin.web-inf.dir" value="${war.dir}/WEB-INF"/>
85 023f6f1e Panagiotis Astithas
        <property name="war.admin.lib.dir" value="${war.web-inf.dir}/lib"/>
86 14ad7326 pastith
        <property name="webdav.war.dir" value="${basedir}/webdav" />
87 14ad7326 pastith
        <property name="webdav.war.web-inf.dir" value="${webdav.war.dir}/WEB-INF"/>
88 14ad7326 pastith
        <property name="webdav.war.lib.dir" value="${webdav.war.web-inf.dir}/lib"/>
89 14ad7326 pastith
        <property name="ear.dir" value="${basedir}/ear" />
90 14ad7326 pastith
        <property name="ear.lib.dir" value="${ear.dir}/lib" />
91 14ad7326 pastith
        <property name="mbeans.dist.file" value="${ant.project.name}-mbeans.sar"/>
92 14ad7326 pastith
93 14ad7326 pastith
        <!-- set classpath -->
94 14ad7326 pastith
        <path id="project.class.path">
95 14ad7326 pastith
                <pathelement path="${java.class.path}/" />
96 14ad7326 pastith
                <pathelement path="${gwt.path}/gwt-user.jar" />
97 14ad7326 pastith
                <pathelement location="${jboss.common.lib.dir}/commons-logging.jar"/>
98 14ad7326 pastith
                <pathelement location="${jboss.common.lib.dir}/ejb3-persistence.jar"/>
99 09f9744e Giannis Koutsoubos
                <pathelement location="${jboss.common.lib.dir}/jboss-ejb3-ext-api.jar"/>
100 14ad7326 pastith
                <pathelement location="${jboss.common.lib.dir}/jboss-javaee.jar"/>
101 14ad7326 pastith
                <pathelement location="${jboss.common.lib.dir}/jbosssx.jar"/>
102 afd3a0ef Giannis Koutsoubos
                <pathelement location="${jboss.common.lib.dir}/hibernate-core.jar"/>
103 1b2719e1 Panagiotis Astithas
        <pathelement location="${jboss.common.lib.dir}/hibernate-annotations.jar"/>
104 14ad7326 pastith
                <pathelement location="${jboss.lib.dir}/jboss-j2se.jar"/>
105 14ad7326 pastith
                <pathelement location="${jboss.lib.dir}/jboss-kernel.jar"/>
106 14ad7326 pastith
                <pathelement location="${jboss.lib.dir}/jboss-system-jmx.jar"/>
107 14ad7326 pastith
                <pathelement location="${jboss.lib.dir}/jboss-system.jar"/>
108 14ad7326 pastith
                <pathelement location="${jboss.lib.dir}/jbosssx.jar"/>
109 ada62454 Panagiotis Astithas
                <pathelement location="${ear.lib.dir}/commons-codec-1.4.jar"/>
110 e08fd2f3 pastith
                <pathelement location="${ear.lib.dir}/commons-configuration-1.6.jar"/>
111 14ad7326 pastith
                <pathelement location="${war.lib.dir}/commons-fileupload-1.2.jar"/>
112 1b2719e1 Panagiotis Astithas
        <pathelement location="${ear.lib.dir}/commons-httpclient-3.1.jar"/>
113 14ad7326 pastith
                <pathelement location="${ear.lib.dir}/commons-lang.jar"/>
114 8c999b8c Natasa Kapravelou
                <pathelement location="${ear.lib.dir}/ldap.jar"/>
115 14ad7326 pastith
                <pathelement location="${junit.path}/junit.jar"/>
116 8acfa6b5 Panagiotis Astithas
                <pathelement location="${deps.dir}/${gwt-dnd.filename}"/>
117 8acfa6b5 Panagiotis Astithas
                <pathelement location="${gwt-gears.path}/gwt-gears.jar"/>
118 8acfa6b5 Panagiotis Astithas
                <pathelement location="${deps.dir}/${gwt-incubator.filename}"/>
119 8acfa6b5 Panagiotis Astithas
                <pathelement location="${gwt-visualization.path}/gwt-visualization.jar"/>
120 14ad7326 pastith
        </path>
121 14ad7326 pastith
122 936339af Panagiotis Astithas
        <target name="check-jboss">
123 936339af Panagiotis Astithas
                <available file="${jboss.home}" type="dir" property="jboss.home.present"/>
124 936339af Panagiotis Astithas
        </target>
125 936339af Panagiotis Astithas
126 936339af Panagiotis Astithas
    <target name="fetch-dependencies" description="Fetch the dpendencies" unless="jboss.home.present" depends="check-jboss">
127 936339af Panagiotis Astithas
            <mkdir dir="${deps.dir}"/>
128 936339af Panagiotis Astithas
        <get src="${gwt.download.url}" dest="${deps.dir}/${gwt.filename}" usetimestamp="true"/>
129 8acfa6b5 Panagiotis Astithas
        <get src="${gwt-dnd.download.url}" dest="${deps.dir}/${gwt-dnd.filename}" usetimestamp="true"/>
130 8acfa6b5 Panagiotis Astithas
        <get src="${gwt-gears.download.url}" dest="${deps.dir}/${gwt-gears.filename}" usetimestamp="true"/>
131 8acfa6b5 Panagiotis Astithas
        <get src="${gwt-visualization.download.url}" dest="${deps.dir}/${gwt-visualization.filename}" usetimestamp="true"/>
132 8acfa6b5 Panagiotis Astithas
        <get src="${gwt-incubator.download.url}" dest="${deps.dir}/${gwt-incubator.filename}" usetimestamp="true"/>
133 936339af Panagiotis Astithas
        <get src="${hornetq.download.url}" dest="${deps.dir}/${hornetq.filename}" usetimestamp="true"/>
134 936339af Panagiotis Astithas
        <get src="${junit.download.url}" dest="${deps.dir}/${junit.filename}" usetimestamp="true"/>
135 936339af Panagiotis Astithas
        <get src="${jboss.download.url}" dest="${deps.dir}/${jboss.filename}" usetimestamp="true"/>
136 936339af Panagiotis Astithas
            <unzip src="${deps.dir}/${gwt.filename}" dest="${deps.dir}"/>
137 8acfa6b5 Panagiotis Astithas
        <unzip src="${deps.dir}/${gwt-gears.filename}" dest="${deps.dir}"/>
138 8acfa6b5 Panagiotis Astithas
        <unzip src="${deps.dir}/${gwt-visualization.filename}" dest="${deps.dir}"/>
139 936339af Panagiotis Astithas
        <unzip src="${deps.dir}/${hornetq.filename}" dest="${deps.dir}"/>
140 936339af Panagiotis Astithas
        <unzip src="${deps.dir}/${junit.filename}" dest="${deps.dir}"/>
141 936339af Panagiotis Astithas
        <unzip src="${deps.dir}/${jboss.filename}" dest="${jboss.home}/.."/>
142 936339af Panagiotis Astithas
    </target>
143 936339af Panagiotis Astithas
144 936339af Panagiotis Astithas
        <target name="install" depends="fetch-dependencies" description="Installs the configuration files of the application server">
145 139f2dd5 Panagiotis Astithas
                <!-- Install HornetQ configuration -->
146 139f2dd5 Panagiotis Astithas
                <copy todir="${jboss.run_conf.lib.dir}">
147 139f2dd5 Panagiotis Astithas
                        <fileset dir="${hornetq.path}/lib">
148 139f2dd5 Panagiotis Astithas
                                <include name="hornetq-*.jar"/>
149 139f2dd5 Panagiotis Astithas
                                <include name="netty*.jar"/>
150 139f2dd5 Panagiotis Astithas
                        </fileset>
151 139f2dd5 Panagiotis Astithas
                </copy>
152 139f2dd5 Panagiotis Astithas
                <property name="hornetq.sar.dir" value="${jboss.deploy.dir}/hornetq.sar"/>
153 139f2dd5 Panagiotis Astithas
                <mkdir dir="${hornetq.sar.dir}"/>
154 139f2dd5 Panagiotis Astithas
                <copy todir="${hornetq.sar.dir}">
155 139f2dd5 Panagiotis Astithas
                        <fileset dir="${hornetq.path}/config/jboss-as/non-clustered" includes="*" excludes="**/jboss-as-4/**"/>
156 139f2dd5 Panagiotis Astithas
                </copy>
157 139f2dd5 Panagiotis Astithas
                <unzip src="${hornetq.path}/lib/hornetq-ra.rar" dest="${jboss.deploy.dir}/hornetq-ra.rar"/>
158 139f2dd5 Panagiotis Astithas
                <delete dir="${jboss.deploy.dir}/messaging" failonerror="false"/>
159 139f2dd5 Panagiotis Astithas
                <mkdir dir="${jboss.bin.dir}/META-INF/lib/linux2/x86"/>
160 139f2dd5 Panagiotis Astithas
                <mkdir dir="${jboss.bin.dir}/META-INF/lib/linux2/x64"/>
161 139f2dd5 Panagiotis Astithas
                <copy todir="${jboss.bin.dir}/META-INF/lib/linux2/x86" file="${hornetq.path}/bin/libHornetQAIO32.so"/>
162 139f2dd5 Panagiotis Astithas
                <copy todir="${jboss.bin.dir}/META-INF/lib/linux2/x64" file="${hornetq.path}/bin/libHornetQAIO64.so"/>
163 139f2dd5 Panagiotis Astithas
                <!-- Install gss configuration -->
164 14ad7326 pastith
                <copy todir="${jboss.bin.dir}" overwrite="true" failonerror="false">
165 14ad7326 pastith
                        <fileset dir="${jboss.project}/bin"/>
166 14ad7326 pastith
                </copy>
167 14ad7326 pastith
                <copy todir="${jboss.bin.dir}" overwrite="true" failonerror="false">
168 14ad7326 pastith
                        <fileset dir="${jboss-spec.bin.dir}" />
169 14ad7326 pastith
                </copy>
170 14ad7326 pastith
                <copy todir="${jboss.conf.dir}" overwrite="true" failonerror="false">
171 14ad7326 pastith
                        <fileset dir="${jboss.project}/conf"/>
172 14ad7326 pastith
                </copy>
173 14ad7326 pastith
                <copy todir="${jboss.conf.dir}" overwrite="true" failonerror="false">
174 14ad7326 pastith
                        <fileset dir="${jboss-spec.conf.dir}"/>
175 14ad7326 pastith
                </copy>
176 14ad7326 pastith
                <copy todir="${jboss.run_conf.lib.dir}" overwrite="true" failonerror="false">
177 14ad7326 pastith
                        <fileset dir="${jboss.project}/lib"/>
178 14ad7326 pastith
                </copy>
179 14ad7326 pastith
                <copy todir="${jboss.run_conf.lib.dir}" overwrite="true" failonerror="false">
180 14ad7326 pastith
                        <fileset dir="${jboss-spec.lib.dir}" />
181 14ad7326 pastith
                </copy>
182 14ad7326 pastith
                <copy todir="${jboss.deploy.dir}" overwrite="true" failonerror="false">
183 14ad7326 pastith
                        <fileset dir="${jboss.project}/deploy"/>
184 14ad7326 pastith
                </copy>
185 14ad7326 pastith
                <copy todir="${jboss.deploy.dir}" overwrite="true" failonerror="false">
186 14ad7326 pastith
                        <fileset dir="${jboss-spec.deploy.dir}" />
187 14ad7326 pastith
                </copy>
188 936339af Panagiotis Astithas
        <!-- Make run.sh executable again -->
189 936339af Panagiotis Astithas
        <chmod file="${jboss.bin.dir}/run.sh" perm="ugo+x"/>
190 14ad7326 pastith
        </target>
191 14ad7326 pastith
192 14ad7326 pastith
        <target name="compile" description="Compile src to bin">
193 14ad7326 pastith
                <mkdir dir="bin" />
194 14ad7326 pastith
                <javac srcdir="src:test" destdir="bin" debug="on" debuglevel="lines,vars,source" source="1.6">
195 14ad7326 pastith
                        <classpath refid="project.class.path" />
196 14ad7326 pastith
                </javac>
197 14ad7326 pastith
        </target>
198 14ad7326 pastith
199 14ad7326 pastith
        <target name="package-code" depends="compile" description="Package up the project code as a jar">
200 14ad7326 pastith
                <jar destfile="${build.dir}/${ant.project.name}.jar">
201 14ad7326 pastith
                        <fileset dir="bin">
202 14ad7326 pastith
                                <include name="org/json/**" />
203 023f6f1e Panagiotis Astithas
                                <include name="**/client/AdminService.class" />
204 14ad7326 pastith
                                <include name="**/server/**" />
205 14ad7326 pastith
                                <exclude name="**/domain/**"/>
206 14ad7326 pastith
                                <exclude name="**/ejb/**"/>
207 14ad7326 pastith
                        </fileset>
208 023f6f1e Panagiotis Astithas
                        <fileset dir="src">
209 023f6f1e Panagiotis Astithas
                                <include name="**/*.xml" />
210 023f6f1e Panagiotis Astithas
                                <include name="**/client/exceptions/**" />
211 023f6f1e Panagiotis Astithas
                                </fileset>
212 14ad7326 pastith
                </jar>
213 14ad7326 pastith
        </target>
214 14ad7326 pastith
215 14ad7326 pastith
        <target name="package-webdav" depends="compile" description="Package up the webdav code as a jar">
216 14ad7326 pastith
                <jar destfile="${build.dir}/webdav.jar">
217 14ad7326 pastith
                        <fileset dir="bin">
218 14ad7326 pastith
                                <include name="**/webdav/**" />
219 14ad7326 pastith
                        </fileset>
220 14ad7326 pastith
                </jar>
221 14ad7326 pastith
        </target>
222 14ad7326 pastith
223 14ad7326 pastith
        <target name="package-ejb" depends="compile" description="Package up the EJB classes">
224 14ad7326 pastith
                <jar destfile="${build.dir}/ejbs.jar">
225 14ad7326 pastith
                        <zipfileset dir="${basedir}/persistence" />
226 14ad7326 pastith
                        <zipfileset dir="${build.dir}">
227 14ad7326 pastith
                                <include name="**/configuration/**" />
228 14ad7326 pastith
                                <include name="**/exceptions/**" />
229 14ad7326 pastith
                                <include name="**/domain/**" />
230 14ad7326 pastith
                                <include name="**/ejb/**" />
231 d387cc7c pastith
                                <exclude name="**/*Test.class"/>
232 14ad7326 pastith
                        </zipfileset>
233 14ad7326 pastith
                </jar>
234 14ad7326 pastith
        </target>
235 14ad7326 pastith
236 14ad7326 pastith
        <target name="check-gwt-compile" depends="compile">
237 14ad7326 pastith
                <uptodate property="compilation-not-needed">
238 14ad7326 pastith
                        <srcfiles dir="${src.dir}" excludes="**/server/**"/>
239 c7e8b54d Dimitris Routsis
                        <mergemapper to="${build.dir}/www/gr.ebs.gss.GSS.nocache.js"/>
240 14ad7326 pastith
                </uptodate>
241 14ad7326 pastith
        </target>
242 023f6f1e Panagiotis Astithas
243 14ad7326 pastith
        <target name="gwt-compile" depends="check-gwt-compile" unless="compilation-not-needed" description="Compile client code to JavaScript">
244 023f6f1e Panagiotis Astithas
            <condition property="gwt-dev-lib" value="${gwt.path}/gwt-dev.jar">
245 023f6f1e Panagiotis Astithas
                    <available file="${gwt.path}/gwt-dev.jar" />
246 023f6f1e Panagiotis Astithas
            </condition>
247 023f6f1e Panagiotis Astithas
                
248 023f6f1e Panagiotis Astithas
                <java classname="com.google.gwt.dev.Compiler" failonerror="true" fork="true">
249 023f6f1e Panagiotis Astithas
                        <!--arg value="-style"/>
250 023f6f1e Panagiotis Astithas
                        <arg value="DETAILED"/-->
251 023f6f1e Panagiotis Astithas
                        <arg value="-localWorkers" />
252 023f6f1e Panagiotis Astithas
                        <arg value="${gwt.workers}" />
253 023f6f1e Panagiotis Astithas
                        <arg value="-war"/>
254 023f6f1e Panagiotis Astithas
                        <arg value="${gwt.www.dir}"/>
255 023f6f1e Panagiotis Astithas
                        <arg value="${gwt.module}"/>
256 afd3a0ef Giannis Koutsoubos
                        
257 023f6f1e Panagiotis Astithas
                    <classpath>
258 023f6f1e Panagiotis Astithas
                        <pathelement path="${gwt-dev-lib}"/>
259 023f6f1e Panagiotis Astithas
                                <path refid="project.class.path" />
260 023f6f1e Panagiotis Astithas
                                <pathelement path="${src.dir}" />
261 023f6f1e Panagiotis Astithas
                    </classpath>
262 023f6f1e Panagiotis Astithas
                </java>
263 023f6f1e Panagiotis Astithas
                <mkdir dir="${build.dir}/www"/>
264 023f6f1e Panagiotis Astithas
                <copy todir="${build.dir}/www">
265 023f6f1e Panagiotis Astithas
                        <fileset dir="${gwt.www.dir}/${gwt.module}" excludes="**/${gwt.module.class}.html">
266 023f6f1e Panagiotis Astithas
                        </fileset>
267 023f6f1e Panagiotis Astithas
                </copy>
268 023f6f1e Panagiotis Astithas
                <copy file="${gwt.www.dir}/${gwt.module}/${gwt.module.class}.html" tofile="${build.dir}/www/index.html" />
269 023f6f1e Panagiotis Astithas
        </target>
270 14ad7326 pastith
        
271 14ad7326 pastith
        <target name="package-war" depends="gwt-compile, package-code" description="Package up the web part as a war">
272 14ad7326 pastith
                <jar destfile="${build.dir}/${dist.war}">
273 09f9744e Giannis Koutsoubos
                        <zipfileset dir="${war.dir}" >
274 023f6f1e Panagiotis Astithas
                            <exclude name="**/classes/**"/>
275 023f6f1e Panagiotis Astithas
                        </zipfileset>
276 6e6e914e Panagiotis Astithas
                        <zipfileset dir="${build.dir}/www" />
277 14ad7326 pastith
                        <zipfileset dir="${build.dir}" prefix="WEB-INF/lib">
278 14ad7326 pastith
                                <include name="${ant.project.name}.jar" />
279 14ad7326 pastith
                        </zipfileset>
280 023f6f1e Panagiotis Astithas
                </jar>
281 023f6f1e Panagiotis Astithas
        </target>
282 023f6f1e Panagiotis Astithas
        
283 023f6f1e Panagiotis Astithas
        <target name="check-gwt-admin-compile" depends="compile">
284 023f6f1e Panagiotis Astithas
                <uptodate property="compilation-not-needed">
285 023f6f1e Panagiotis Astithas
                        <srcfiles dir="${src.dir}" excludes="**/server/**"/>
286 023f6f1e Panagiotis Astithas
                        <mergemapper to="${build.dir}/wwwadmin/gr.ebs.gss.admin.TwoAdmin.nocache.js"/>
287 023f6f1e Panagiotis Astithas
                </uptodate>
288 023f6f1e Panagiotis Astithas
        </target>
289 023f6f1e Panagiotis Astithas
290 023f6f1e Panagiotis Astithas
        <target name="gwt-admin-compile" depends="check-gwt-admin-compile" unless="compilation-not-needed" description="Compile client code to JavaScript">
291 023f6f1e Panagiotis Astithas
            <condition property="gwt-dev-lib" value="${gwt.path}/gwt-dev.jar">
292 023f6f1e Panagiotis Astithas
                    <available file="${gwt.path}/gwt-dev.jar" />
293 023f6f1e Panagiotis Astithas
            </condition>
294 023f6f1e Panagiotis Astithas
                
295 023f6f1e Panagiotis Astithas
                <java classname="com.google.gwt.dev.Compiler" failonerror="true" fork="true">
296 023f6f1e Panagiotis Astithas
                        <!--arg value="-style"/>
297 023f6f1e Panagiotis Astithas
                        <arg value="DETAILED"/-->
298 023f6f1e Panagiotis Astithas
                        <arg value="-localWorkers" />
299 023f6f1e Panagiotis Astithas
                        <arg value="${gwt.workers}" />
300 023f6f1e Panagiotis Astithas
                        <arg value="-war"/>
301 023f6f1e Panagiotis Astithas
                        <arg value="${gwt.www.admin.dir}"/>
302 023f6f1e Panagiotis Astithas
                        <arg value="${gwt.admin.module}"/>
303 023f6f1e Panagiotis Astithas
            <jvmarg value="-Xmx128m"/>                                                
304 023f6f1e Panagiotis Astithas
                    <classpath>
305 023f6f1e Panagiotis Astithas
                        <pathelement path="${gwt-dev-lib}"/>
306 023f6f1e Panagiotis Astithas
                                <path refid="project.class.path" />
307 023f6f1e Panagiotis Astithas
                                <pathelement path="${src.dir}" />
308 023f6f1e Panagiotis Astithas
                    </classpath>
309 023f6f1e Panagiotis Astithas
                </java>
310 023f6f1e Panagiotis Astithas
                <mkdir dir="${build.dir}/wwwadmin"/>
311 023f6f1e Panagiotis Astithas
                <copy todir="${build.dir}/wwwadmin">
312 023f6f1e Panagiotis Astithas
                        <fileset dir="${gwt.www.admin.dir}/${gwt.admin.module}" excludes="**/${gwt.admin.module.class}.html">
313 023f6f1e Panagiotis Astithas
                        </fileset>
314 023f6f1e Panagiotis Astithas
                </copy>
315 023f6f1e Panagiotis Astithas
                <copy file="${gwt.www.admin.dir}/${gwt.admin.module}/${gwt.admin.module.class}.html" tofile="${build.dir}/wwwadmin/index.html" />
316 023f6f1e Panagiotis Astithas
        </target>
317 023f6f1e Panagiotis Astithas
                
318 023f6f1e Panagiotis Astithas
        <target name="package-admin-war" depends="gwt-admin-compile, package-code" description="Package up the web part as a war">
319 023f6f1e Panagiotis Astithas
                <jar destfile="${build.dir}/${dist.admin.war}">
320 023f6f1e Panagiotis Astithas
                        <zipfileset dir="${war.admin.dir}" >
321 023f6f1e Panagiotis Astithas
                                  <exclude name="**/classes/**"/>
322 023f6f1e Panagiotis Astithas
            </zipfileset>
323 023f6f1e Panagiotis Astithas
                        <zipfileset dir="${build.dir}/wwwadmin" />
324 023f6f1e Panagiotis Astithas
                        <zipfileset dir="${build.dir}" prefix="WEB-INF/lib">
325 023f6f1e Panagiotis Astithas
                                <include name="${ant.project.name}.jar" />
326 023f6f1e Panagiotis Astithas
                        </zipfileset>
327 14ad7326 pastith
                        <zipfileset dir="${gwt.path}" prefix="WEB-INF/lib">
328 14ad7326 pastith
                                <include name="gwt-servlet.jar" />
329 14ad7326 pastith
                        </zipfileset>
330 14ad7326 pastith
                </jar>
331 14ad7326 pastith
        </target>
332 14ad7326 pastith
333 14ad7326 pastith
        <target name="package-webdav-war" depends="package-webdav" description="Package up the WebDAV part as a war">
334 14ad7326 pastith
                <jar destfile="${build.dir}/${webdav.war}">
335 14ad7326 pastith
                        <zipfileset dir="${webdav.war.dir}" />
336 14ad7326 pastith
                        <zipfileset dir="${build.dir}" prefix="WEB-INF/lib">
337 14ad7326 pastith
                                <include name="webdav.jar" />
338 14ad7326 pastith
                        </zipfileset>
339 14ad7326 pastith
                </jar>
340 14ad7326 pastith
        </target>
341 14ad7326 pastith
342 14ad7326 pastith
        <target name="package-mbeans" depends="compile">
343 14ad7326 pastith
                <jar jarfile="${build.dir}/${mbeans.dist.file}" basedir="${build.dir}">
344 14ad7326 pastith
                        <include name="**/mbeans/**"/>
345 14ad7326 pastith
                        <metainf dir="${mbeans.meta-inf.dir}"/>
346 14ad7326 pastith
                </jar>
347 14ad7326 pastith
        </target>
348 14ad7326 pastith
        
349 023f6f1e Panagiotis Astithas
        <target name="package-ear" depends="package-admin-war, package-war, package-webdav-war, package-ejb, package-mbeans" description="Package up the project as an ear">
350 14ad7326 pastith
                <jar destfile="${build.dir}/${dist.ear}">
351 14ad7326 pastith
                        <zipfileset dir="${ear.dir}" />
352 14ad7326 pastith
                        <zipfileset dir="${build.dir}">
353 14ad7326 pastith
                                <include name="ejbs.jar" />
354 14ad7326 pastith
                                <include name="${dist.war}" />
355 14ad7326 pastith
                                <include name="${webdav.war}" />
356 023f6f1e Panagiotis Astithas
                <include name="${dist.admin.war}" />
357 14ad7326 pastith
                                <include name="${mbeans.dist.file}"/>
358 14ad7326 pastith
                        </zipfileset>
359 14ad7326 pastith
                </jar>
360 14ad7326 pastith
        </target>
361 14ad7326 pastith
362 14ad7326 pastith
        <target name="deploy" depends="package-ear" description="Deploy the project to the server">
363 14ad7326 pastith
                <copy todir="${jboss.deploy.dir}" file="${build.dir}/${dist.ear}"/>
364 14ad7326 pastith
        </target>
365 14ad7326 pastith
366 14ad7326 pastith
        <target name="redeploy" depends="package-ear" description="Redeploy the project to the server">
367 14ad7326 pastith
                <copy todir="${jboss.deploy.dir}" file="${build.dir}/${dist.ear}" overwrite="yes"/>
368 14ad7326 pastith
        </target>
369 14ad7326 pastith
370 14ad7326 pastith
        <target name="undeploy" description="Undeploy the project from the server">
371 14ad7326 pastith
                <delete file="${jboss.deploy.dir}/${dist.ear}"/>
372 14ad7326 pastith
        </target>
373 14ad7326 pastith
374 14ad7326 pastith
        <target name="clean" description="Delete the contents of the bin and www directories">
375 936339af Panagiotis Astithas
                <delete dir="${build.dir}"/>
376 936339af Panagiotis Astithas
                <delete dir="${gwt.www.dir}"/>
377 936339af Panagiotis Astithas
                <delete dir="${gwt.www.admin.dir}"/>
378 14ad7326 pastith
        </target>
379 14ad7326 pastith
380 936339af Panagiotis Astithas
    <target name="deinstall"
381 936339af Panagiotis Astithas
            description="Delete the contents of the JBoss home directory">
382 936339af Panagiotis Astithas
        <delete dir="${jboss.home}"/>
383 936339af Panagiotis Astithas
    </target>
384 936339af Panagiotis Astithas
385 936339af Panagiotis Astithas
    <target name="distclean" depends="deinstall, clean"
386 936339af Panagiotis Astithas
        description="Delete the contents of the JBoss home directory and all downloaded artifacts">
387 936339af Panagiotis Astithas
        <delete dir="${deps.dir}"/>
388 936339af Panagiotis Astithas
    </target>
389 936339af Panagiotis Astithas
390 14ad7326 pastith
        <target name="test" description="Performs unit tests on the project" depends="compile">
391 14ad7326 pastith
                <available
392 14ad7326 pastith
                      property="junit.present"
393 14ad7326 pastith
                      classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
394 14ad7326 pastith
                      classpathref="project.class.path"/>
395 14ad7326 pastith
            <fail unless="junit.present">
396 14ad7326 pastith
              ##################################################################
397 14ad7326 pastith
              JUnit not found.
398 14ad7326 pastith
              Please make sure junit.jar is in ANT_HOME/lib, or made available
399 14ad7326 pastith
              to Ant using other mechanisms like -lib or CLASSPATH.
400 14ad7326 pastith
              ##################################################################
401 14ad7326 pastith
                </fail>
402 14ad7326 pastith
403 14ad7326 pastith
                <junit printsummary="withOutAndErr" fork="yes" haltonfailure="yes">
404 14ad7326 pastith
                        <classpath refid="project.class.path"/>
405 14ad7326 pastith
                        <formatter type="plain"/>
406 14ad7326 pastith
                        <batchtest todir="${test.build.dir}">
407 14ad7326 pastith
                                <fileset dir="${test.build.classes.dir}">
408 d387cc7c pastith
                                        <include name="**/*Test.class"/>
409 14ad7326 pastith
                                </fileset>          
410 14ad7326 pastith
                        </batchtest>
411 14ad7326 pastith
412 14ad7326 pastith
                </junit>
413 14ad7326 pastith
        </target>
414 936339af Panagiotis Astithas
415 936339af Panagiotis Astithas
        <target name="run" description="Starts the server" depends="deploy">
416 936339af Panagiotis Astithas
        <exec executable="${jboss.bin.dir}/run.sh" osfamily="unix">
417 936339af Panagiotis Astithas
            <arg line="${jboss.args}"/>
418 936339af Panagiotis Astithas
        </exec>
419 936339af Panagiotis Astithas
                <exec executable="cmd" osfamily="windows">
420 936339af Panagiotis Astithas
                    <arg value="/c"/>
421 936339af Panagiotis Astithas
                    <arg value="${jboss.bin.dir}/run.bat"/>
422 936339af Panagiotis Astithas
            <arg line="${jboss.args}"/>
423 936339af Panagiotis Astithas
                </exec>
424 936339af Panagiotis Astithas
    </target>
425 14ad7326 pastith
</project>