Subversion Repositories SmartDukaan

Rev

Rev 877 | Rev 943 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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