<?xml version="1.0" encoding="utf-8" ?>
-<project name="pithos" default="gwt-compile" basedir=".">
+<project name="pithos" default="main" basedir=".">
<description>The Pithos web client project build file</description>
<property file="build.properties"/>
+ <property file="runtime.properties"/>
<property name="deps.dir" value="dependencies"/>
- <property name="gwt.workers" value="1"/>
+ <property name="gwt.workers" value="2"/>
- <property name="gwt.version" value="2.1.1"/>
+ <property name="gwt.version" value="2.4.0"/>
<property name="gwt.home" value="${deps.dir}/gwt-${gwt.version}"/>
<property name="gwt.filename" value="gwt-${gwt.version}.zip"/>
<property name="gwt.download.url" value="http://google-web-toolkit.googlecode.com/files/${gwt.filename}"/>
- <property name="gwt-gears.version" value="1.3.0"/>
- <property name="gwt-gears.home" value="${deps.dir}/gwt-gears-${gwt-gears.version}" />
- <property name="gwt-gears.filename" value="gwt-gears-${gwt-gears.version}.zip"/>
- <property name="gwt-gears.download.url" value="http://gwt-google-apis.googlecode.com/files/${gwt-gears.filename}"/>
-
- <property name="gwtquery.filename" value="gwtquery-1.0.0-20110116.074055-7.jar"/>
- <property name="gwtquery.download.url" value="http://gss.googlecode.com/hg/lib/${gwtquery.filename}?r=0473a2c1bc32c9426423f8ca3b688a29ce30216b"/>
- <property name="gwtquery-draggable-plugin.filename" value="draggable-plugin-1.0.2.jar"/>
- <property name="gwtquery-draggable-plugin.download.url" value="http://gss.googlecode.com/hg/lib/${gwtquery-draggable-plugin.filename}?r=0634eeeeaaad1b9bfb7a8e809bfc9e9545d208e2"/>
- <property name="gwtquery-droppable-plugin.filename" value="droppable-plugin-1.0.2.jar"/>
- <property name="gwtquery-droppable-plugin.download.url" value="http://gss.googlecode.com/hg/lib/${gwtquery-droppable-plugin.filename}?r=c8bca56a1c4ab780ac0d0cc72a2b40b60d7ca4f7"/>
-
<property name="gwt.module.class" value="Pithos" />
<property name="gwt.root.package" value="gr.grnet.pithos.web" />
<property name="gwt.root.path" value="gr/grnet/pithos/web" />
<condition property="dependencies.present">
<and>
<available file="${gwt.home}" type="dir"/>
- <available file="${gwt-gears.home}" type="dir"/>
- <available file="${deps.dir}/${gwtquery.filename}"/>
- <available file="${deps.dir}/${gwtquery-draggable-plugin.filename}"/>
- <available file="${deps.dir}/${gwtquery-droppable-plugin.filename}"/>
</and>
</condition>
<echo message="dependencies.present=${dependencies.present}"/>
<target name="fetch-dependencies" unless="dependencies.present" description="Fetch the dpendencies if not present" depends="check-dependencies">
<mkdir dir="${deps.dir}"/>
<get src="${gwt.download.url}" dest="${deps.dir}/${gwt.filename}" usetimestamp="true"/>
- <get src="${gwt-gears.download.url}" dest="${deps.dir}/${gwt-gears.filename}" usetimestamp="true"/>
- <get src="${gwtquery.download.url}" dest="${deps.dir}/${gwtquery.filename}" usetimestamp="true"/>
- <get src="${gwtquery-draggable-plugin.download.url}" dest="${deps.dir}/${gwtquery-draggable-plugin.filename}" usetimestamp="true"/>
- <get src="${gwtquery-droppable-plugin.download.url}" dest="${deps.dir}/${gwtquery-droppable-plugin.filename}" usetimestamp="true"/>
<unzip src="${deps.dir}/${gwt.filename}" dest="${gwt.home}/.."/>
- <unzip src="${deps.dir}/${gwt-gears.filename}" dest="${gwt-gears.home}/.."/>
</target>
<target name="check-gwt-compile" description="Checks is the web gwt client sources are up-to-date with the compiled artifacts">
<classpath>
<pathelement path="${gwt.home}/gwt-dev.jar"/>
- <pathelement location="${deps.dir}/${gwtquery.filename}"/>
- <pathelement location="${deps.dir}/${gwtquery-droppable-plugin.filename}"/>
- <pathelement location="${deps.dir}/${gwtquery-draggable-plugin.filename}"/>
- <pathelement location="${gwt-gears.home}/gwt-gears.jar"/>
<pathelement path="${gwt.home}/gwt-user.jar" />
<path refid="project.class.path"/>
<pathelement path="${src.dir}" />
</classpath>
</java>
- <!--move file="${gwt.www.dir}/${gwt.module}/${gwt.module.class}.html" tofile="${gwt.www.dir}/${gwt.module}/index.html"/-->
</target>
+
+ <target name="main" depends="gwt-compile">
+ <!--Fix the index html file variables -->
+ <replaceregexp file="${gwt.www.dir}/${gwt.module}/index.html"
+ match="CLOUDBAR_ACTIVE_SERVICE = (.*)"
+ replace="CLOUDBAR_ACTIVE_SERVICE = '${CLOUDBAR_ACTIVE_SERVICE}';"
+ byline="true"
+ />
+ <replaceregexp file="${gwt.www.dir}/${gwt.module}/index.html"
+ match="CLOUDBAR_LOCATION = (.*)"
+ replace="CLOUDBAR_LOCATION = "${CLOUDBAR_LOCATION}";"
+ byline="true"
+ />
+ <replaceregexp file="${gwt.www.dir}/${gwt.module}/index.html"
+ match="CLOUDBAR_SERVICES = (.*)"
+ replace="CLOUDBAR_SERVICES = "${CLOUDBAR_SERVICES}";"
+ byline="true"
+ />
+ <replaceregexp file="${gwt.www.dir}/${gwt.module}/index.html"
+ match="CLOUDBAR_MENU = (.*)"
+ replace="CLOUDBAR_MENU = "${CLOUDBAR_MENU}";"
+ byline="true"
+ />
+ <replaceregexp file="${gwt.www.dir}/${gwt.module}/index.html"
+ match="loginUrl: (.*)"
+ replace="loginUrl: "${loginUrl}","
+ byline="true"
+ />
+ <replaceregexp file="${gwt.www.dir}/${gwt.module}/index.html"
+ match="feedbackUrl: (.*)"
+ replace="feedbackUrl: "${feedbackUrl}","
+ byline="true"
+ />
+ <replaceregexp file="${gwt.www.dir}/${gwt.module}/index.html"
+ match="authCookie: (.*)"
+ replace="authCookie: "${authCookie}","
+ byline="true"
+ />
+ <replaceregexp file="${gwt.www.dir}/${gwt.module}/index.html"
+ match="version: (.*)"
+ replace="version: "${version}""
+ byline="true"
+ />
+ </target>
- <target name="uploadToVM" depends="gwt-compile">
- <scp todir="chstath@pithos.dev.grnet.gr:/var/www/pithos_web_client" keyfile="/home/chstath/.ssh/id_rsa" passphrase="r0bax45">
+ <target name="uploadToVM" depends="main">
+ <scp todir="chstath@pithos.dev.grnet.gr:/var/www/pithos_web_client" keyfile="${ssh.key}" passphrase="${passphrase}">
<fileset dir="${gwt.www.dir}/${gwt.module}"/>
</scp>
</target>
+ <target name="uploadCSSToVM">
+ <scp todir="chstath@pithos.dev.grnet.gr:/var/www/pithos_web_client" keyfile="${ssh.key}" passphrase="${passphrase}">
+ <fileset dir="${src.dir}/${gwt.root.path}/public" includes="pithos.css"/>
+ </scp>
+ </target>
+
+ <target name="rsyncToDev84">
+ <exec executable="${basedir}/rsync-to-dev84.sh"></exec>
+ </target>
+
<target name="clean" description="Delete all build artifacts">
<delete dir="${build.dir}"/>
</target>
<pathelement location="${src.dir}"/>
<pathelement location="${build.classes.dir}"/>
<pathelement path="${gwt.home}/gwt-dev.jar"/>
- <pathelement location="${deps.dir}/${gwtquery.filename}"/>
- <pathelement location="${deps.dir}/${gwtquery-draggable-plugin.filename}"/>
- <pathelement location="${deps.dir}/${gwtquery-droppable-plugin.filename}"/>
- <pathelement location="${gwt-gears.home}/gwt-gears.jar"/>
<pathelement path="${gwt.home}/gwt-user.jar" />
<path refid="project.class.path"/>
</classpath>
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=55555"/>
<arg value="-war"/>
- <arg value="${gwt.www.dir}/${gwt.module}"/>
+ <arg value="${gwt.www.dir}"/>
<arg value="-noserver"/>
<arg value="-startupUrl"/>
- <arg value="http://127.0.0.1:8080/client/pithos.html"/>
+ <arg value="http://127.0.0.1:8080/client"/>
<arg value="${gwt.module}"/>
</java>
</target>