Subversion Repositories SmartDukaan

Rev

Rev 832 | Rev 942 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
317 ashish 1
<?xml version="1.0"?>
2
 
3
 
4
<!-- ====================================================================== 
325 ashish 5
     Date:     June 2010
317 ashish 6
 
325 ashish 7
     Project:  Website
317 ashish 8
 
325 ashish 9
     Author:   Ashish Singh
317 ashish 10
     ====================================================================== -->
11
 
12
 
13
 
318 ashish 14
<project name="Website" default="archive" basedir=".">
317 ashish 15
 
16
    <description>
318 ashish 17
           Shop2020 Website
317 ashish 18
    </description>
19
 
20
	<property file="build.properties"/>
21
 
318 ashish 22
	<path id="Web App Libraries.libraryclasspath"/>
23
	    <path id="EAR Libraries.libraryclasspath"/>
24
	    <path id="Website.classpath">
25
	        <pathelement location="build/classes"/>
26
	        <path refid="Web App Libraries.libraryclasspath"/>
27
	        <path refid="EAR Libraries.libraryclasspath"/>
28
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-collections-3.2.1/commons-collections-3.2.1.jar"/>
29
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-fileupload-1.2.1/commons-fileupload-1.2.1.jar"/>
30
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-io-1.3.2/commons-io-1.3.2.jar"/>
31
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-lang-2.4/commons-lang-2.4.jar"/>
32
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-logging-1.0.4/commons-logging-1.0.4.jar"/>
33
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-logging-api-1.1/commons-logging-api-1.1.jar"/>
34
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-validator-1.3.1/commons-validator-1.3.1.jar"/>
35
	        <pathelement location="${thirdparty.location}/readonly/apache/jsp-2.1/jsp-api.jar"/>
36
	        <pathelement location="${thirdparty.location}/readonly/apache/sevlet-2.5/servlet-api.jar"/>
37
	        <pathelement location="${thirdparty.location}/readonly/apache/struts-2.1.8.1/struts2-convention-plugin-2.1.8.1.jar"/>
38
	        <pathelement location="${thirdparty.location}/readonly/apache/struts-2.1.8.1/struts2-core-2.1.8.1.jar"/>
39
	        <pathelement location="${thirdparty.location}/readonly/apache/struts-2.1.8.1/struts2-rest-plugin-2.1.8.1.jar"/>
40
	        <pathelement location="${thirdparty.location}/readonly/apache/struts-2.1.8.1/xstream-1.2.2.jar"/>
41
	        <pathelement location="${thirdparty.location}/readonly/apache/struts-2.1.8.1/xwork-core-2.1.6.jar"/>
42
	        <pathelement location="${thirdparty.location}/readonly/apache/tomcat-juli/tomcat-juli.jar"/>
43
	        <pathelement location="${thirdparty.location}/readonly/apache/velocity-1.6.3/velocity-1.6.3.jar"/>
44
	        <pathelement location="${thirdparty.location}/readonly/apache/velocity-1.6.3/velocity-tools-1.4.jar"/>
45
	        <pathelement location="${thirdparty.location}/readonly/freemarker/freemarker-2.3.15.jar"/>
46
	        <pathelement location="${thirdparty.location}/readonly/apache/ezmorph/ezmorph-1.0.3.jar"/>
47
	        <pathelement location="${thirdparty.location}/readonly/apache/json/json-lib-2.1-jdk15.jar"/>
48
	        <pathelement location="${thirdparty.location}/readonly/apache/ognl/ognl-2.7.3.jar"/>
49
	        <pathelement location="${thirdparty.location}/readonly/apache/xpp/xpp3_min-1.1.3.4.O.jar"/>
50
	        <pathelement location="${thirdparty.location}/readonly/apache/commons-digester-2.0/commons-digester-2.0.jar"/>
556 chandransh 51
		    <pathelement location="${thirdparty.location}/readonly/apache/thrift-0.2.0/libthrift.jar"/>
52
		    <pathelement location="${thirdparty.location}/readonly/slf4j/slf4j-api-1.5.8.jar"/>
53
		    <pathelement location="${thirdparty.location}/readonly/slf4j/slf4j-simple-1.5.8.jar"/>
832 rajveer 54
	    	<pathelement location="${thirdparty.location}/readonly/apache/log4j/log4j-1.2.16.jar"/>
556 chandransh 55
	    	<pathelement location="${thirdparty.location}/readonly/apache/commons-codec-1.4/commons-codec-1.4.jar"/>
395 rajveer 56
			<pathelement location="${thirdparty.location}/Common.jar"/>
57
			<pathelement location="${thirdparty.location}/ThriftConfig.jar"/>
421 rajveer 58
			<pathelement location="${thirdparty.location}/readonly/payment/payments.jar"/>
877 vikas 59
	    	<pathelement location="${thirdparty.location}/readonly/yuicompressor-2.4.2/yuicompressor-2.4.2.jar"/>
421 rajveer 60
 
318 ashish 61
	    </path>
317 ashish 62
 
