Rev 1012 | Rev 2046 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<project name="del" xmlns:artifact="urn:maven-artifact-ant" basedir=".">
<property file="build.properties"/>
<path id="gwt">
<fileset includes="*.jar" dir="${user.home}/gwt/build/lib"/>
<fileset includes="cobogw-1.3.2.jar" dir="${user.home}"/>
<pathelement location="src" />
</path>
<target name="quick">
<java classname="com.google.gwt.dev.Compiler" fork="true">
<arg line="-style DETAILED -draftCompile ${projectTestName}" />
<classpath refid="gwt"/>
</java>
</target>
<target name="compile">
<!-- <java classname="com.google.gwt.dev.GWTCompiler" fork="true"> -->
<java classname="com.google.gwt.dev.Compiler" fork="true">
<arg line="-localWorkers 2 -style DETAILED ${projectName}"/>
<!-- <arg line="-out build/gwtOutput"/> -->
<classpath refid="gwt"/>
</java>
</target>
<target name="init-local-properties">
<property file="local.properties" />
<property name="gwt-path" value="${gwt-path}" />
<property name="webservices-root-url" value="${webservices-root-url}" />
</target>
<target name="init-server-properties">
<property file="server.properties" />
<property name="server-url" value="${server-url}" />
<property name="server-login" value="${server-login}" />
<property name="server-password" value="${server-password}" />
<property name="server-dir" value="${server-dir}" />
<property name="webservices-root-url" value="${webservices-root-url}" />
</target>
<target name="gwt-compile" depends="init-local-properties">
<java classname="com.google.gwt.dev.Compiler" fork="true">
<arg line="-logLevel INFO" />
<arg line="-style OBF" />
<arg value="org.tela_botanica.del.Del" />
<classpath>
<path>
<pathelement location="${gwt-path}/gwt-user.jar" />
<pathelement location="${gwt-path}/gwt-dev.jar" />
<pathelement location="${gwt-path}/validation-api-1.0.0.GA-sources.jar" />
<pathelement location="${gwt-path}/validation-api-1.0.0.GA.jar" />
<pathelement location="src" />
<pathelement location="war/WEB-INF/classes" />
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
</classpath>
</java>
</target>
<target name="generate-vocabulary" depends="init-local-properties">
<java classname="com.google.gwt.i18n.tools.I18NSync" fork="true">
<arg value="org.tela_botanica.del.client.i18n.Vocabulary" />
<classpath>
<path>
<pathelement location="${gwt-path}/gwt-user.jar" />
<pathelement location="${gwt-path}/gwt-dev.jar" />
<pathelement location="src" />
</path>
</classpath>
</java>
</target>
<target name="build-and-deploy-test-server">
<antcall target="gwt-compile" />
<antcall target="remove-server-files" />
<antcall target="copy-javascript-files-to-server" />
<antcall target="copy-img-files-to-server" />
<antcall target="copy-php-files-to-server" />
<antcall target="copy-config-files-to-server" />
</target>
<target name="remove-server-files" depends="init-server-properties">
<!-- Avant de redeployer supprime sur le serveur tous les fichiers et repertoires sauf ceux configures pour apache-->
<ftp action="del" server="${server-url}" remotedir="${server-dir}/" userid="${server-login}" password="${server-password}">
<fileset>
<include name="**/*" />
<exclude name="services/framework.php" />
<exclude name="services/configurations/*" />
</fileset>
</ftp>
</target>
<target name="copy-javascript-files-to-server" depends="init-server-properties">
<ftp server="${server-url}" remotedir="${server-dir}/" userid="${server-login}" password="${server-password}">
<fileset dir="war">
<exclude name="config/*" />
<exclude name="org.tela_botanica.del.Del.JUnit/*" />
<exclude name="WEB-INF/**" />
<exclude name="img/*" />
</fileset>
</ftp>
</target>
<target name="copy-img-files-to-server" depends="init-server-properties">
<ftp server="${server-url}" remotedir="${server-dir}/img" userid="${server-login}" password="${server-password}">
<fileset dir="war/img">
</fileset>
</ftp>
</target>
<target name="copy-php-files-to-server" depends="init-server-properties">
<ftp server="${server-url}" remotedir="${server-dir}/services" userid="${server-login}" password="${server-password}">
<fileset dir="services" excludes="*.svn">
<include name="**/*" />
<exclude name="configurations/*" />
<exclude name="framework.php" />
</fileset>
</ftp>
</target>
<target name="copy-config-files-to-server" depends="init-server-properties">
<filter token="webservices-root-url" value="${webservices-root-url}" />
<delete failonerror="false">
<fileset dir="target">
</fileset>
</delete>
<copy file="war/config/config.defaut.js" tofile="target/config/config.js" filtering="true" />
<copy file="war/config/apropos.defaut.js" tofile="target/config/apropos.js" filtering="true" />
<ftp server="${server-url}" remotedir="${server-dir}/config" userid="${server-login}" password="${server-password}">
<fileset dir="target/config" excludes="*.svn" />
</ftp>
</target>
<target name="build-and-deploy-local">
<antcall target="gwt-compile" />
<antcall target="deploy-local" />
</target>
<target name="deploy-local" depends="init-local-properties">
<delete dir="${local-deploy-path}" />
<copy todir="${local-deploy-path}">
<fileset dir="war" excludes="*.svn">
</fileset>
</copy>
<antcall target="filter-local-config-files">
</antcall>
<copy todir="${local-deploy-path}/config" filtering="true">
<fileset dir="war/config" excludes="*.svn" />
</copy>
</target>
<target name="filter-local-config-files" depends="init-local-properties">
<filter token="webservices-root-url" value="${webservices-root-url}" />
<copy flatten="true" file="war/config/config.defaut.js" tofile="war/config/config.js" filtering="true" />
<copy flatten="true" file="war/config/apropos.defaut.js" tofile="war/config/apropos.js" filtering="true" />
</target>
<target name="hosted-mode" depends="init-local-properties">
<java classname="com.google.gwt.dev.DevMode" fork="true">
<arg line="-noserver -port 80 -war '${local-deploy-path}/del' -startupUrl del/del.html -logLevel INFO -codeServerPort 9997 org.tela_botanica.del.Del" />
<classpath>
<path>
<pathelement location="${gwt-path}/gwt-user.jar" />
<pathelement location="${gwt-path}/gwt-dev.jar" />
<pathelement location="${gwt-path}/validation-api-1.0.0.GA-sources.jar" />
<pathelement location="${gwt-path}/validation-api-1.0.0.GA.jar" />
<pathelement location="src" />
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
</classpath>
</java>
</target>
<!-- In order to execute task you must execute a remote java application in your debug configuration on default port 8000-->
<target name="debug-mode" depends="init-local-properties">
<java classname="com.google.gwt.dev.DevMode" fork="true">
<jvmarg value="-Xdebug" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" />
<arg line="-noserver -port 80 -war '${local-deploy-path}/del' -startupUrl del/del.html -logLevel INFO -codeServerPort 9997 org.tela_botanica.del.Del" />
<classpath>
<path>
<pathelement location="${gwt-path}/gwt-user.jar" />
<pathelement location="${gwt-path}/gwt-dev.jar" />
<pathelement location="${gwt-path}/validation-api-1.0.0.GA-sources.jar" />
<pathelement location="${gwt-path}/validation-api-1.0.0.GA.jar" />
<pathelement location="src" />
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
</classpath>
</java>
</target>
</project>