Statistics
| Branch: | Tag: | Revision:

root / build.xml @ acb99e0d

History | View | Annotate | Download (10.1 kB)

1 14ad7326 pastith
<?xml version="1.0" encoding="utf-8" ?>
2 acb99e0d Christos V. Stathis
<project name="gss" default="package-war" 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 af6aa461 Christos V. Stathis
    <property name="gwt.workers" value="1"/>
9 af6aa461 Christos V. Stathis
    <property name="jboss.args" value="-b 0.0.0.0" />
10 936339af Panagiotis Astithas
11 af6aa461 Christos V. Stathis
    <property name="jboss.version" value="5.1.0"/>
12 af6aa461 Christos V. Stathis
    <property name="jboss.home" value="${deps.dir}/jboss-${jboss.version}.GA" />
13 af6aa461 Christos V. Stathis
    <property name="jboss.bin.dir" value="${jboss.home}/bin" />
14 af6aa461 Christos V. Stathis
    <property name="jboss.conf.dir" value="${jboss.home}/server/default/conf" />
15 af6aa461 Christos V. Stathis
    <property name="jboss.deploy.dir" value="${jboss.home}/server/default/deploy" />
16 af6aa461 Christos V. Stathis
    <property name="jboss.lib.dir" value="${jboss.home}/server/default/lib" />
17 af6aa461 Christos V. Stathis
    <property name="jboss.root.lib.dir" value="${jboss.home}/lib" />
18 af6aa461 Christos V. Stathis
    <property name="jboss.common.lib.dir" value="${jboss.home}/common/lib" />
19 af6aa461 Christos V. Stathis
    <property name="jboss.filename" value="jboss-${jboss.version}.GA-jdk6.zip"/>
20 2f93319f Panagiotis Astithas
        <property name="jboss.download.url" value="http://switch.dl.sourceforge.net/project/jboss/JBoss/JBoss-${jboss.version}.GA/${jboss.filename}"/>
21 af6aa461 Christos V. Stathis
22 af6aa461 Christos V. Stathis
    <property name="gwt.version" value="2.1.1"/>
23 af6aa461 Christos V. Stathis
        <property name="gwt.home" value="${deps.dir}/gwt-${gwt.version}"/>
24 af6aa461 Christos V. Stathis
    <property name="gwt.filename" value="gwt-${gwt.version}.zip"/>
25 af6aa461 Christos V. Stathis
    <property name="gwt.download.url" value="http://google-web-toolkit.googlecode.com/files/${gwt.filename}"/>
26 af6aa461 Christos V. Stathis
27 af6aa461 Christos V. Stathis
    <property name="gwt-gears.version" value="1.3.0"/>
28 af6aa461 Christos V. Stathis
    <property name="gwt-gears.home" value="${deps.dir}/gwt-gears-${gwt-gears.version}" />
29 af6aa461 Christos V. Stathis
    <property name="gwt-gears.filename" value="gwt-gears-${gwt-gears.version}.zip"/>
30 af6aa461 Christos V. Stathis
    <property name="gwt-gears.download.url" value="http://gwt-google-apis.googlecode.com/files/${gwt-gears.filename}"/>
31 af6aa461 Christos V. Stathis
32 fc0fa492 koutsoub
    <property name="gwt-incubator.filename" value="gwt-incubator-20101117-r1766.jar"/>
33 fc0fa492 koutsoub
    <property name="gwt-incubator.download.url" value="http://google-web-toolkit-incubator.googlecode.com/files/gwt-incubator-20101117-r1766.jar"/>
34 af6aa461 Christos V. Stathis
    <property name="gwt-visualization.home" value="${deps.dir}/gwt-visualization-1.1.0" />
35 af6aa461 Christos V. Stathis
    <property name="gwt-visualization.filename" value="gwt-visualization-1.1.0.zip"/>
36 af6aa461 Christos V. Stathis
    <property name="gwt-visualization.download.url" value="http://gwt-google-apis.googlecode.com/files/${gwt-visualization.filename}"/>
37 af6aa461 Christos V. Stathis
38 af6aa461 Christos V. Stathis
    <property name="gwtquery.filename" value="gwtquery-1.0.0-20110116.074055-7.jar"/>
39 af6aa461 Christos V. Stathis
    <property name="gwtquery.download.url" value="http://gss.googlecode.com/hg/lib/${gwtquery.filename}?r=0473a2c1bc32c9426423f8ca3b688a29ce30216b"/>
40 af6aa461 Christos V. Stathis
    <property name="gwtquery-draggable-plugin.filename" value="draggable-plugin-1.0.2.jar"/>
