root / build.xml @ 63366925
History | View | Annotate | Download (7.5 kB)
1 | ab3fae7b | Christos Stathis | <?xml version="1.0" encoding="utf-8" ?>
|
---|---|---|---|
2 | 652d9ee1 | Christos Stathis | <project name="gss" default="gwt-compile" basedir="."> |
3 | ab3fae7b | Christos Stathis | <description>The GSS project build file</description> |
4 | ab3fae7b | Christos Stathis | |
5 | ab3fae7b | Christos Stathis | <property file="build.properties"/> |
6 | ab3fae7b | Christos Stathis | <property name="deps.dir" value="dependencies"/> |
7 | ab3fae7b | Christos Stathis | |
8 | ab3fae7b | Christos Stathis | <property name="gwt.workers" value="1"/> |
9 | ab3fae7b | Christos Stathis | |
10 | ab3fae7b | Christos Stathis | <property name="gwt.version" value="2.1.1"/> |
11 | ab3fae7b | Christos Stathis | <property name="gwt.home" value="${deps.dir}/gwt-${gwt.version}"/> |
12 | ab3fae7b | Christos Stathis | <property name="gwt.filename" value="gwt-${gwt.version}.zip"/> |
13 | ab3fae7b | Christos Stathis | <property name="gwt.download.url" value="http://google-web-toolkit.googlecode.com/files/${gwt.filename}"/> |
14 | ab3fae7b | Christos Stathis | |
15 | ab3fae7b | Christos Stathis | <property name="gwt-gears.version" value="1.3.0"/> |
16 | ab3fae7b | Christos Stathis | <property name="gwt-gears.home" value="${deps.dir}/gwt-gears-${gwt-gears.version}" /> |
17 | ab3fae7b | Christos Stathis | <property name="gwt-gears.filename" value="gwt-gears-${gwt-gears.version}.zip"/> |
18 | ab3fae7b | Christos Stathis | <property name="gwt-gears.download.url" value="http://gwt-google-apis.googlecode.com/files/${gwt-gears.filename}"/> |
19 | ab3fae7b | Christos Stathis | |
20 | ab3fae7b | Christos Stathis | <property name="gwtquery.filename" value="gwtquery-1.0.0-20110116.074055-7.jar"/> |
21 | ab3fae7b | Christos Stathis | <property name="gwtquery.download.url" value="http://gss.googlecode.com/hg/lib/${gwtquery.filename}?r=0473a2c1bc32c9426423f8ca3b688a29ce30216b"/> |
22 | ab3fae7b | Christos Stathis | <property name="gwtquery-draggable-plugin.filename" value="draggable-plugin-1.0.2.jar"/> |
23 | ab3fae7b | Christos Stathis | <property name="gwtquery-draggable-plugin.download.url" value="http://gss.googlecode.com/hg/lib/${gwtquery-draggable-plugin.filename}?r=0634eeeeaaad1b9bfb7a8e809bfc9e9545d208e2"/> |
24 | ab3fae7b | Christos Stathis | <property name="gwtquery-droppable-plugin.filename" value="droppable-plugin-1.0.2.jar"/> |
25 | ab3fae7b | Christos Stathis | <property name="gwtquery-droppable-plugin.download.url" value="http://gss.googlecode.com/hg/lib/${gwtquery-droppable-plugin.filename}?r=c8bca56a1c4ab780ac0d0cc72a2b40b60d7ca4f7"/> |
26 | ab3fae7b | Christos Stathis | |
27 | ab3fae7b | Christos Stathis | <property name="root.context" value="gss" /> |
28 | ab3fae7b | Christos Stathis | <property name="gwt.module.class" value="GSS" /> |
29 | a57faaf0 | Christos Stathis | <property name="gwt.root.package" value="gr.grnet.pithos.web" /> |
30 | a57faaf0 | Christos Stathis | <property name="gwt.root.path" value="gr/grnet/pithos/web" /> |
31 | ab3fae7b | Christos Stathis | <property name="gwt.module" value="${gwt.root.package}.${gwt.module.class}" /> |
32 | ab3fae7b | Christos Stathis | |
33 | ab3fae7b | Christos Stathis | <property name="src.dir" value="${basedir}/src"/> |
34 | ab3fae7b | Christos Stathis | |
35 | ab3fae7b | Christos Stathis | <!-- Build dirs -->
|
36 | ab3fae7b | Christos Stathis | <property name="build.dir" value="${basedir}/bin" /> |
37 | ab3fae7b | Christos Stathis | <property name="build.classes.dir" value="${build.dir}/classes" /> |
38 | ab3fae7b | Christos Stathis | <property name="gwt.www.dir" value="${build.dir}/www" /> |
39 | ab3fae7b | Christos Stathis | <property name="gwt.www.admin.dir" value="${build.dir}/wwwadmin" /> |
40 | ab3fae7b | Christos Stathis | <property name="dist.war" value="${ant.project.name}.war"/> |
41 | ab3fae7b | Christos Stathis | <property name="war.dir" value="${basedir}/war" /> |
42 | ab3fae7b | Christos Stathis | <property name="war.web-inf.dir" value="${war.dir}/WEB-INF"/> |
43 | ab3fae7b | Christos Stathis | <property name="war.lib.dir" value="${war.web-inf.dir}/lib"/> |
44 | ab3fae7b | Christos Stathis | |
45 | ab3fae7b | Christos Stathis | <!-- set classpath -->
|
46 | ab3fae7b | Christos Stathis | <path id="project.class.path"> |
47 | ab3fae7b | Christos Stathis | <pathelement location="${gwt.home}/gwt-user.jar"/> |
48 | ab3fae7b | Christos Stathis | </path>
|
49 | ab3fae7b | Christos Stathis | |
50 | ab3fae7b | Christos Stathis | <target name="check-dependencies" description="Checks if all dependencies are present"> |
51 | ab3fae7b | Christos Stathis | <condition property="dependencies.present"> |
52 | ab3fae7b | Christos Stathis | <and>
|
53 | ab3fae7b | Christos Stathis | <available file="${gwt.home}" type="dir"/> |
54 | ab3fae7b | Christos Stathis | <available file="${gwt-gears.home}" type="dir"/> |
55 | ab3fae7b | Christos Stathis | <available file="${deps.dir}/${gwtquery.filename}"/> |
56 | ab3fae7b | Christos Stathis | <available file="${deps.dir}/${gwtquery-draggable-plugin.filename}"/> |
57 | ab3fae7b | Christos Stathis | <available file="${deps.dir}/${gwtquery-droppable-plugin.filename}"/> |
58 | ab3fae7b | Christos Stathis | </and>
|
59 | ab3fae7b | Christos Stathis | </condition>
|
60 | ab3fae7b | Christos Stathis | <echo message="dependencies.present=${dependencies.present}"/> |
61 | ab3fae7b | Christos Stathis | </target>
|
62 | ab3fae7b | Christos Stathis | |
63 | ab3fae7b | Christos Stathis | <target name="fetch-dependencies" unless="dependencies.present" description="Fetch the dpendencies if not present" depends="check-dependencies"> |
64 | ab3fae7b | Christos Stathis | <mkdir dir="${deps.dir}"/> |
65 | ab3fae7b | Christos Stathis | <get src="${gwt.download.url}" dest="${deps.dir}/${gwt.filename}" usetimestamp="true"/> |
66 | ab3fae7b | Christos Stathis | <get src="${gwt-gears.download.url}" dest="${deps.dir}/${gwt-gears.filename}" usetimestamp="true"/> |
67 | ab3fae7b | Christos Stathis | <get src="${gwtquery.download.url}" dest="${deps.dir}/${gwtquery.filename}" usetimestamp="true"/> |
68 | ab3fae7b | Christos Stathis | <get src="${gwtquery-draggable-plugin.download.url}" dest="${deps.dir}/${gwtquery-draggable-plugin.filename}" usetimestamp="true"/> |
69 | ab3fae7b | Christos Stathis | <get src="${gwtquery-droppable-plugin.download.url}" dest="${deps.dir}/${gwtquery-droppable-plugin.filename}" usetimestamp="true"/> |
70 | ab3fae7b | Christos Stathis | <unzip src="${deps.dir}/${gwt.filename}" dest="${gwt.home}/.."/> |
71 | ab3fae7b | Christos Stathis | <unzip src="${deps.dir}/${gwt-gears.filename}" dest="${gwt-gears.home}/.."/> |
72 | ab3fae7b | Christos Stathis | </target>
|
73 | ab3fae7b | Christos Stathis | |
74 | ab3fae7b | Christos Stathis | <target name="check-gwt-compile" description="Checks is the web gwt client sources are up-to-date with the compiled artifacts"> |
75 | ab3fae7b | Christos Stathis | <uptodate property="compilation-not-needed"> |
76 | ab3fae7b | Christos Stathis | <srcfiles dir="${src.dir}"> |
77 | ab3fae7b | Christos Stathis | <include name="${gwt.root.path}/**"/> |
78 | ab3fae7b | Christos Stathis | </srcfiles>
|
79 | ab3fae7b | Christos Stathis | <mergemapper to="${gwt.www.dir}/${gwt.module}/${gwt.module}.nocache.js"/> |
80 | ab3fae7b | Christos Stathis | </uptodate>
|
81 | ab3fae7b | Christos Stathis | </target>
|
82 | ab3fae7b | Christos Stathis | |
83 | ab3fae7b | Christos Stathis | <target name="gwt-compile" depends="check-gwt-compile, fetch-dependencies" unless="compilation-not-needed" description="Compile the gwt web client code to JavaScript"> |
84 | ab3fae7b | Christos Stathis | <java classname="com.google.gwt.dev.Compiler" failonerror="true" fork="true"> |
85 | ab3fae7b | Christos Stathis | <arg value="-localWorkers" /> |
86 | ab3fae7b | Christos Stathis | <arg value="${gwt.workers}" /> |
87 | ab3fae7b | Christos Stathis | <arg value="-war"/> |
88 | ab3fae7b | Christos Stathis | <arg value="${gwt.www.dir}"/> |
89 | ab3fae7b | Christos Stathis | <arg value="${gwt.module}"/> |
90 | ab3fae7b | Christos Stathis | |
91 | ab3fae7b | Christos Stathis | <classpath>
|
92 | ab3fae7b | Christos Stathis | <pathelement path="${gwt.home}/gwt-dev.jar"/> |
93 | ab3fae7b | Christos Stathis | <pathelement location="${deps.dir}/${gwtquery.filename}"/> |
94 | ab3fae7b | Christos Stathis | <pathelement location="${deps.dir}/${gwtquery-droppable-plugin.filename}"/> |
95 | ab3fae7b | Christos Stathis | <pathelement location="${deps.dir}/${gwtquery-draggable-plugin.filename}"/> |
96 | ab3fae7b | Christos Stathis | <pathelement location="${gwt-gears.home}/gwt-gears.jar"/> |
97 | ab3fae7b | Christos Stathis | <pathelement path="${gwt.home}/gwt-user.jar" /> |
98 | ab3fae7b | Christos Stathis | <path refid="project.class.path"/> |
99 | ab3fae7b | Christos Stathis | <pathelement path="${src.dir}" /> |
100 | ab3fae7b | Christos Stathis | </classpath>
|
101 | ab3fae7b | Christos Stathis | </java>
|
102 | ab3fae7b | Christos Stathis | <!--move file="${gwt.www.dir}/${gwt.module}/${gwt.module.class}.html" tofile="${gwt.www.dir}/${gwt.module}/index.html"/-->
|
103 | ab3fae7b | Christos Stathis | </target>
|
104 | ab3fae7b | Christos Stathis | |
105 | 6084aa02 | Christos Stathis | <target name="uploadToVM" depends="gwt-compile"> |
106 | 6084aa02 | Christos Stathis | <scp todir="chstath@pithos.dev.grnet.gr:/var/www/pithos_web_client" keyfile="/home/chstath/.ssh/id_rsa" passphrase="r0bax45"> |
107 | 6084aa02 | Christos Stathis | <fileset dir="${gwt.www.dir}/${gwt.module}"/> |
108 | 6084aa02 | Christos Stathis | </scp>
|
109 | 6084aa02 | Christos Stathis | </target>
|
110 | 6084aa02 | Christos Stathis | |
111 | ab3fae7b | Christos Stathis | <target name="clean" description="Delete all build artifacts"> |
112 | ab3fae7b | Christos Stathis | <delete dir="${build.dir}"/> |
113 | ab3fae7b | Christos Stathis | </target>
|
114 | ab3fae7b | Christos Stathis | |
115 | ab3fae7b | Christos Stathis | <target name="distclean" depends="clean" description="Delete all downloaded dependencies"> |
116 | ab3fae7b | Christos Stathis | <delete dir="${deps.dir}"/> |
117 | ab3fae7b | Christos Stathis | </target>
|
118 | ab3fae7b | Christos Stathis | |
119 | ab3fae7b | Christos Stathis | <target name="run-web-dev-mode" description="Run web client in development mode"> |
120 | ab3fae7b | Christos Stathis | <java fork="true" classname="com.google.gwt.dev.DevMode" spawn="true"> |
121 | ab3fae7b | Christos Stathis | <classpath>
|
122 | ab3fae7b | Christos Stathis | <pathelement location="${src.dir}"/> |
123 | ab3fae7b | Christos Stathis | <pathelement location="${build.classes.dir}"/> |
124 | ab3fae7b | Christos Stathis | <pathelement path="${gwt.home}/gwt-dev.jar"/> |
125 | ab3fae7b | Christos Stathis | <pathelement location="${deps.dir}/${gwtquery.filename}"/> |
126 | ab3fae7b | Christos Stathis | <pathelement location="${deps.dir}/${gwtquery-draggable-plugin.filename}"/> |
127 | ab3fae7b | Christos Stathis | <pathelement location="${deps.dir}/${gwtquery-droppable-plugin.filename}"/> |
128 | ab3fae7b | Christos Stathis | <pathelement location="${gwt-gears.home}/gwt-gears.jar"/> |
129 | ab3fae7b | Christos Stathis | <pathelement path="${gwt.home}/gwt-user.jar" /> |
130 | ab3fae7b | Christos Stathis | <path refid="project.class.path"/> |
131 | ab3fae7b | Christos Stathis | </classpath>
|
132 | ab3fae7b | Christos Stathis | <jvmarg value="-Xmx256M"/> |
133 | ab3fae7b | Christos Stathis | <jvmarg value="-Xdebug"/> |
134 | ab3fae7b | Christos Stathis | <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=55555"/> |
135 | ab3fae7b | Christos Stathis | <arg value="-war"/> |
136 | ab3fae7b | Christos Stathis | <arg value="${gwt.www.dir}/${gwt.module}"/> |
137 | 6084aa02 | Christos Stathis | <arg value="-noserver"/> |
138 | ab3fae7b | Christos Stathis | <arg value="-startupUrl"/> |
139 | 6084aa02 | Christos Stathis | <arg value="http://127.0.0.1:8080/client/GSS.html"/> |
140 | ab3fae7b | Christos Stathis | <arg value="${gwt.module}"/> |
141 | ab3fae7b | Christos Stathis | </java>
|
142 | ab3fae7b | Christos Stathis | </target>
|
143 | ab3fae7b | Christos Stathis | </project> |