Subversion Repositories SmartDukaan

Rev

Rev 328 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?xml version="1.0"?>
<project default="main">
        <!-- Configure properties to access the Manager application -->
        <property name="url"      value="http://localhost:8080/manager"/>
        <property name="username" value="tomcat"/>
        <property name="password" value="123456"/>
        
        <!-- Configure the context path for this application -->
        <property name="path"     value="/content"/>
        
        <!-- Configure the custom Ant tasks for the Manager application -->
        <taskdef name="deploy"    classname="org.apache.catalina.ant.DeployTask"/>
        <taskdef name="list"      classname="org.apache.catalina.ant.ListTask"/>
        <taskdef name="reload"    classname="org.apache.catalina.ant.ReloadTask"/>
        <taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"/>
        <taskdef name="roles"     classname="org.apache.catalina.ant.RolesTask"/>
        <taskdef name="start"     classname="org.apache.catalina.ant.StartTask"/>
        <taskdef name="stop"      classname="org.apache.catalina.ant.StopTask"/>
        <taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask"/>
          
        <property name="message" 
                value="Building and Deploying the ContentCreation.war"/>
        
        <target name="main" depends="clean, compress, undeploy, deploy">
                <echo>
                        ${message}
                </echo>
        </target>
        
    <target name="clean">
                <delete dir="build"/>
        </target>       
        
        <target name="compress">
                <mkdir dir="build"/>
                <mkdir dir="build/WEB-INF"/>
                <mkdir dir="build/WEB-INF/lib"/>
                <mkdir dir="build/WEB-INF/classes"/>
                <mkdir dir="build/WEB-INF/content"/>
        
                <copy file="src/xml/config/web.xml" tofile="build/WEB-INF/web.xml"/>
                
                <copy file="src/xml/config/struts.xml" 
                        tofile="build/WEB-INF/classes/struts.xml"/>
                
        <copy file="src/jsp/index.jsp" tofile="build/index.jsp"/>
                        
                <copy todir="build/WEB-INF/content">
                        <fileset dir="src/velocity"/>
                </copy>
                
        <copy todir="build/jquery">
            <fileset dir="src/jquery"/>
        </copy>

        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/commons-beanutils-1.7.0.jar" 
            tofile="build/WEB-INF/lib/commons-beanutils-1.7.0.jar"/>

        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/commons-lang-2.3.jar" 
            tofile="build/WEB-INF/lib/commons-lang-2.3.jar"/>
                               
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/ognl-2.7.3.jar" 
            tofile="build/WEB-INF/lib/ognl-2.7.3.jar"/>
                                                 
        <copy file="/home/naveen/workspace/Velocity/velocity-1.6.3/velocity-1.6.3.jar" 
            tofile="build/WEB-INF/lib/velocity-1.6.3.jar"/>
                                  
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/xwork-core-2.1.6.jar" 
            tofile="build/WEB-INF/lib/xwork-core-2.1.6.jar"/>
                      
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/commons-collections-3.2.jar" 
            tofile="build/WEB-INF/lib/commons-collections-3.2.jar"/>
                         
        <copy file="/usr/share/java/commons-logging-1.1.1.jar" 
            tofile="build/WEB-INF/lib/commons-logging-1.1.1.jar"/>
                        
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/struts2-convention-plugin-2.1.8.1.jar" 
            tofile="build/WEB-INF/lib/struts2-convention-plugin-2.1.8.1.jar"/>
                      
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/commons-digester-2.0.jar" 
            tofile="build/WEB-INF/lib/commons-digester-2.0.jar"/>
                            
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/ezmorph-1.0.3.jar" 
            tofile="build/WEB-INF/lib/ezmorph-1.0.3.jar"/>
                                
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/struts2-core-2.1.8.1.jar" 
            tofile="build/WEB-INF/lib/struts2-core-2.1.8.1.jar"/>
                                     
        <copy file="/home/naveen/workspace/Velocity/velocity-tools-1.4/lib/velocity-tools-1.4.jar" 
            tofile="build/WEB-INF/lib/velocity-tools-1.4.jar"/>
                      
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/commons-fileupload-1.2.1.jar" 
            tofile="build/WEB-INF/lib/commons-fileupload-1.2.1.jar"/>
                        
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/freemarker-2.3.15.jar" 
            tofile="build/WEB-INF/lib/freemarker-2.3.15.jar"/>
                            
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/struts2-rest-plugin-2.1.8.1.jar" 
            tofile="build/WEB-INF/lib/struts2-rest-plugin-2.1.8.1.jar"/>
                              
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/xpp3_min-1.1.3.4.O.jar" 
            tofile="build/WEB-INF/lib/xpp3_min-1.1.3.4.O.jar"/>
                      
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/commons-io-1.3.2.jar" 
            tofile="build/WEB-INF/lib/commons-io-1.3.2.jar"/>
                                
        <copy file="/var/lib/tomcat6/webapps200510/struts2-rest-showcase-2.1.8.1/WEB-INF/lib/json-lib-2.1-jdk15.jar" 
            tofile="build/WEB-INF/lib/json-lib-2.1-jdk15.jar"/>
                                         
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/xstream-1.2.2.jar" 
            tofile="build/WEB-INF/lib/xstream-1.2.2.jar"/>
                      
                <copy todir="build/WEB-INF/classes">
                        <fileset dir="bin">
                                <include name="**/*.class"/>
                        </fileset>
                </copy>
        
        <copy file="../webapp/ContentModel.jar" 
                        tofile="build/WEB-INF/lib/ContentModel.jar"/>
                
                <war 
                        destfile="ContentCreation.war" 
                        basedir="build"/>
        </target>

        <target name="deploy" description="Install web application"
                          depends="compress">
                <deploy url="${url}" username="${username}" password="${password}"
                                path="${path}" war="file:ContentCreation.war"/>
        </target>

        <target name="reload" description="Reload web application"
                          depends="compress">
                <reload  url="${url}" username="${username}" password="${password}"
                                path="${path}"/>
        </target>

        <target name="undeploy" description="Remove web application">
                <undeploy url="${url}" username="${username}" password="${password}"
                                path="${path}"/>
        </target>

</project>