41 af6aa461 Christos V. Stathis
    <property name="gwtquery-draggable-plugin.download.url" value="http://gss.googlecode.com/hg/lib/${gwtquery-draggable-plugin.filename}?r=0634eeeeaaad1b9bfb7a8e809bfc9e9545d208e2"/>
42 af6aa461 Christos V. Stathis
    <property name="gwtquery-droppable-plugin.filename" value="droppable-plugin-1.0.2.jar"/>
43 af6aa461 Christos V. Stathis
    <property name="gwtquery-droppable-plugin.download.url" value="http://gss.googlecode.com/hg/lib/${gwtquery-droppable-plugin.filename}?r=c8bca56a1c4ab780ac0d0cc72a2b40b60d7ca4f7"/>
44 af6aa461 Christos V. Stathis
    <property name="gwtquery-commonui-plugin.filename" value="commonui-plugin-1.0.3.jar"/>
45 af6aa461 Christos V. Stathis
    <property name="gwtquery-commonui-plugin.download.url" value="http://gss.googlecode.com/hg/lib/${gwtquery-commonui-plugin.filename}?r=0473a2c1bc32c9426423f8ca3b688a29ce30216b"/>
46 af6aa461 Christos V. Stathis
47 936339af Panagiotis Astithas
    <property name="root.context" value="gss" />
48 936339af Panagiotis Astithas
    <property name="gwt.module.class" value="GSS" />
49 83c3bc8e Christos V. Stathis
    <property name="gwt.root.package" value="org.gss_project.gss.web" />
50 83c3bc8e Christos V. Stathis
    <property name="gwt.root.path" value="org/gss_project/gss/web" />
51 af6aa461 Christos V. Stathis
    <property name="gwt.module" value="${gwt.root.package}.${gwt.module.class}" />
52 af6aa461 Christos V. Stathis
53 14ad7326 pastith
        <property name="src.dir" value="${basedir}/src"/>
54 af6aa461 Christos V. Stathis
55 14ad7326 pastith
        <!-- Build dirs -->
56 14ad7326 pastith
        <property name="build.dir" value="${basedir}/bin" />
57 14ad7326 pastith
        <property name="build.classes.dir" value="${build.dir}/classes" />
58 af6aa461 Christos V. Stathis
        <property name="gwt.www.dir" value="${build.dir}/www" />
59 af6aa461 Christos V. Stathis
        <property name="gwt.www.admin.dir" value="${build.dir}/wwwadmin" />
60 14ad7326 pastith
        <property name="dist.war" value="${ant.project.name}.war"/>
61 14ad7326 pastith
        <property name="war.dir" value="${basedir}/war" />
62 14ad7326 pastith
        <property name="war.web-inf.dir" value="${war.dir}/WEB-INF"/>
63 14ad7326 pastith
        <property name="war.lib.dir" value="${war.web-inf.dir}/lib"/>
64 af6aa461 Christos V. Stathis
65 14ad7326 pastith
        <!-- set classpath -->
66 14ad7326 pastith
        <path id="project.class.path">
67 af6aa461 Christos V. Stathis
        <pathelement location="${gwt.home}/gwt-user.jar"/>
68 af6aa461 Christos V. Stathis
        <pathelement location="${war.lib.dir}/commons-fileupload-1.2.jar"/>
69 14ad7326 pastith
        </path>
70 14ad7326 pastith
71 af6aa461 Christos V. Stathis
        <target name="check-dependencies" description="Checks if all dependencies are present">
72 af6aa461 Christos V. Stathis
        <condition property="dependencies.present">
73 af6aa461 Christos V. Stathis
            <and>
74 af6aa461 Christos V. Stathis
                <available file="${jboss.home}" type="dir"/>
75 af6aa461 Christos V. Stathis
                <available file="${gwt.home}" type="dir"/>
76 af6aa461 Christos V. Stathis
                <available file="${gwt-gears.home}" type="dir"/>
77 af6aa461 Christos V. Stathis
                <available file="${deps.dir}/${gwtquery.filename}"/>
78 af6aa461 Christos V. Stathis
                <available file="${deps.dir}/${gwtquery-draggable-plugin.filename}"/>
79 af6aa461 Christos V. Stathis
                <available file="${deps.dir}/${gwtquery-droppable-plugin.filename}"/>
80 af6aa461 Christos V. Stathis
                <available file="${deps.dir}/${gwtquery-commonui-plugin.filename}"/>
81 af6aa461 Christos V. Stathis
                <available file="${deps.dir}/${gwt-incubator.filename}"/>
82 af6aa461 Christos V. Stathis
                <available file="${deps.dir}/${gwt-visualization.filename}"/>
83 af6aa461 Christos V. Stathis
            </and>
84 af6aa461 Christos V. Stathis
        </condition>
