Subversion Repositories eFlore/Applications.del

Rev

Rev 393 | Rev 562 | 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=".">

        <target name="init">
                <property file="local.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="gwt-path" value="${gwt-path}" />
        </target>

        <target name="gwt-compile" depends="init">
                <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" />
                                        <fileset dir="lib">
                                                <include name="**/*.jar" />
                                        </fileset>
                                </path>
                        </classpath>
                </java>
        </target>

        <target name="generate-vocabulary" depends="init">

                <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" depends="init">

                <ftp action="del" server="${server-url}" remotedir="${server-dir}/client/" userid="${server-login}" password="${server-password}">
                        <fileset dir="war">
                                <include name="**" />
                        </fileset>
                </ftp>
                <ftp server="${server-url}" remotedir="${server-dir}/client/" userid="${server-login}" password="${server-password}">
                        <fileset dir="war" excludes="*.svn">
                                <include name="del.css" />
                                <include name="del.html" />
                                <include name="proxy.php" />
                        </fileset>
                </ftp>
                <ftp server="${server-url}" remotedir="${server-dir}/client/del" userid="${server-login}" password="${server-password}">
                        <fileset dir="war/del" excludes="*.svn" />
                </ftp>
                <ftp server="${server-url}" remotedir="${server-dir}/client/img" userid="${server-login}" password="${server-password}">
                        <fileset dir="war/img" excludes="*.svn" />
                </ftp>
                <ftp server="${server-url}" remotedir="${server-dir}/client/WEB-INF" userid="${server-login}" password="${server-password}">
                        <fileset dir="war/WEB-INF" excludes="*.svn">
                                <exclude name="lib/*.jar" />
                        </fileset>
                </ftp>

                <ftp server="${server-url}" remotedir="${server-dir}/jrest" userid="${server-login}" password="${server-password}">
                        <fileset dir="jrest" excludes="*.svn">
                                <include name="**" />
                                <exclude name="*.ini.php" />
                                <exclude name=".htaccess" />
                        </fileset>
                </ftp>
                
<!--
                <scp password="${server-password}" todir="${server-login}@${server-url}:${server-dir}" trust="true" verbose="true">
                                        <fileset dir="war" excludes="*.svn" />
                                </scp>
                                -->
        </target>

        <target name="build-and-deploy-local" depends="gwt-compile, deploy-local">

        </target>

        <target name="deploy-local" depends="init">
                <delete dir="${local-deploy-path}">
                </delete>
                <filter token="webservices.root.url" value="${webservices.root.url}" />
                <filter token="local-deploy-path" value="${local-deploy-path}" />
                <copy todir="${local-deploy-path}" filtering="true">
                        <fileset dir="war" excludes="*.svn">
                                <include name="**/*.html" />
                                <include name="**/*.js" />
                                <include name="**/*.css" />
                                <exclude name="**/*.gif" />
                                <exclude name="**/*.png" />
                                <exclude name="**/*.jpg" />
                        </fileset>
                </copy>

                <copy todir="${local-deploy-path}">
                        <fileset dir="war">
                                <exclude name="**/*.html" />
                                <exclude name="**/*.js" />
                                <exclude name="**/*.css" />
                                <include name="**/*.gif" />
                                <include name="**/*.png" />
                                <include name="**/*.jpg" />
                        </fileset>
                </copy>
                <copy todir="${local-deploy-path}/jrest" filtering="true">
                        <fileset dir="jrest" excludes="*.svn" />
                </copy>
        </target>

        <target name="hosted-mode" depends="init">
                <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">
                <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>