318 ashish 63
		<filelist id="Website.libs">
64
		        <file name="${thirdparty.location}/readonly/apache/commons-collections-3.2.1/commons-collections-3.2.1.jar"/>
65
		        <file name="${thirdparty.location}/readonly/apache/commons-fileupload-1.2.1/commons-fileupload-1.2.1.jar"/>
66
		        <file name="${thirdparty.location}/readonly/apache/commons-io-1.3.2/commons-io-1.3.2.jar"/>
67
		        <file name="${thirdparty.location}/readonly/apache/commons-lang-2.4/commons-lang-2.4.jar"/>
68
		        <file name="${thirdparty.location}/readonly/apache/commons-logging-1.0.4/commons-logging-1.0.4.jar"/>
69
		        <file name="${thirdparty.location}/readonly/apache/commons-logging-api-1.1/commons-logging-api-1.1.jar"/>
70
		        <file name="${thirdparty.location}/readonly/apache/commons-validator-1.3.1/commons-validator-1.3.1.jar"/>
71
		        <file name="${thirdparty.location}/readonly/apache/jsp-2.1/jsp-api.jar"/>
72
		        <file name="${thirdparty.location}/readonly/apache/struts-2.1.8.1/struts2-convention-plugin-2.1.8.1.jar"/>
73
		        <file name="${thirdparty.location}/readonly/apache/struts-2.1.8.1/struts2-core-2.1.8.1.jar"/>
74
		        <file name="${thirdparty.location}/readonly/apache/struts-2.1.8.1/struts2-rest-plugin-2.1.8.1.jar"/>
75
		        <file name="${thirdparty.location}/readonly/apache/struts-2.1.8.1/xstream-1.2.2.jar"/>
76
		        <file name="${thirdparty.location}/readonly/apache/struts-2.1.8.1/xwork-core-2.1.6.jar"/>
77
		        <file name="${thirdparty.location}/readonly/apache/tomcat-juli/tomcat-juli.jar"/>
78
		        <file name="${thirdparty.location}/readonly/apache/velocity-1.6.3/velocity-1.6.3.jar"/>
79
		        <file name="${thirdparty.location}/readonly/apache/velocity-1.6.3/velocity-tools-1.4.jar"/>
80
		        <file name="${thirdparty.location}/readonly/freemarker/freemarker-2.3.15.jar"/>
81
		        <file name="${thirdparty.location}/readonly/apache/ezmorph/ezmorph-1.0.3.jar"/>
82
		        <file name="${thirdparty.location}/readonly/apache/json/json-lib-2.1-jdk15.jar"/>
83
		        <file name="${thirdparty.location}/readonly/apache/ognl/ognl-2.7.3.jar"/>
84
		        <file name="${thirdparty.location}/readonly/apache/xpp/xpp3_min-1.1.3.4.O.jar"/>
85
		        <file name="${thirdparty.location}/readonly/apache/commons-digester-2.0/commons-digester-2.0.jar"/>
392 rajveer 86
		        <file name="${thirdparty.location}/readonly/apache/thrift-0.2.0/libthrift.jar"/>
87
		        <file name="${thirdparty.location}/readonly/slf4j/slf4j-api-1.5.8.jar"/>
88
		        <file name="${thirdparty.location}/readonly/slf4j/slf4j-simple-1.5.8.jar"/>
832 rajveer 89
				<file name="${thirdparty.location}/readonly/apache/log4j/log4j-1.2.16.jar"/>
556 chandransh 90
  				<file name="${thirdparty.location}/readonly/apache/commons-codec-1.4/commons-codec-1.4.jar"/>
877 vikas 91
			    <file name="${thirdparty.location}/Common.jar"/>
92
		    	<file name="${thirdparty.location}/ThriftConfig.jar"/>
93
                <file name="${thirdparty.location}/readonly/payment/payments.jar"/>
94
			    <file name="${thirdparty.location}/readonly/yuicompressor-2.4.2/yuicompressor-2.4.2.jar"/>
392 rajveer 95
 
637 rajveer 96
 
421 rajveer 97
 
318 ashish 98
		</filelist>
99
 
317 ashish 100
	<!-- ==================== Clean Target ==================================== -->
101
 
102
	<!--
103
	  The "clean" target deletes any previous "build" and "dist" directory,
104
	  so that you can be ensured the application can be built from scratch.
105
	-->
106
	<target name="clean" description="Delete old build and dist directories">
107
		<delete dir="${dist.home}"/>
108
		<delete dir="${build.home}"/>
109
	</target>
110
 
111
	<!-- ==================== Init Target ================================== -->
112
 
113
	<!--
114
 
115
	  The "init" target is used to create the "build" destination directory,
116
	  Normally, this task is executed indirectly when needed.
117
 
118
	-->
119
	<target name="init" depends="clean"  description="Create build directory">
120
 
121
		<mkdir dir="${build.home}" />
877 vikas 122
		<property name="yuic" location="${thirdparty.location}/readonly/yuicompressor-2.4.2/yuicompressor-2.4.2.jar"/>