85 af6aa461 Christos V. Stathis
        <echo message="dependencies.present=${dependencies.present}"/>
86 af6aa461 Christos V. Stathis
    </target>
87 936339af Panagiotis Astithas
88 af6aa461 Christos V. Stathis
    <target name="fetch-dependencies" unless="dependencies.present" description="Fetch the dpendencies if not present" depends="check-dependencies">
89 936339af Panagiotis Astithas
            <mkdir dir="${deps.dir}"/>
90 af6aa461 Christos V. Stathis
        <get src="${gwt.download.url}" dest="${deps.dir}/${gwt.filename}" usetimestamp="true"/>
91 af6aa461 Christos V. Stathis
        <get src="${gwt-gears.download.url}" dest="${deps.dir}/${gwt-gears.filename}" usetimestamp="true"/>
92 af6aa461 Christos V. Stathis
        <get src="${gwt-incubator.download.url}" dest="${deps.dir}/${gwt-incubator.filename}"/>
93 af6aa461 Christos V. Stathis
        <get src="${gwt-visualization.download.url}" dest="${deps.dir}/${gwt-visualization.filename}"/>
94 af6aa461 Christos V. Stathis
        <get src="${gwtquery.download.url}" dest="${deps.dir}/${gwtquery.filename}" usetimestamp="true"/>
95 af6aa461 Christos V. Stathis
        <get src="${gwtquery-draggable-plugin.download.url}" dest="${deps.dir}/${gwtquery-draggable-plugin.filename}" usetimestamp="true"/>
96 af6aa461 Christos V. Stathis
        <get src="${gwtquery-droppable-plugin.download.url}" dest="${deps.dir}/${gwtquery-droppable-plugin.filename}" usetimestamp="true"/>
97 af6aa461 Christos V. Stathis
        <get src="${gwtquery-commonui-plugin.download.url}" dest="${deps.dir}/${gwtquery-commonui-plugin.filename}" usetimestamp="true"/>
98 af6aa461 Christos V. Stathis
            <unzip src="${deps.dir}/${gwt.filename}" dest="${gwt.home}/.."/>
99 af6aa461 Christos V. Stathis
        <unzip src="${deps.dir}/${gwt-gears.filename}" dest="${gwt-gears.home}/.."/>
100 af6aa461 Christos V. Stathis
        <unzip src="${deps.dir}/${gwt-visualization.filename}" dest="${gwt-visualization.home}/.."/>
101 af6aa461 Christos V. Stathis
    </target>
102 af6aa461 Christos V. Stathis
103 af6aa461 Christos V. Stathis
        <target name="check-gwt-compile" description="Checks is the web gwt client sources are up-to-date with the compiled artifacts">
104 14ad7326 pastith
                <uptodate property="compilation-not-needed">
105 af6aa461 Christos V. Stathis
                        <srcfiles dir="${src.dir}">
106 af6aa461 Christos V. Stathis
                <include name="${gwt.root.path}/**"/>
107 af6aa461 Christos V. Stathis
            </srcfiles>
108 af6aa461 Christos V. Stathis
                        <mergemapper to="${gwt.www.dir}/${gwt.module}/${gwt.module}.nocache.js"/>
109 14ad7326 pastith
                </uptodate>
110 14ad7326 pastith
        </target>
111 023f6f1e Panagiotis Astithas
112 af6aa461 Christos V. Stathis
        <target name="gwt-compile" depends="check-gwt-compile, fetch-dependencies" unless="compilation-not-needed" description="Compile the gwt web client code to JavaScript">
113 023f6f1e Panagiotis Astithas
                <java classname="com.google.gwt.dev.Compiler" failonerror="true" fork="true">
114 023f6f1e Panagiotis Astithas
                        <arg value="-localWorkers" />
115 023f6f1e Panagiotis Astithas
                        <arg value="${gwt.workers}" />
116 023f6f1e Panagiotis Astithas
                        <arg value="-war"/>
117 023f6f1e Panagiotis Astithas
                        <arg value="${gwt.www.dir}"/>
118 023f6f1e Panagiotis Astithas
                        <arg value="${gwt.module}"/>
119 afd3a0ef Giannis Koutsoubos
                        
120 023f6f1e Panagiotis Astithas
                    <classpath>
121 af6aa461 Christos V. Stathis
                <pathelement path="${gwt.home}/gwt-dev.jar"/>
122 af6aa461 Christos V. Stathis
                <pathelement location="${deps.dir}/${gwtquery.filename}"/>
123 af6aa461 Christos V. Stathis
                <pathelement location="${deps.dir}/${gwtquery-droppable-plugin.filename}"/>
