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