317 ashish 123
 
124
	</target>
125
 
126
	<!-- ==================== Compile Target ================================== -->
127
 
128
	<!--
129
 
130
	  The "compile" target transforms source files (from your "src" directory)
131
	  into class files in the appropriate location in the build directory.
132
	  This example assumes that you will be including your classes in an
133
	  unpacked directory hierarchy under "/WEB-INF/classes".
134
 
135
	-->
136
	<target name="compile" depends="init" description="Compile Java sources">
137
 
138
 
139
		<mkdir dir="${build.home}/WEB-INF/classes" />
318 ashish 140
		<mkdir dir="${build.home}/WEB-INF/lib" />
317 ashish 141
 
142
		<javac srcdir="${source.home}"
143
				destdir="${build.home}/WEB-INF/classes"
144
				debug="${compile.debug}"
145
				deprecation="${compile.deprecation}"
146
				optimize="${compile.optimize}"
877 vikas 147
			    source="1.6" target="1.6">
318 ashish 148
			<classpath refid="Website.classpath"/>			
317 ashish 149
		</javac>
318 ashish 150
		<javac srcdir="${conf.home}"
151
						destdir="${build.home}/WEB-INF/classes"
152
						debug="${compile.debug}"
153
						deprecation="${compile.deprecation}"
154
						optimize="${compile.optimize}"
155
					     source="1.6" target="1.6">
156
			<classpath refid="Website.classpath"/>			
157
		</javac>
317 ashish 158
 
159
	</target>
160
 
161
	<!-- ==================== Build Target ================================== -->
162
 
163
	<!--
164
 
165
	  The "build" target copies all non class files to build directory
166
 
167
	-->
168
 
169
	<target name="build" depends="compile" description="Copies all non Java classes to build directoy">
170
		<copy todir="${build.home}">
171
			<fileset dir="${webapp.home}" excludes="CVS,**/*.class" />
172
		</copy>
173
		<copy todir="${build.home}/WEB-INF/classes">
318 ashish 174
			<fileset dir="${conf.home}" excludes="CVS,**/*.java" />
317 ashish 175
		</copy>
318 ashish 176
 
177
		<copy todir="${build.home}/WEB-INF/lib">
178
			<filelist refid="Website.libs"/>
179
			<mapper type="flatten"/>
877 vikas 180
		</copy>
181
 
182
		<!--Join css files -->
183
		<concat destfile="${build.home}/css/saholic.css">
184
	        <filelist dir="${build.home}/css" files="style.css,common.css,nav.css,widget.css,demoStyles.css,
185
	        	widget.css,demoStyles.css,product.css,cart.css,myaccount.css,gc_safari.css"/>
186
		</concat>
187
		<!--Minify js files -->
188
		<apply executable="java" dest="${build.home}/css" parallel="false">
189
		    <filelist dir="${build.home}/css" files="saholic.css" />
190
		    <arg line="-jar" />
191
		    <arg path="${yuic}" />
192
		    <srcfile />
193
		    <arg line="-o" />
194
		    <mapper type="glob" from="*.css" to="*-min.css" />
195
		    <targetfile />
196
		</apply>
197
 
198
		<!--Join js files -->
199
		<concat destfile="${build.home}/js/saholic.js">
200
		        <!--filelist dir="${build.home}/js" files="jquery-1.4.2.js,jquery-ui.min.js,loginpop.js,all.js,charLimit.js,
201
		        	jsapi.js,gallery.js,scrolltab.js,widget_slidetab.js,custom-jquery.js,myaccount.js,jquery.number_format.js
202
		        	jquery.validate.js,jquery.tipsy.js,loopedslider.js,widget_accordion.js,shippingAddress.js,productCategory.js
203
		        	"/-->
204
			    <filelist dir="${build.home}/js" files="widget_accordion.js,shippingAddress.js"/>
205
	    </concat>
206
		<!--Minify js files -->
207
		<apply executable="java" dest="${build.home}/js" parallel="false">
208
		    <filelist dir="${build.home}/js" files="saholic.js" />
209
		    <arg line="-jar" />
210
		    <arg path="${yuic}" />
211
		    <srcfile />
212
		    <arg line="-o" />
213
		    <mapper type="glob" from="*.js" to="*-min.js" />
214
		    <targetfile />
215
		</apply>
318 ashish 216
 
317 ashish 217
	</target>
218
 
219
	<!-- ==================== Archive Target ================================== -->
220
 
221
	<!--
222
 
223
	  The "archive" target create a binary archive of all files in build.home
224
 
225
	-->
226
 
227
	<target name="archive" depends="build" description="Create binary archive of all files in dist.home">
228
 
318 ashish 229
 
317 ashish 230
		<!-- Create application WAR file -->
318 ashish 231
	    <jar jarfile="${lib.home}/${app.name}.war"
317 ashish 232
				basedir="${build.home}" />
233
 
234
	</target>	
235
 
236
 
237
 
238
 
239
</project>
240