Subversion Repositories SmartDukaan

Rev

Rev 315 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
162 naveen 1
<?xml version="1.0"?>
2
<project default="main">
3
	<!-- Configure properties to access the Manager application -->
4
	<property name="url"      value="http://localhost:8080/manager"/>
5
	<property name="username" value="tomcat"/>
6
	<property name="password" value="123456"/>
7
 
8
	<!-- Configure the context path for this application -->
9
	<property name="path"     value="/content"/>
10
 
11
	<!-- Configure the custom Ant tasks for the Manager application -->
12
	<taskdef name="deploy"    classname="org.apache.catalina.ant.DeployTask"/>
13
	<taskdef name="list"      classname="org.apache.catalina.ant.ListTask"/>
14
	<taskdef name="reload"    classname="org.apache.catalina.ant.ReloadTask"/>
15
	<taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"/>
16
	<taskdef name="roles"     classname="org.apache.catalina.ant.RolesTask"/>
17
	<taskdef name="start"     classname="org.apache.catalina.ant.StartTask"/>
18
	<taskdef name="stop"      classname="org.apache.catalina.ant.StopTask"/>
19
	<taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask"/>
20
 
21
	<property name="message" 
22
		value="Building and Deploying the ContentCreation.war"/>
23
 
24
	<target name="main" depends="clean, compress, undeploy, deploy">
25
		<echo>
26
			${message}
27
		</echo>
28
	</target>
29
 
30
    <target name="clean">
31
		<delete dir="build"/>
32
	</target>	
33
 
34
	<target name="compress">
35
		<mkdir dir="build"/>
36
		<mkdir dir="build/WEB-INF"/>
37
		<mkdir dir="build/WEB-INF/lib"/>
38
		<mkdir dir="build/WEB-INF/classes"/>
39
		<mkdir dir="build/WEB-INF/content"/>
40
 
41
		<copy file="src/xml/config/web.xml" tofile="build/WEB-INF/web.xml"/>
42
 
43
		<copy file="src/xml/config/struts.xml" 
44
			tofile="build/WEB-INF/classes/struts.xml"/>
45
 
46
        <copy file="src/jsp/index.jsp" tofile="build/index.jsp"/>
47
 
48
		<copy todir="build/WEB-INF/content">
49
			<fileset dir="src/velocity"/>
50
		</copy>
51
 
52
        <copy todir="build/jquery">
53
            <fileset dir="src/jquery"/>
54
        </copy>
55
 
56
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/commons-beanutils-1.7.0.jar" 
57
            tofile="build/WEB-INF/lib/commons-beanutils-1.7.0.jar"/>
58
 
59
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/commons-lang-2.3.jar" 
60
            tofile="build/WEB-INF/lib/commons-lang-2.3.jar"/>
61
 
62
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/ognl-2.7.3.jar" 
63
            tofile="build/WEB-INF/lib/ognl-2.7.3.jar"/>
64
 
65
        <copy file="/home/naveen/workspace/Velocity/velocity-1.6.3/velocity-1.6.3.jar" 
66
            tofile="build/WEB-INF/lib/velocity-1.6.3.jar"/>
67
 
68
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/xwork-core-2.1.6.jar" 
69
            tofile="build/WEB-INF/lib/xwork-core-2.1.6.jar"/>
70
 
71
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/commons-collections-3.2.jar" 
72
            tofile="build/WEB-INF/lib/commons-collections-3.2.jar"/>
73
 
74
        <copy file="/usr/share/java/commons-logging-1.1.1.jar" 
75
            tofile="build/WEB-INF/lib/commons-logging-1.1.1.jar"/>
76
 
77
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/struts2-convention-plugin-2.1.8.1.jar" 
78
            tofile="build/WEB-INF/lib/struts2-convention-plugin-2.1.8.1.jar"/>
79
 
80
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/commons-digester-2.0.jar" 
81
            tofile="build/WEB-INF/lib/commons-digester-2.0.jar"/>
82
 
83
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/ezmorph-1.0.3.jar" 
84
            tofile="build/WEB-INF/lib/ezmorph-1.0.3.jar"/>
85
 
86
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/struts2-core-2.1.8.1.jar" 
87
            tofile="build/WEB-INF/lib/struts2-core-2.1.8.1.jar"/>
88
 
89
        <copy file="/home/naveen/workspace/Velocity/velocity-tools-1.4/lib/velocity-tools-1.4.jar" 
90
            tofile="build/WEB-INF/lib/velocity-tools-1.4.jar"/>
91
 
92
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/commons-fileupload-1.2.1.jar" 
93
            tofile="build/WEB-INF/lib/commons-fileupload-1.2.1.jar"/>
94
 
95
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/freemarker-2.3.15.jar" 
96
            tofile="build/WEB-INF/lib/freemarker-2.3.15.jar"/>
97
 
98
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/struts2-rest-plugin-2.1.8.1.jar" 
99
            tofile="build/WEB-INF/lib/struts2-rest-plugin-2.1.8.1.jar"/>
100
 
101
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/xpp3_min-1.1.3.4.O.jar" 
102
            tofile="build/WEB-INF/lib/xpp3_min-1.1.3.4.O.jar"/>
103
 
104
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/commons-io-1.3.2.jar" 
105
            tofile="build/WEB-INF/lib/commons-io-1.3.2.jar"/>
106
 
107
        <copy file="/var/lib/tomcat6/webapps200510/struts2-rest-showcase-2.1.8.1/WEB-INF/lib/json-lib-2.1-jdk15.jar" 
108
            tofile="build/WEB-INF/lib/json-lib-2.1-jdk15.jar"/>
109
 
110
        <copy file="/home/naveen/workspace/struts-2.1.8.1/lib/xstream-1.2.2.jar" 
111
            tofile="build/WEB-INF/lib/xstream-1.2.2.jar"/>
112
 
113
		<copy todir="build/WEB-INF/classes">
114
			<fileset dir="bin">
115
				<include name="**/*.class"/>
116
			</fileset>
117
		</copy>
118
 
119
        <copy file="../webapp/ContentModel.jar" 
120
			tofile="build/WEB-INF/lib/ContentModel.jar"/>
121
 
122
		<war 
123
			destfile="ContentCreation.war" 
124
			basedir="build"/>
125
	</target>
126
 
127
	<target name="deploy" description="Install web application"
128
			  depends="compress">
129
		<deploy url="${url}" username="${username}" password="${password}"
130
				path="${path}" war="file:ContentCreation.war"/>
131
	</target>
132
 
133
	<target name="reload" description="Reload web application"
134
			  depends="compress">
135
		<reload  url="${url}" username="${username}" password="${password}"
136
				path="${path}"/>
137
	</target>
138
 
139
	<target name="undeploy" description="Remove web application">
140
		<undeploy url="${url}" username="${username}" password="${password}"
141
				path="${path}"/>
142
	</target>
143
 
144
</project>