124 af6aa461 Christos V. Stathis
                <pathelement location="${deps.dir}/${gwtquery-draggable-plugin.filename}"/>
125 af6aa461 Christos V. Stathis
                <pathelement location="${deps.dir}/${gwtquery-commonui-plugin.filename}"/>
126 af6aa461 Christos V. Stathis
                <pathelement location="${gwt-gears.home}/gwt-gears.jar"/>
127 af6aa461 Christos V. Stathis
                <pathelement path="${gwt.home}/gwt-user.jar" />
128 af6aa461 Christos V. Stathis
                                <path refid="project.class.path"/>
129 023f6f1e Panagiotis Astithas
                                <pathelement path="${src.dir}" />
130 023f6f1e Panagiotis Astithas
                    </classpath>
131 023f6f1e Panagiotis Astithas
                </java>
132 acb99e0d Christos V. Stathis
        <!--move file="${gwt.www.dir}/${gwt.module}/${gwt.module.class}.html" tofile="${gwt.www.dir}/${gwt.module}/index.html"/-->
133 023f6f1e Panagiotis Astithas
        </target>
134 14ad7326 pastith
        
135 acb99e0d Christos V. Stathis
    <target name="package-war" depends="gwt-compile" description="Package up the web client as a war">
136 af6aa461 Christos V. Stathis
        <jar destfile="${build.dir}/${dist.war}">
137 af6aa461 Christos V. Stathis
            <zipfileset dir="${war.dir}"/>
138 af6aa461 Christos V. Stathis
            <zipfileset dir="${gwt.www.dir}/${gwt.module}"/>
139 af6aa461 Christos V. Stathis
        </jar>
140 af6aa461 Christos V. Stathis
    </target>
141 af6aa461 Christos V. Stathis
142 af6aa461 Christos V. Stathis
        <target name="clean" description="Delete all build artifacts">
143 936339af Panagiotis Astithas
                <delete dir="${build.dir}"/>
144 14ad7326 pastith
        </target>
145 14ad7326 pastith
146 af6aa461 Christos V. Stathis
    <target name="distclean" depends="clean" description="Delete all downloaded dependencies">
147 936339af Panagiotis Astithas
        <delete dir="${deps.dir}"/>
148 936339af Panagiotis Astithas
    </target>
149 936339af Panagiotis Astithas
150 acb99e0d Christos V. Stathis
    <target name="run-web-dev-mode" description="Run web client in development mode">
151 43240a9c Christos V. Stathis
        <java fork="true" classname="com.google.gwt.dev.DevMode" spawn="true">
152 af6aa461 Christos V. Stathis
            <classpath>
153 af6aa461 Christos V. Stathis
                <pathelement location="${src.dir}"/>
154 af6aa461 Christos V. Stathis
                <pathelement location="${build.classes.dir}"/>
155 af6aa461 Christos V. Stathis
                <pathelement path="${gwt.home}/gwt-dev.jar"/>
156 af6aa461 Christos V. Stathis
                <pathelement location="${deps.dir}/${gwtquery.filename}"/>
157 af6aa461 Christos V. Stathis
                <pathelement location="${deps.dir}/${gwtquery-draggable-plugin.filename}"/>
158 43240a9c Christos V. Stathis
                <pathelement location="${deps.dir}/${gwtquery-droppable-plugin.filename}"/>
159 af6aa461 Christos V. Stathis
                <pathelement location="${deps.dir}/${gwtquery-commonui-plugin.filename}"/>
160 af6aa461 Christos V. Stathis
                <pathelement location="${gwt-gears.home}/gwt-gears.jar"/>
161 af6aa461 Christos V. Stathis
                <pathelement path="${gwt.home}/gwt-user.jar" />
162 af6aa461 Christos V. Stathis
                <path refid="project.class.path"/>
163 af6aa461 Christos V. Stathis
            </classpath>
164 af6aa461 Christos V. Stathis
            <jvmarg value="-Xmx256M"/>
165 43240a9c Christos V. Stathis
            <jvmarg value="-Xdebug"/>
166 43240a9c Christos V. Stathis
            <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=55555"/>
167 af6aa461 Christos V. Stathis
            <arg value="-war"/>
168 acb99e0d Christos V. Stathis
            <arg value="${gwt.www.dir}/${gwt.module}"/>
169 af6aa461 Christos V. Stathis
            <arg value="-startupUrl"/>
170 acb99e0d Christos V. Stathis
            <arg value="GSS.html"/>
171 af6aa461 Christos V. Stathis
            <arg value="${gwt.module}"/>
172 af6aa461 Christos V. Stathis
        </java>
173 312648dd Christos V. Stathis
    </target>
174 14ad7326 pastith
</project>