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